Difference between revisions of "Simplified remaster 3.8.2"
From Knoppix Documentation Wiki
(5 -> 6 GB free space →Setting up for Remastering) |
(tidy up →Making the image) |
||
(10 intermediate revisions by the same user not shown) | |||
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 | + | 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 # the device with 6GB+ of free space |
− | knx_mnt=/mnt/hda3 | + | knx_mnt=/mnt/hda3 # the mountpoint for the device |
+ | knx=$knx_mnt/knx # the sandbox folder in which you will remaster the ISO | ||
+ | |||
# Mount the partition: | # Mount the partition: | ||
mount -o rw,dev $knx_dev $knx_mnt | mount -o rw,dev $knx_dev $knx_mnt | ||
− | # Create a root directory to work in | + | mount # did it mount? |
− | mkdir $ | + | df -H $knx_mnt # is there 6GB+ of free space? |
− | cd $ | + | |
+ | # Create a root directory to work in | ||
+ | # This will simplify cleaning up | ||
+ | mkdir $knx | ||
+ | cd $knx # did it make the sandbox? | ||
+ | pwd # can you play in the sanbox? | ||
− | # make a 1 GB RAM swapfile | + | # make a 1 GB RAM swapfile, just in case |
dd if=/dev/zero of=swapfile bs=1M count=1000 | dd if=/dev/zero of=swapfile bs=1M count=1000 | ||
mkswap swapfile | mkswap swapfile | ||
swapon swapfile | swapon swapfile | ||
+ | swapon -s # is swapfile being used? | ||
− | # make two target folders: one for the | + | # make two target folders: one for the source and one for the final master CD |
− | mkdir -p $ | + | mkdir -p $knx/{master,source} |
+ | ls -la # are they there? | ||
− | # | + | # Copy the cdrom files to your master directory : |
− | + | ||
( cd /cdrom && | ( cd /cdrom && | ||
find . -size -10000k -type f | | find . -size -10000k -type f | | ||
− | xargs cp -a --parents --target-directory=$ | + | 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/ | ||
# setup some preliminary files | # setup some preliminary files | ||
# /etc/fstab | # /etc/fstab | ||
− | grep -e '\/proc' -e '\/sys' /etc/fstab > $ | + | grep -e '\/proc' -e '\/sys' /etc/fstab > $knx/source/etc/fstab |
− | cat $ | + | cat $knx/source/etc/fstab |
# /etc/resolv.conf | # /etc/resolv.conf | ||
− | cat /etc/resolv.conf > $ | + | cat /etc/resolv.conf > $knx/source/etc/dhcpc/resolv.conf |
− | cat $ | + | cat $knx/source/etc/dhcpc/resolv.conf |
</nowiki></pre> | </nowiki></pre> | ||
Line 45: | Line 60: | ||
<pre><nowiki> | <pre><nowiki> | ||
# "chroot" into the source folder | # "chroot" into the source folder | ||
− | chroot $ | + | chroot $knx/source/ |
# mount /proc | # mount /proc | ||
Line 59: | Line 74: | ||
# leave the chroot environment | # leave the chroot environment | ||
+ | umount /proc | ||
exit | exit | ||
</nowiki></pre> | </nowiki></pre> | ||
Line 64: | Line 80: | ||
= Making the image = | = Making the image = | ||
<pre><nowiki> | <pre><nowiki> | ||
− | |||
# make the compressed image | # make the compressed image | ||
− | mkisofs -R -U -V "KNOPPIX.net filesystem" -publisher "KNOPPIX www.knoppix.net" \ | + | mkisofs -R -U \ |
− | + | -V "KNOPPIX.net filesystem" \ | |
− | + | -publisher "KNOPPIX www.knoppix.net" \ | |
+ | -hide-rr-moved -cache-inodes -no-bak \ | ||
+ | -pad $knx/source | | ||
+ | /usr/bin/create_compressed_fs - 65536 \ | ||
+ | > $knx/master/KNOPPIX/KNOPPIX | ||
# make the ISO | # make the ISO | ||
− | mkisofs -pad -l -r -J -v -V "KNOPPIX" -no-emul-boot -boot-load-size 4 \ | + | mkisofs -pad -l -r -J -v -V "KNOPPIX" \ |
− | -boot-info-table -b boot/isolinux/isolinux.bin -c boot/isolinux/boot.cat \ | + | -no-emul-boot -boot-load-size 4 \ |
− | -hide-rr-moved -o $ | + | -boot-info-table -b boot/isolinux/isolinux.bin \ |
− | + | -c boot/isolinux/boot.cat \ | |
+ | -hide-rr-moved -o $knx/knoppix.iso $knx/master | ||
</nowiki></pre> | </nowiki></pre> |
Latest revision as of 23:33, 19 December 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 # the device with 6GB+ of free space knx_mnt=/mnt/hda3 # the mountpoint for the device knx=$knx_mnt/knx # the sandbox folder in which you will remaster the ISO # Mount the partition: mount -o rw,dev $knx_dev $knx_mnt mount # did it mount? df -H $knx_mnt # is there 6GB+ of free space? # Create a root directory to work in # This will simplify cleaning up mkdir $knx cd $knx # did it make the sandbox? pwd # can you play in the sanbox? # make a 1 GB RAM swapfile, just in case dd if=/dev/zero of=swapfile bs=1M count=1000 mkswap swapfile swapon swapfile swapon -s # is swapfile being used? # make two target folders: one for the source and one for the final master CD mkdir -p $knx/{master,source} ls -la # are they there? # 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/ # 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 | /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