Personal tools
You are here: Home Documentation Remastering Loyoppix
Document Actions

Remastering Loyoppix

by dredd last modified 2005-09-23 05:04 AM

In order to remaster Knoppix, you will need to use chroot command to turn the source/KNOPPIX directory into the effective file system. But before you can do this, you need to copy your resolv.conf file over to source/KNOPPIX so that you can access the internet from the chroot environment. You can do this with the following command:

  # cp /etc/dhcpc/resolv.conf source/KNOPPIX/etc/dhcpc/resolv.conf

The command will then ask you if you wish to copy the file. Answer y.

If you have other dymanic configuration files, such as smb.conf, you will need to copy them over as well. The process is pretty much the same as outlined above.

Now its time to chroot into the source/KNOPPIX directory and mount the proc filesystem. Use the following commands:

  # chroot source/KNOPPIX
  # mount -t proc /proc proc

Please note: when you are remastering, Knoppix is very cramped for space.

To see all of the installed packages:

  dpkg-query -W --showformats='${Installed-Size} ${Package}\n' | sort -n

To remove packages use the following command:

  apt-get --purge remove <package name>

To check which packages depend on a package use the following command:

  apt-cache rdepends <package name>

Once you have removed the packages you wished to remove, run the following command to update the list of packages on the system:

  apt-get update

To add new packages, use:

  apt-get install <package name>

To clear out the cache of packages you have downloaded, use:

  apt-get clean

IMPORTANT NOTE: When you are done adding and subtracting packages, installing software from source, and changing desktop configurations, you will need to unmount proc:

  umount /proc

You can now use Control-D to leave the chroot environment.

It is now time to create the filesystem for the remastered disk:

  # rsync -a --exclude "/KNOPPIX/KNOPPIX" /cdrom/ master/
  #mkisofs -R -U -V "<name> filesystem" -P "<name>" -hide-rr-moved -cache-inodes -nobak -pad -source/KNOPPIX | nice -5 /usr/bin/create+compressed_fs -65536 > master/KNOPPIX/KNOPPIX

The command after the rsync command will take a long time to run. Depending on the processor on the machine used for remastering, now would be a good time to either grab a cup of coffee or take a nap for a few hours.

After the mkisofs command completes, you will need to regenerate the checksums:

  # cd master
  # rm -f KNOPPIX/md5sums
  # find -type f -not -name md5sums -not -name boot.cat -exec md5sum {} \; >> KNOPPIX/md5sums
  # cd ..

You are now ready to generate the .iso file of your remastered version of Knoppix. To do so, you will need to run the mkisofs command once again. This will once again be time consuming, but not as painfully bad as the last time:

  # mkisofs -pad -l -r -J -v -V "<name>" -no-emul-boot -boot-load-size 4 -boot-info-table -b boot/isolinux/isolinux.bin -c boot/isolinux/boot.cat -hide-rer-moved -o <name_of_.iso>.iso master/

Once that command completes, you are the proud new owner of your own personally remastered Knoppix disk.

Of course, if you wish to test your new .iso, you can do so by rebooting your computer and use the following at the boot prompt:

  knoppix bootfrom=/dev/hda1/<name_of_.iso>.iso

« September 2008 »
Su Mo Tu We Th Fr Sa
123456
78910111213
14151617181920
21222324252627
282930
 

Powered by Plone CMS, the Open Source Content Management System

This site conforms to the following standards: