Difference between revisions of "Remastering Knoppix"
import>Cen1001 |
import>Cen1001 |
||
Line 1: | Line 1: | ||
− | Quick notes on how I made a remastered Knoppix for David Wales. |
+ | 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. |
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 . |
+ | 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. |
− | 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 use /harddrive_boot . |
||
+ | 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. |
||
− | Make lilo.conf boot the 'linux' kernel with minirt.gz as initd, and with some boot options maybe? I forget FIXME |
||
− | + | Copy the contents of /KNOPPIX into both KNOPPIX_ directories, preserving permissions and ownerships. Copy the following into masterISO: |
|
+ | * autorun.{bat,inf} |
||
− | Then exit and rebuild the compressed KNOPPIX file. |
||
+ | * 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. |
||
+ | |||
+ | 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 . Boot the new distro to test. |
Then boot up your original OS and copy the new compressed file over your old /KNOPPIX/KNOPPIX . Boot the new distro to test. |
Revision as of 16:14, 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.
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 . Boot the new distro to test.