Difference between revisions of "Simplified remaster 3.8.2"


From Knoppix Documentation Wiki
Jump to: navigation, search
m (Setting up for Remastering)
m (Setting up for Remastering)
Line 5: Line 5:
 
Based on the [http://www.knoppix.net/wiki/Knoppix_Remastering_Howto Knoppix Remastering Howto]
 
Based on the [http://www.knoppix.net/wiki/Knoppix_Remastering_Howto Knoppix Remastering Howto]
  
This remastering assumes that you are running Knoppix 3.8.2 and have at least 6 GB of free space on a partition at $knx_dev which will be mounted at $knx_mnt and having a linux file system (e.g. ext2/ext3, reiserfs, etc.)
+
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
  
 
Boot from the ''Knoppix CD''
 
Boot from the ''Knoppix CD''
 
: '''boot: knoppix 3'''
 
: '''boot: knoppix 3'''
 
<pre><nowiki>
 
<pre><nowiki>
knx_dev=/dev/hda3
+
knx_dev=/dev/hda3 ; knx_mnt=/mnt/hda3 ; knx=$knx_mnt/knx
knx_mnt=/mnt/hda3
+
knx=$knx_mnt/knx
+
  
 
# Mount the partition:
 
# Mount the partition:
Line 26: Line 26:
 
swapon swapfile
 
swapon swapfile
  
# make two target folders: one for the course and one for the final master CD
+
# make two target folders: one for the source and one for the final master CD
 
mkdir -p $knx/{master,source}
 
mkdir -p $knx/{master,source}
 
ls -la
 
ls -la
  
# Now, copy the KNOPPIX files to your source directory :
+
# Copy the KNOPPIX files to your source directory :
 
cp -a /KNOPPIX/* $knx/source/
 
cp -a /KNOPPIX/* $knx/source/
 +
 +
# Copy the cdrom files to your master directory :
 
( cd /cdrom &&
 
( cd /cdrom &&
 
find . -size -10000k -type f |
 
find . -size -10000k -type f |

Revision as of 18:00, 31 July 2005


Setting up for Remastering

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

Boot from the Knoppix CD

boot: knoppix 3
knx_dev=/dev/hda3 ; knx_mnt=/mnt/hda3 ; knx=$knx_mnt/knx

# Mount the partition:
mount -o rw,dev $knx_dev $knx_mnt
# Create a root directory to work in -- if you put all your files here it will be easy to clean up
mkdir $knx
cd $knx
pwd

# make a 1 GB RAM swapfile
dd if=/dev/zero of=swapfile bs=1M count=1000
mkswap swapfile
swapon swapfile

# make two target folders: one for the source and one for the final master CD
mkdir -p $knx/{master,source}
ls -la

# Copy the KNOPPIX files to your source directory :
cp -a /KNOPPIX/* $knx/source/

# Copy the cdrom files to your master directory :
( cd /cdrom &&
find . -size -10000k -type f |
xargs cp -a --parents --target-directory=$knx/master/ )

# setup some preliminary files
# /etc/fstab
grep -e '\/proc' -e '\/sys' /etc/fstab > $knx/source/etc/fstab
cat $knx/source/etc/fstab
# /etc/resolv.conf
cat /etc/resolv.conf > $knx/source/etc/dhcpc/resolv.conf
cat $knx/source/etc/dhcpc/resolv.conf

Working in the chroot environment

# "chroot" into the source folder
chroot $knx/source/

# mount /proc
mount -t proc /proc proc

# add/remove packages
apt-get update
dpkg-query -W --showformat='${Installed-Size} ${Package}\n' | sort -n
deborphan
# deborphan | xargs apt-get -y remove
# apt-get remove --purge name-of-package-to-remove
apt-get clean

# leave the chroot environment
umount /proc
exit

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

# 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