update : this version is now maintained at http://www.knoppix.net/docs/index.ph...masteringHowto so use that version instead of this

This is a guide that will show you howto remaster KNOPPIX.

( notes : commands showen in bold are on one line, so please mazimise the window, if you have any comments/sugestions please post below )

Requirements:
  • at least 1.5 Gig of RAM+Swap total
  • 3 gig free on a disk

Instructions:
  1. Boot from Knoppix CD
  2. Configure your internet connection ( we'll need this later )
  3. Open a root shell ( Kmenu->Knoppix->Root Shell ) - all commands below are ru
    n from root shell
  4. Make 2 directories, one for your new Master CD, one for the source, on a dis
    k partition. You'll have to m
  5. Make 2 directories, one for your new Master CD, one for the source, on a dis
    k partition. You'll have to make sure these are mounted read-write. If say, you
    have a partition with 3 gig free, mounted read-write /mnt/hda4, then mkdir /
    mnt/hda4/knxmaster; mkdir /mnt/hda4/knxsource
  6. mkdir /mnt/hda4/knxsource/KNOPPIX ( replace /mnt/hda4 with where your
    harddisk is mounted )
  7. now, copy the KNOPPIX files to your source directory : cp -Rp /KNOPPIX/* /
    mnt/hda4/knxsource/KNOPPIX
    that will take a little while
  8. [b]mkdir /mnt/hda4/knxmaster/KNOPPIX
  9. cp /cdrom/index.html /mnt/hda4/knxmaster/
  10. now, copy everything in /cdrom/KNOPPIX/ to /mnt/hda4/knxmaster/KNOPPIX/ except the ~700 Mb KNOPPIX file.
  11. Now you can "chroot" into the copied KNOPPIX : chroot /mnt/hda4/knxsource
    /KNOPPIX
    - new - I get a whole lot of /dev/null permission denied
    errors, I'm not sure what thats all about, but I press CTRL+C and carry on anyway...

    Update : fixed ! Well, check your mount status if you met the problem:
    # mount
    /dev/hda12 on /mnt/hda12 type ext3 (rw,nosuid,nodev)

    where "nodev" means that you are not accessible on mounted filesystem
    and you can not access /dev/null. And some scripts get output redirect
    to /dev/null...
    To solve this you should mount target partition before you do chroot
    like this:

    # mount /dev/hda12 /mnt/hda12

    And see whats changed:

    # mount
    /dev/hda12 on /mnt/hda12 type ext3 (rw)

    then you can carry on and chroot.
  12. You are now chrooted. "/" is actually "/mnt/hda4/knxsource/KNOPPIX"
  13. To use the internet you need to mount proc mount -t proc /proc proc
  14. now edit /etc/resolv.conf and add your nameserver
  15. check your chrooted internet connection : ping google.com
  16. Now you can change stuff. If you want to add programs, you'll probally have
    to remove some programs to free up space. apt-get remove <program>
    will remove that program.
  17. change stuff.. user settings are in /etc/skel
  18. ...
  19. Unmount /proc - very imporntant! umount /proc
  20. Press CTRL+D to leave being chrooted.

Notes :
interesting stuff in /etc/init.d/knoppix-autoconfig :
The X background file is /cdrom/KNOPPIX/background.gif
As well as floppyconfig, there is cdromconfig which will run /cdrom/KNOPPIX/knoppix.sh
interesting stuff in /etc/init.d/xsession
it ALSO sets background as /usr/local/lib/knoppix.gif
Now, onto creating the ISO file
  1. we've finished customizing and ready to burn!
  2. first do some cleanup : remove .bash_history files, tmp files etc
  3. rm -rf /mnt/hda4/knxsource/KNOPPIX/.rr_moved
  4. Now we'll make the big KNOPPIX file which is a cloop compressed ISO 9660 filesystem : mkisofs -R -U -V "KNOPPIX.net filesystem" -P "KNOPPIX www.knoppix.net" -hide-rr-moved -cache-inodes -no-bak -pad /mnt/hda4/knxsource/KNOPPIX | nice -5 /usr/bin/create_compressed_fs - 65536 > /mnt/hda4/knxmaster/KNOPPIX/KNOPPIX
  5. if all went well, onto making the final CD-ROM Image :
  6. cd /mnt/hda2/knxmaster
  7. mkisofs -pad -l -r -J -v -V "KNOPPIX" -b KNOPPIX/boot.img -c KNOPPIX/boot.cat -hide-rr-moved -o /some/where/knoppix.iso /mnt/hda2/knxmaster ( replace /some/where/ with where you want to store the final image ready for burning. )
  8. all done!


Thats it. This is an updated version of my previous howto. This is not meant for linux beginers, you will need to know your way around linux... to get this to work. I'll update this as corrections/improvemtns/etc come through.

Thanks to aay for some corrections