Difference between revisions of "Remastering Knoppix"
import>Cen1001 |
import>Cen1001 |
||
Line 17: | Line 17: | ||
Copy /usr/bin/create_compressed_fs to /working. This probably isn't compulsory, but I found it useful to have it available when I was running the workstation's original SuSE as well as the Knoppix on the hard drive. |
Copy /usr/bin/create_compressed_fs to /working. This probably isn't compulsory, but I found it useful to have it available when I was running the workstation's original SuSE as well as the Knoppix on the hard drive. |
||
− | Chroot into KNOPPIX_remastered; this is the system you'll see when you boot off the CD. Make your changes. You will have to delete a lot of packages in order to be able to compress the system onto a CD. |
+ | Chroot into KNOPPIX_remastered; this is the system you'll see when you boot off the CD. Make your changes. You will have to delete a lot of packages in order to be able to compress the system onto a CD. I added fvwm and edited /etc/X11/Xsession.d/45xsession to create a fvwm session. I then edited /etc/init.d/autoconfig-knoppix to make fvwm the default, and put David's config files into /etc/X11/fvwm . I added a few other packages to the distro too but they didn't need configuration. |
+ | |||
+ | Don't forget to clean up any temporary files before you exit. |
||
Then exit the chroot, change to /working, and build the compressed KNOPPIX file in the masterISO directory from the KNOPPIX_remastered directory. If you are short of RAM you may need to make a swap file before doing this, but I had 1Gb and 1Gb of swap already. |
Then exit the chroot, change to /working, and build the compressed KNOPPIX file in the masterISO directory from the KNOPPIX_remastered directory. If you are short of RAM you may need to make a swap file before doing this, but I had 1Gb and 1Gb of swap already. |
||
Line 25: | Line 27: | ||
65536 > masterISO/KNOPPIX/KNOPPIX |
65536 > masterISO/KNOPPIX/KNOPPIX |
||
− | Then boot up your original OS and copy the new compressed file over your old /KNOPPIX/KNOPPIX . Boot the new distro to test. |
+ | Then boot up your original OS and copy the new compressed file over your old /KNOPPIX/KNOPPIX . I couldn't figure out how to do without this step. Boot the new distro to test. |
+ | |||
+ | Keep going round and round like this until you're happy with the new Knoppix. Then build the actual CD image from /working with |
||
+ | |||
+ | cd masterISO |
||
+ | rm KNOPPIX/md5sums |
||
+ | find -type f -not -name md5sums -not -name boot.cat -exec md5sum {} \; >> KNOPPIX/md5sums |
||
+ | mkisofs -pad -f -l -r -J -v -V "Custom Knoppix" -b boot/isolinux/isolinux.bin -c \ |
||
+ | boot/isolinux/boot.cat -no-emul-boot -boot-load-size 4 -boot-info-table -hide-rr-moved \ |
||
+ | -o ./knoppix.iso masterISO |
||
+ | |||
+ | Then burn it to a CD. |
Revision as of 16:28, 16 May 2006
Quick notes on how I made a remastered Knoppix for David Wales. Closely based on an article by Robert Bernier at linuxdevcenter.com .
Get a Linux workstation, the most powerful you can get your hands on as this is CPU and memory intensive.
Install KNOPPIX on the hard drive (you'll need this for testing later). I did this in the root partition of my workstation which was /dev/hda6 . The method is to boot the original OS and mount the KNOPPIX CD. Copy the /KNOPPIX directory from the KNOPPIX CD into / . Copy the CD's autorun.*, cdrom.ico, and index.html files into / . From the CD's /boot/isolinux directory copy linux and minirt.gz into somewhere handy; I used /harddrive_boot . Then make lilo.conf boot the 'linux' kernel with minirt.gz as initrd, /dev/hda6 as root filesystem.
Reboot the workstation and select knoppix. Once it's booted up you need a disk on which to work as /dev/hda6 is mounted read-only. I made a directory /working and mounted /dev/hda7 on it (this is /home on the standard image). On /working I made three directories: KNOPPIX_original, KNOPPIX_remastered, and masterISO.
Copy the contents of /KNOPPIX into both KNOPPIX_ directories, preserving permissions and ownerships. Copy the following into masterISO:
- autorun.{bat,inf}
- cdrom.ico
- index.html
- boot/ (and contents)
- KNOPPIX/ (and contents except for the KNOPPIX file)
Copy /usr/bin/create_compressed_fs to /working. This probably isn't compulsory, but I found it useful to have it available when I was running the workstation's original SuSE as well as the Knoppix on the hard drive.
Chroot into KNOPPIX_remastered; this is the system you'll see when you boot off the CD. Make your changes. You will have to delete a lot of packages in order to be able to compress the system onto a CD. I added fvwm and edited /etc/X11/Xsession.d/45xsession to create a fvwm session. I then edited /etc/init.d/autoconfig-knoppix to make fvwm the default, and put David's config files into /etc/X11/fvwm . I added a few other packages to the distro too but they didn't need configuration.
Don't forget to clean up any temporary files before you exit.
Then exit the chroot, change to /working, and build the compressed KNOPPIX file in the masterISO directory from the KNOPPIX_remastered directory. If you are short of RAM you may need to make a swap file before doing this, but I had 1Gb and 1Gb of swap already.
mkisofs -R -U -V "Custom Knoppix" -publisher "your name here" -hide-rr-moved \ -cache-inodes -pad ./KNOPPIX_remastered | nice -5 ./create_compressed_fs - \ 65536 > masterISO/KNOPPIX/KNOPPIX
Then boot up your original OS and copy the new compressed file over your old /KNOPPIX/KNOPPIX . I couldn't figure out how to do without this step. Boot the new distro to test.
Keep going round and round like this until you're happy with the new Knoppix. Then build the actual CD image from /working with
cd masterISO rm KNOPPIX/md5sums find -type f -not -name md5sums -not -name boot.cat -exec md5sum {} \; >> KNOPPIX/md5sums mkisofs -pad -f -l -r -J -v -V "Custom Knoppix" -b boot/isolinux/isolinux.bin -c \ boot/isolinux/boot.cat -no-emul-boot -boot-load-size 4 -boot-info-table -hide-rr-moved \ -o ./knoppix.iso masterISO
Then burn it to a CD.