Friday, February 01, 2008

Making a new DSL cloop file

This HOWTO is meant to be a correction for the steps found in the DSL wiki to create a new cloop file for 4.2.4. I'll leave the why for your reading from that page itself. ;)


Some things to note before we start:

DSL usually represents the path and file of the KNOPPIX image as
when in MSDOS/Windows it's represented as

You should always type the image filenames in DSL as all caps even though it shows up otherwise, in case of any incompatibilities with syslinux/isolinux. ;)

I use /tmp as the base working folder. Feel free to use any other folder that has enough space.


Step 1:
Locate where the KNOPPIX image is stored and setup a loop device to access the image.
sudo su
losetup /dev/cloop1 /cdrom/KNOPPIX/KNOPPIX

Step 2:
Mount the cloop.
mkdir -p /mnt/loop
mount /dev/cloop1 /mnt/loop

Step 3:
Copy everything to the temporary storage.
cp -a /mnt/loop /tmp

Step 4:
Do what you want with the temporary storage ;)

Step 5:
Create a new compressed image.
mkisofs -hide-rr-moved -allow-leading-dots \
-R -l -V "KNOPPIX ISO9660" \
-v -allow-multidot $SAND_BOX | \
create_compressed_fs - \
65536 > [location_for_new_image_file]/KNOPPIX2

Step 6:
Unmount and detach.
cd $HOME
umount /mnt/loop
losetup -d /dev/cloop1

If you're storing the new image file on a USB thumb drive, remember to make sure that the file is properly written to it before unplugging it. The way I do it is to unmount the volume, wait for the command to complete, then unplug.
umount [mount_point_for_USB_thumbdrive]

We can test the new image file using this cheat code at startup (for syslinux/isolinus) :
dsl knoppix_file=KNOPPIX2

PS: Do drop me a comment if you found this useful, or if you have any comments/suggestions to leave behind!

No comments: