Trivial remaster 3.8.2


From Knoppix Documentation Wiki
Revision as of 04:24, 1 August 2005 by Rwcitek (Talk | contribs)

Jump to: navigation, search

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


# 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

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/

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
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
ls -la $knx/knoppix.iso