Talk:Knoppix Remastering Howto

From Knoppix Documentation Wiki
Jump to: navigation, search

Tips around apt-get to install/update/remove applications:

  • Get apt-spy and use it to modify the sources.list file with the best mirrors for your particular region. This will speed up the downloading. Backup the original sources.list just in case.
  • Use apt-get update to get the lists with the latest releases and patches. Do not update a package if you don't need to, it may lead to the use of additional disk space (precious commodity when you want to keep everything below 700MB) and you may brake something else without knowing. Abuse the -s option to simulate the installation.
  • Before doing the update, I modified my default releases to testing, that means that the software I'll be using will have a good balance of stability and features. Knoppix uses unstable by default, which is too risky for my personal taste.
  • Get [apt-get install] locale and configure it with the locales you are going to use. It will save lots of space when downloading applications with plenty of locale modules.
  • I use aptitude to get/remove applications, it is character based so it works character mode. As you mark packages for install/update/removal, it will tell you how much disk space you will save/use, try to solve depencies problems and give you plenty control to fix them manually when possible.
  • When installing applications it is likely that your /etc/rc?.d directories will have new entries, many of them unwanted or unplanned. Make sure you check them and remove the new entries based on your preferences. I usually leave /etc/rc2.d and /etc/rc5.d as close as the originals and modify /etc/rc3.d and /etc/rc4.d to test new stuff. IMPORTANT: Knoppix 6.2 ignores /etc/rc?.d directories. See below.

Example: You may want to have ntfs installed, but not necessarily running unless you need. Same with apache, mysql and many others.

  • When removing/purging applications, they may leave behind non-empty directories. Usually this is announced by aptitude, apt-get or any other package you are using. Make sure to check the messages.

  • I'm having trouble remastering the 5.1.1 CD. I've done it twice. The first time it has trouble loading the isolinux information, and the second time isolinux has an error about the checksum... (Slythfox)
  • Has anyone remastered the 5.01 DVD? I'm having trouble following the remaster guidelines. What boot loader is it using? How do I switch bootloaders or add an additional kernel?
  • I'm having some problems with remastering 5.01, too.... For me, the compressed image created via "create_compressed_fs" is not found during bootup. Any ideas why this could be? (MadusI)
  • The howto needs to be edited in a few places where scripts on one line go past the printable area. No problem if you cut/past script from here, but it is if you print for reading offline. (step 13 under Setting Up for Remastering, the long dpkg-query under the APT section, the sample Grub entry in the section on Test Remastered Version). I have a couple of other lines that split when printing under Windows (printing at work). Maybe there could be a link to a printable version like many of the news sites use. (ripcrd)

I do not know whether it is really necessary, but in order to edit the 5.3.1 DVD, I mounted KNOPPIX and KNOPPIX2 into an UnionFS and then - after umounting that FS - created two separate compressed FS using the third of the commands on the main page, once with KNOPPIX and once with KNOPPIX2.

why -r and -a?

What's the advantage of using both -r (or -R) and -a in cp command? AFAIK, -r/-R means recursively copying, while -a means archively copying. I'm using Debian lenny, I don't know if Knoppix use another version of cp (coreutils).

according to "man cp" -a equals -dpR (in Knoppix 5.1.1).

Remastering the LiveCD ISO

Somehow things have changed from boot.img to balder.img and isolinux. I am no expert, so correct my where I'm wrong. My impression is that in order to remaster with a new kernel one has to copy the kernel to boot/isolinux/linux instead of implementing it in the boot.img. Also what used to be miniroot.gz is now called minirt.gz.

Knoppix Version 6.x

Mountpoint /cdrom changed to /mnt-system

Anyone know what /mnt-user is used for ? (edit: Why yes, see my entry below. :-)

/etc/rc?.d directories are ignored. If you want any services started, the preferred method is to edit the /etc/rc.local script. This script is run ((on vt12) by /etc/init.d/knoppix-autoconfig)) immediately before killing the progress bar and executing /mnt-system/KNOPPIX/ If you want different behavior with different runlevels, you could edit /etc/inittab for standard behavior, or you could do it yourself in

Making the "master" section is problematic because all the files cannot be "seen" from within a Knoppix 6 boot. Specifically boot/isolinux/*, autorun.inf etc. To create the master tree:

  • With $GBASE set to the path to where your remastering is taking place
  • Have a copy of a Knoppix 6 iso on the hard disk where you are doing your remastering.
  • Mount the iso on a loopback.
 mount -o loop -t iso9660 $GBASE/$ISO $GBASE/isomnt
  • cd into the mount point
 find . -size -10000k -type f -exec cp -p --parents '{}' $GBASE/knx/master/ \;

6.x with programs added

With 6.x, installing Debian packages on the persistent image works very well, but how to proceed when remastering the complete system? This can be a good alternative to using the DVD, leaving more room on the persistent image afterwards. With USB sticks, the 700MB space restriction isn't very significant, images anywhere from 700-4000MB can be produced. I think maybe a new remastering HowTo for 6.x could be the best thing to do? --Capricorny 17:48, 2 February 2010 (MST)


One thing /mnt-user is used for is to copy KNOPPIX to ram or hard drive (the toram and tohd boot parameters, respectively).

Specifically, the init script in the initial ramdisk checks for toram or tohd. If found, the target device (a tmpfs ramdisk in the case of toram) is mounted on /mnt-user, /mnt-system/KNOPPIX is copied from the boot medium to /mnt-user, the boot medium is unmounted, and the target device mount is moved from /mnt-user to /mnt-system.

Anyone know of any other uses?

Revised version of Remastering HowTo

Something in this HowTo didn't work with new Knoppix. For that reason I've done an update of all the script lines you need for remastering purpose. All remainig stuff I put in chapter #3. --Werner P. Schulz 15:31, 22 June 2011 (MDT)