Howto boot Quantian from a USB memory device

This HOWTO was contributed by Marco Caliari, who also prepared the 7mb and 10mb boot images for 0.5.9.x and 0.6.9.x, respectively. I should have posted this HOWTO earlier. My main, and somewhat weak, excuse is that I have tried my best to make it work on the laptop models at my disposal for testing, but without success, using both 0.5.9.x and 0.6.9.x. It seems that success with this method depends to an even larger than usual amount on the particular computer model, and its BIOS support.

Thanks to Marco for all his contributions to Quantian. Please direct questions regarding this HOWTO to him.

The following procedure describes how to boot an already exixting Quantian iso on the hard disk via an USB FDD key/stick/pendrive (in the following, drive). It should work also with USB HDD or USB ZIP drives. Before starting, remember: ALL DATA on the USB drive will be DESTROYED. Even MBR and PARTITION TABLE will be OVERWRITTEN.

What you need

Even if, according to several how-to on the internet, syslinux should be sufficient, I was not able to get anything working until I also used makebootfat. Moreover, you need the boot iso for Quantian 0.5.9.x. You don't need to install syslinux, just download it. If you want to restore the original functionality of your USB drive, you also need some partition tools, such as parted.

A caution

Run parted on your USB drive before starting in order to get information about its partition table/geometry. Supposed your USB drive is /dev/sda, run
    parted /dev/sda print
For my USB drive, the result is
    Disk geometry for /dev/sda: 0.000-126,000 megabyte
    Disklabel type: msdos
    Minor  Start  End      Type     File system  Flag
    1      0,025  125,881  primary  fat16        boot, lba

Extracting and preparing the files from the boot iso

    mkdir bootimg
    mkdir bootiso
    mount -o loop boot_0.5.9.2.iso bootiso/
    cp bootiso/boot/isolinux/* bootimg/
    cp -R bootiso/KNOPPIX bootimg/
    rm bootimg/isolinux.bin
    mv bootimg/isolinux.cfg bootimg/syslinux.cfg
Get the ldlinux.bss and ldlinux.sys files from syslinux installation directory and mbrfat.bin from makebootfat installation directory.

Putting the boot image on the USB drive

    makebootfat -o /dev/sda -X -b ldlinux.bss -m mbrfat.bin -F -c ldlinux.sys bootimg

Instead of /dev/sda you can use the special usb value to automatically select the USB Mass Storage device connected at the system.

Booting Quantian from the USB drive

Reboot the system, make sure that your BIOS checks for USB drives at boot and, if your Quantian iso is on /dev/hda1, at prompt type
    knoppix bootfrom=/dev/hda1/Q*.iso

Getting the image

If you want to get a file image of the USB drive, type
   dd if=/dev/sda of=boot_0.5.9.img bs=1024 count=6760
To put the image on the USB drive, type
   cat boot_0.5.9.img>/dev/sda
Can you put the image to another USB drive, with different size/geometry? I don't know...

Restoring the USB drive

If you want to restore the original functionality of your USB drive, type
   parted /dev/sda mklabel msdos mkpartfs primary fat16 0 126 set 1 boot on set 1 lba on
Clearly, the line above refers to my USB drive. Adapt it to your USB drive.

Last modified: Thu Nov 11 10:25:38 CST 2004