- Boot from the Knoppix CD
- Open a root shell:
- Menu: Kmenu->Knoppix->Root Shell
- Note: All commands below are run from this root shell.
- Configure your Internet connection (we'll need this later). If you use DHCP, it should already be configured.
- Note: Run ifconfig to check.
- Find the partition you will use to work on. In this example it is called hda1 . The partition should have a minimum of 3 GB free space
- Mount the partition:
mount -rw /dev/hda1 /mnt/hda1
- Note: Make sure that it is read/write or you will get errors when you later chroot. To check: run mount
- Create a root directory to work in -- if you put all your files here it will be easy to clean up
-
mkdir /mnt/hda1/knx
-
- If you don't have 1 GB RAM (egrep "(MemTotal|SwapTotal)" /proc/meminfo (physical+swap)) then you will need a swapfile:
-
cd /mnt/hda1/knx
dd if=/dev/zero of=swapfile bs=1M count=750
mkswap swapfile
swapon swapfile
-
- Make 2 directories, one for your new Master CD, one for the source, on a disk partition. Also, make additional directories under these named KNOPPIX:
-
mkdir -p /mnt/hda1/knx/master/KNOPPIX
mkdir -p /mnt/hda1/knx/source/KNOPPIX
-
- Now, copy the KNOPPIX files to your source directory :
-
cp -Rp /KNOPPIX/* /mnt/hda1/knx/source/KNOPPIX
- Note: This will take a long time (you are copying 2GB). Warning: you will be tempted to replace this copy command with a much faster procedure: create an empty directory, then use unionfs to merge the empty directory with /KNOPPIX in order to create the read-write copy. However, as of Knoppix 4.0.2, there is a bug in unionfs that causes this faster procedure to fail. For now, stick with the copy-command shown above.
-
- Additionally, copy the 'boot' folder from your cdrom - you'll need these files to build the ISO later.
-
cp -ar /cdrom/boot /mnt/hda1/knx/master/boot
-
- For Knoppix 5.0.1 you also have to copy the 'modules' folder:
-
cp -ar /cdrom/KNOPPIX/modules /mnt/hda1/knx/master/KNOPPIX/.
-
- Copy the main HTML page for the startup page:
-
cp /cdrom/index.html /mnt/hda1/knx/master/
-
- Copy everything necessary files except the ~700 Mb KNOPPIX file.
- <>
-
cd /cdrom/KNOPPIX && find . -size -10000k -type f -exec cp -p --parents '{}' /mnt/hda1/knx/master/KNOPPIX/ \;
- >= 3.4:
-
cd /cdrom && find . -size -10000k -type f -exec cp -p --parents '{}' /mnt/hda1/knx/master/ \;
-
- for the DVD Version you have to use -size -15000k and copy the KNOPPIX2 folder like this
- cp /cdrom/KNOPPIX/KNOPPIX2 /mnt/hda1/knx/master/KNOPPIX/
- setup the environment for chroot
- mount --bind /dev /mnt/hda1/knx/source/KNOPPIX/dev
- mount --bind /proc /mnt/hda1/knx/source/KNOPPIX/proc
- Now you can "chroot" into the copied KNOPPIX:
-
chroot /mnt/hda1/knx/source/KNOPPIX
-
- If you see errors regarding /dev/null, see the common problems section
You are now chrooted. "/" is actually "/mnt/hda1/knx/source/KNOPPIX"
No comments:
Post a Comment