You're here: Welcome! » Docs » Remastering Howto

Remastering Howto

This howto will show you how to remaster Lamppix.

See also:

Knoppix Remastering Howto:


  • about 1 GiB free space on a Linux filesystem (ext2/3, xfs, reiserfs, ...)
  • about 512 MiB of free RAM (you can use swap as well)


Getting Lamppix on your harddrive

  1. Boot from Lamppix
  2. Open a root shell
  3. Mount the partition you will use for remastering Lamppix, e.g.
    • mount /mnt/hda7
  4. Create a directory where we'll put all the files in
    • mkdir /mnt/hda7/lamppix
  5. ... and a second directory, where we'll put Lamppix' whole compressed filesystem
    • mkdir /mnt/hda7/lamppix/source
    • cp -Rp /KNOPPIX/* /mnt/hda7/lamppix/source
    • Wait some minutes.
  6. Now: one more directory for the files of the CD
    • mkdir /mnt/hda7/lamppix/master
    • cd /cdrom; find . -size -10000k -type f -exec cp -p --parents {} /mnt/hda7/lamppix/master/ \;

Changing Lamppix' filesystem

  1. I suggest creating a remastering script. So ... choose your favourite editor and insert this script:

 if test `whoami` != 'root' ; then
        echo "You must be root to remaster LAMPPIX."
 echo "LAMPPIX" > $CDROM/lamppix/VERSION
 echo " ** Version:    " $VERSION >> $CDROM/lamppix/VERSION
 echo " ** Creation:   " `date +%Y-%m-%d` >> $CDROM/lamppix/VERSION
 # remember old hostname
 # and set Lamppix' hostname
 hostname lamppix
 mount -o bind /proc $BASE/proc
 mount -o bind /dev $BASE/dev
 mount -o bind $CDROM $BASE/cdrom
 mv $BASE/home/lamppix $BASE/home/lamppix.old
 mv $BASE/etc/skel $BASE/home/lamppix
 chown -R 1001.50 $BASE/home/lamppix
 mkdir $BASE/ramdisk
 cd $BASE
 # run Lamppix boot script
 chroot . opt/lamppix/
 # chroot into Lamppix
 chroot .
 # stop XAMPP and PostgreSQL
 chroot . opt/lampp/lampp stop
 chroot . usr/bin/killall postmaster
 sleep 5
 # remove all logs
 rm -rf opt/lampp/logs/*
 cd ..
 # remove postgresql data
 rm -Rf $BASE/opt/pgdata
 # remove some other files
 rm -f $BASE/home/lamppix/.bash_history
 rm -f $BASE/root/.bash_history
 mv $BASE/home/lamppix $BASE/etc/skel
 chown -R root.root $BASE/etc/skel
 mv $BASE/home/lamppix.old $BASE/home/lamppix
 rm -Rf $BASE/ramdisk
 rm -f $BASE/mnt/extern
 rm -Rf $BASE/var/tmp/*
 umount $BASE/proc
 umount $BASE/dev
 umount $BASE/cdrom
 # set back hostname
 hostname $OLDHOSTNAME

  1. Save the script as /mnt/hda7/lamppix/start_chroot and make it executable
    • chmod +x /mnt/hda7/lamppix/start_chroot
  2. Jump into your remastering root directory
    • cd /mnt/hda7/lamppix
  3. Run the script
    • ./start_chroot
  4. You are now chrooted. "/" is now /mnt/hda7/lamppix/source
  5. To configure your nameserver, edit /etc/resolv.conf
  6. Change Lamppix to your needs. Install software with apt-get. Look in KNOPPIX' remastering howto for more help.
  7. Type "exit" to leave the chrooted shell.

Creating the ISO image

  1. Finally, I use this shellscript to create the ISO image of my modifications:

 # creates the compressed KNOPPIX filesystem
 mkisofs -R source | create_compressed_fs - 65536 > newcd/KNOPPIX/KNOPPIX
 # calculate MD5 sums
 cd master
 rm -f KNOPPIX/md5sums
 find -type f -not -name md5sums -not -name -exec md5sum {} \; \
      >> KNOPPIX/md5sums
 cd ..
 # create the image
 mkisofs -V "LAMPPIX" -r -J -b isolinux/isolinux.bin \
   -c isolinux/ -no-emul-boot -boot-load-size 4 \
   -boot-info-table -o lamppix-remastered.iso master

gepard//cms © Tino Wagner, 2003-2004.