Remastering KNOPPIX

by Sebastian Rahtz on 1 September 2004, last updated

Archived This page has been archived. Its content will not be updated. Further details of our archive policy.



You’ll need

Read the following instructions with a pinch of salt and some common sense. They are not a safe recipe, more a diary of what we did.

The first thing to do is seed your new Knoppix from the existing one. Boot using the clean Knoppix CD, get a root shell, and mount your nice big empty partition. Install the remaster scripts somewhere temporary (in the /home/knoppix directory), and run knoppix_remaster there. It will ask you if you want to make a new remaster (yes, you do), and then for a directory, so tell it the place where you mounted your empty partition. It’ll spend some time copying files, and then come back and ask if you want to

  • chroot: this gives you a shell prompt placed in your new system, where you can add and delete packages
  • make an image: this builds your new Knoppix
  • make an ISO image: this makes the CD image you can burn, by compressing the image in the previous step
  • edit options: (change the name of the producer etc)

You can quit at this stage and come back whenever you like to do more work. Your work now is to decide what changes to make. I do this in four parts

  • Do some hand work to establish the system the way I want it
  • Add and delete standard packages
  • Add specialized software for which I have made Debian packages. locally
  • Clean up, rebuild menus etc


This is the first script I run. It assumes that /mnt is the location of my various scripts and data files. I put in a resolv.conf ( to get the network as I need it, and a fixed apt sources.list ( ). The KDE skeleton files are hand-crafted to add Mozilla Thunderbird and Firefox to the menu, the background image is changed, and the X startup is changed to display http://localhost/ on startup. Then we update the apt cache, do a large set of removes (see list at and then adds (see list at Finally, we set a password for MySQL.

#!/bin/sh mount -t proc /proc proc # I have mounted my working files on /mnt/Knoppix cd /mnt/Knoppix :>/usr/games/frozen-bubble.wav for i in resolve.conf sources.list background.jpg 45sxession \ kde.tar Add Remove LocalAdd do wget$i done cp resolv.conf /etc/resolv.conf cp sources.list /etc/apt cat kde.tar (cd /etc; tar xf -) (cd /etc/skel; unzip /mnt/Knoppix/dotmoz) convert background.jpg /usr/local/lib/knoppix.png cp 45xsession /etc/X11/Xsession.d/45xsession apt-get update apt-get –purge remove cat Remove apt-get –purge remove mozilla-browser apt-get install cat Add /etc/init.d/mysql start /usr/bin/mysqladmin -u root password ‘adm!n’ umount /proc

Local packages

A series of package are added which are not part of standard Debian distributions. If they exist, remove them, then add clean versions. These have been made into .deb packages locally.

  • Moodle 1.4: Debian is not up to date with this
  • Moodle OSS Watch setup: config and initial database, with Moodle demo course
  • axis and Tomcat5: not packaged by Debian
  • eXist: XML database used by TEI and Roma
  • TEI: stylesheets, DTDs, schemas etc, including seeding of eXist database
  • tei-emacs: TEI setup for Emacs
  • Roma: TEI application to generate schemas
  • osswatch-knoppix: a package which does the nasty things needed to make databases and webapps work with Knoppix, by copying data to memory and adjusting config files

#!/bin/sh mount -t proc /proc proc IN=”xmlstarlet moodle moodle-osswatch exist-standalone \ xslt-process jing \ nxml-mode-tei tei-doc tei-emacs tei-lite tei-p5-doc tei-p5-schema tei-roma tei-schema tei-xsl tei-xsl-teic osswatch-knoppix” for i in echo $IN do echo add package $i apt-get install $i done umount /proc


These commands make sure MySQL and Tomcat are stopped (some of the local packages need to start services when they install), gets rid of unwanted orphan packages, makes some global definitions, and cleans up the menus

#!/bin/sh mount -t proc /proc proc /etc/init.d/mysql stop /etc/init.d/exist stop deborphan xargs apt-get –purge remove -y apt-get clean updatedb –prunepaths=”/ /mnt /mnt/hd /mnt/cdrom /tmp /usr/tmp /var/tmp” update-dlocatedb update-menus umount /proc


Now you can go back to the remaster program, and ask it to make the CD image. When it says “do you want to clean your Master, say NO! Otherwise it trashes your work.

You can try your lovely new image in one of three ways:

  • burn a CD and boot from it (could get expensive)
  • boot your original Knoppix, but specify the location of an ISO image at the prompt. eg linux24 bootfrom=/dev/hda8/knoppix.iso. You need to know something about your partitions.
  • run VMWare, and make a new virtual machine where the CD drive is set to use an ISO image instead a physical device