Differences between revisions 1 and 2
Revision 1 as of 2005-12-13 20:33:33
Size: 2767
Editor: PeMac
Comment:
Revision 2 as of 2005-12-13 20:35:39
Size: 2785
Editor: PeMac
Comment:
Deletions are marked like this. Additions are marked like this.
Line 5: Line 5:
        # su         # ["su"]
Line 7: Line 7:
        # sfdisk -l /dev/sda         # ["sfdisk"] -l /dev/sda
Line 22: Line 22:

Format the USB flash drive
 
== Format the USB flash drive ==
Line 29: Line 29:
        # mkdosfs /dev/sda1         # ["mkdosfs"] /dev/sda1
Line 32: Line 32:
Make the USB flash drive bootable == Make the USB flash drive bootable ===
Line 34: Line 34:
      Boot Linux with the drive connected (I’ve used a live Knoppix 3.6 CD)
      You will need to download the bootusb and the DSL image files. I’ve used bootusb-0.8.img and dsl-1.0.1.iso, and put them in my /home directory. If you’re not able to copy the DSL image file to the /home directory, then store it at another location on your hard drive(s) and use that instead of “/home” below.
Boot Linux with the drive connected (I’ve used a live Knoppix 3.6 CD)
You will need to download the bootusb and the DSL image files. I’ve used bootusb-0.8.img and dsl-1.0.1.iso, and put them in my /home directory. If you’re not able to copy the DSL image file to the /home directory, then store it at another location on your hard drive(s) and use that instead of “/home” below.
Line 39: Line 39:
        # syslinux -s -o /home/bootusb-0.8.img /dev/sda1         # ["syslinux"] -s -o /home/bootusb-0.8.img /dev/sda1

Prepare the USB flash drive

  • Boot Linux with the drive connected (I’ve used a live Knoppix 3.6 CD) Switch to root (not required if you boot “knoppix 1”)
    • # ["su"]
    Check the current geometry on the drive (most likely recognized by the kernel as /dev/sda)
    • # ["sfdisk"] -l /dev/sda
    Mine showed the following results:
    • 63488 cylinders, 1 head, 32 sectors
    Multiply the three to obtain the total number of sectors:
    • 63488 x 1 x 32 = 2031616
    Supposedly, the boot partition should be less than 1024 cylinders, and 32 sectors per cylinder. So, I’ve adjusted the geometry as follows: total number of sectors / 32 / 1024 = # of heads
    • 2031616 / 32 / 1024 = 62
    And so, I’ve adjusted my geometry using sfdisk
    • # sfdisk -f -C1024 -H62 -S32 /dev/sda
    sfdisk will next ask for the partition info. I’ve decided to have everything on one partition:
    • sda1:0 1024 e *

    Press <ENTER> for all the others, (sda2, sda3, sda4) Basically, this sets the first primary partition (/dev/sda1) to start with cylinder 0 and end with cylinder 1024, it’s of type “e” (Win95 FAT (LBA)), and bootable (“*”) Reboot to reload with correct partition table for the USB flash drive

Format the USB flash drive

  • Boot Linux with the drive connected (I’ve used a live Knoppix 3.6 CD) Switch to root (not required if you boot “knoppix 1”)
    • # su
    Format the drive
    • # ["mkdosfs"] /dev/sda1

== Make the USB flash drive bootable ===

Boot Linux with the drive connected (I’ve used a live Knoppix 3.6 CD) You will need to download the bootusb and the DSL image files. I’ve used bootusb-0.8.img and dsl-1.0.1.iso, and put them in my /home directory. If you’re not able to copy the DSL image file to the /home directory, then store it at another location on your hard drive(s) and use that instead of “/home” below.

  • Switch to root (not required if you boot “knoppix 1”)
    • # su
    Write the boot sector
    • # ["syslinux"] -s -o /home/bootusb-0.8.img /dev/sda1
    Now, mount the drive
    • # mount -t vfat /dev/sda1 /mnt/sda1
    Create a temp directory and mount the bootusb image file
    • # mkdir /mnt/tmp # mount -t vfat -o loop=/dev/loop0 /home/bootusb-0.8.img /mnt/tmp
    Copy files over to the drive and unmount the bootusb image file
    • # cp /mnt/tmp/* /mnt/sda1 # umount /mnt/tmp
    Mount the DSL image file
    • # mount -t iso9660 -o loop=/dev/loop0 /home/dsl-1.0.1.iso /mnt/tmp
    Copy files over to the drive and unmount the DSL image file
    • # cp -r /mnt/tmp/KNOPPIX /mnt/sda1 # umount /mnt/sda1