Copying the Knoppix filesystem
The total process of creating a new version of Knoppix (called remastering) broadly consists of copying a running Knoppix environment to a host computer, chrooting into it, making any desired changes, and then compressing the filesystem and turning it into a bootable ISO. Keep in mind that remastering the CD will take a lot of disk space. The uncompressed filesystem alone takes about 1.7GB, to which you will be adding a compressed filesystem (slightly less than a CD) and the final ISO. Make sure you have at least 3 gigabytes of space to work with
First, you'll need to boot the CD on the system that you're working on. I suggest booting into run-level 2, text mode, to minimize memory usage. At the splash screen for Knoppix, enter knoppix 2. Once it boots, mount a local hard drive to copy the data to:
root@tty1[/]# mount /dev/hda1 /mnt/hd
and then copy all the files from the Knoppix filesystem, preserving the permissions:
root@tty1[/]# cp -dpRv /KNOPPIX /mnt/hd/knoppix-cd/
After this process completes, reboot back into your host machine. You will also need a copy of the CD structure, as it normally appears for remastering later. Mount the CD, and then, copy the entire contents in the same directory structure to a new directory within the /knoppix-cd directory. I prefer to name it /knoppix-cd/KNOPPIX/KNOPPIX.build/. Omit the KNOPPIX/KNOPPIX file from the CD, which will be about 690MB, since this will be overwritten with your filesystem later.
Now you'll need to execute the chroot command into the directory that you copied the running version of Knoppix into:
root@tty1[/]# chroot /knoppix-cd/KNOPPIX
At this point, you will be inside the /knoppix-cd/KNOPPIX directory (or wherever you chose to copy the files) as if it were the root directory. If you get an error such as 'cannot run command: /bin/bash', you probably did not copy the filesystem correctly, or you are chrooting into an inappropriate directory. The directory must appear exactly as if it were the root directory of a Linux machine, with /bin, /usr/bin, available local to that directory. Look inside to be sure this is the case. Assuming all goes well:
root@not a tty[/]# mount -t proc /proc proc
This command will allow the chrooted environment to access the network card of the host system, among other things. At this point you are in a functioning Knoppix environment. Any changes you make will apply to your final bootable version—you can delete software, add software, or edit configuration files. Since the original version of Knoppix (and most derivatives) are based off of Debian, you can also use the entire apt subsystem to deal with software issues. There are many great guides for using the apt subsystem, so this article will over cover the basic applications to get you started.