Trivial remaster 3.8.2
Contents
This remaster script will extract the files from the existing CD and rebuild a new ISO. No changes are made to the files used to build the ISO.
Based on the Knoppix Remastering Howto
This remastering assumes the following:
- you are running Knoppix 3.8.2
- you have a linux filesystem with at least 6 GB of free space
Setting up for remastering
This will be the same for all the various version of remastering.
# boot from the Knoppix CD boot: knoppix 3 # point to the partition, mountpoint, and working directory for the Knoppix build knx_dev=/dev/hda3 ; knx_mnt=/mnt/hda3 ; knx=$knx_mnt/knx # Mount the partition mount -o rw,dev $knx_dev $knx_mnt mount df -H $knx_mnt # make a 1 GB swapfile dd if=/dev/zero of=$knx_mnt/swapfile bs=1M count=1000 mkswap $knx_mnt/swapfile swapon $knx_mnt/swapfile swapon -s # create a working directory mkdir $knx cd $knx pwd # make two target folders: one for the source and one for the final master CD mkdir -p $knx/{master,source} ls -la $knx # finished setup
A "test build" version
Ideal if you just want to test the build process. This version uses the files right off the CD to make a new ISO. No changes.
Setting up for remastering
See the above instructions for booting, creating enough disk space, and a setting up a swap file.
Copying the files
# copy the cdrom files to your master directory ( cd /cdrom && cp -a . $knx/master/ ) ls -la $knx/master/ # finished copying the files
Making the image
# make the ISO mkisofs -pad -l -r -J -v -V "KNOPPIX" -no-emul-boot -boot-load-size 4 \ -boot-info-table -b boot/isolinux/isolinux.bin -c boot/isolinux/boot.cat \ -hide-rr-moved -o $knx/knoppix.iso $knx/master 2> $knx/knoppix.iso.log ls -la $knx/knoppix.iso # finished imaging the ISO
A "modified boot files" version
Ideal if you just want to change the boot configuation (e.g. add your own cheatcodes or kernel label) but keep everything else the same.
Setting up for remastering
See the above instructions for booting, creating enough disk space, and a setting up a swap file.
Mounting a union filesystem
Instead of copying all the files, we'll use a unionfs.
mount -t unionfs -o dirs=$knx/master=rw:/cdrom=ro none $knx/master ls -la $knx/master/ # at this point you can modify any of the files in $knx/master/ # finished copying the files
Making the image
# make the ISO mkisofs -pad -l -r -J -v -V "KNOPPIX" -no-emul-boot -boot-load-size 4 \ -boot-info-table -b boot/isolinux/isolinux.bin -c boot/isolinux/boot.cat \ -hide-rr-moved -o $knx/knoppix.iso $knx/master 2> $knx/knoppix.iso.log ls -la $knx/knoppix.iso # finished imaging the ISO
Unmounting the union filesystem
umount $knx/master find $knx/master -ls # finished umounting
Version 3 - rebuilding the compressed ISO fs
Setting up for remastering
See the above instructions for booting, creating enough disk space, and a setting up a swap file.
Copying the files
# copy the cdrom files to your master directory ( cd /cdrom && find . -size -10000k -type f | xargs cp -a --parents --target-directory=$knx/master/ ) ls -la $knx/master/ # copy the KNOPPIX files to your source directory cp -a /KNOPPIX/* $knx/source/ ls -la $knx/source/ # finished copying the files
Making the image
# make the compressed image { mkisofs -R -U -V "KNOPPIX.net filesystem" -publisher "KNOPPIX www.knoppix.net" \ -hide-rr-moved -cache-inodes -no-bak -pad $knx/source | nice -5 /usr/bin/create_compressed_fs - 65536 \ > $knx/master/KNOPPIX/KNOPPIX ; } 2> $knx/KNOPPIX.cloop.log ls -la $knx/master/KNOPPIX/KNOPPIX # make the ISO mkisofs -pad -l -r -J -v -V "KNOPPIX" -no-emul-boot -boot-load-size 4 \ -boot-info-table -b boot/isolinux/isolinux.bin -c boot/isolinux/boot.cat \ -hide-rr-moved -o $knx/knoppix.iso $knx/master 2> $knx/knoppix.iso.log ls -la $knx/knoppix.iso # finished imaging the ISO