USB Booting


Table of Contents

Bootable USB Device Survey 
BackTrack 2.0 beta on USB stick 
Not helpful urls 

Bootable USB Device Survey 

http://puppylinux.org/wikka/USBBoot

Posted: Tue Feb 28, 2006 5:47 pm

I checked the available USB devices at work to see which were bootable. The process used to check them was: use fdisk to see if there was an active partition (i.e. marked bootable), make a copy of the master boot record (mbr) with dd command, and use hexdump to check the first word of the mbr. The first word indicates whether or not the boot strap loader code is present. From personal experience, I know if the first word is either 33FA or C033, then the proper boot code is present and works. I have found other values and list them for the devices. Some were configured as a "super floppy" and it was not apparent if they were bootable. Here are the results.

*USB Hard and Zip Drives*

Kanguru Zipper 1 Gigabyte, no active, first word value: 0000
Maxtor Personal Storage 40 Gigabyte, no active, first word value: 0325
Western Digital Portable 40 Gigabyte, yes active, first word value: C033
Iomega 250 Megabyte USB Zip Drive, yes active, first word value: 2EEB

*USB Flash Drives with changeable SD or MMC cards*

In general, SD or MMC cards are not manufactured as bootable.

Banazi Flash Drive (Simptel) 256 Megabyte SD, no active, first word value: 0000
Lexar Jump Drive Trio 128 Megabyte SD, no active, first word value: 0000
Unmarked MMC card reader 128 Megabyte, no active, first word value: 0000

*Normal USB Flash Drives*

Apacer Handy Steno 1 Gigabyte, yes active, first word value: BEFA
Belkin 128 Megabyte, yes active, first word value: C5FE
Dell (free with system) 128 Megabytes, yes active, first word value: C5FE
Disk Gel Edge 1 Gigabytes, yes active, first word value: BEFA
Fujifilm 256 Megabyte**, yes active, first word value: C033
Kanguru Micro 512 Megabytes, this was configured as a "super floppy format"
Kanguru Micro 2.0 512 Megabyte, yes active, first word value: C5FE
Kingston 256 Megabyte, yes active, first word value: C033
Kingston 512 Megabytes**, yes active, first word value: 0325
Lexar Jump Drive 2.0 Pro 256 Megabytes, yes active, first word value: C5FE
Lexar Jump Drive 2.0 Pro 256 Megabytes, yes active, first word value: BEFA
Lexar Jump Drive 2.0 Pro 512 Megabytes, yes active, first word value: BEFA
Lexar Jump Drive 2.0 Pro 1 Gigabyte, yes active, first word value: 07B7
Memorx Travel Drive 1 Gigabyte, yes active, first word value: C033
Memorx 1 Gigabyte, yes active, first word value: BEFA
Memorx 2 Gigabyte, yes active, first word value: BEFA
No Name/No Markings 256 Megabyte, yes active, first word value: 33FA
PNY Attache 256 Megabyte***, yes active, first word value: 0325
PNY Attache 1 Gigabyte, yes active, first word value: C033
SanDisk Cruzer Micro 512 Megabyte*, no active, first word value: 33FA
SanDisk Cruzer Micro 512 Megabyte* later version, no active, first word value: 0000
SanDisk Cruzer Mini 256 Megabyte, yes active, first word value: 33FA
SanDisk Cruzer Mini 512 Megabyte, no active, first word value: 33FA
Sony Micro Vault 128 Megabytes, this was configured as "supper floppy"
Sony Micro Vault 256 Megabytes, this was configured as "supper floppy"
Ultra Electronics Pen (actually a pen) 128 Megabytes, yes active, first word value: BEFA
Viking Interworks 512 Megabytes, yes active, first word value: 33FA

Most devices were formatted as MSDOS FAT16 expect for those marked

*W95 FAT32 format
** W95 FAT16 LBA format
*** MSDOS FAT16 LBA format

THE BOTTOM LINE!

USB devices are consumer items. Manufacturers of consumer items have no requirements to follow a standard design or configuration for a given item. The consumer item manufacturers are driven by the design that is the most profitable. Whether or not a USB flash drive is bootable is the "luck of the draw". The above survey may show a particular manufacture/model was bootable. However, a brand new device (I found this out with SanDisk Micro Cruzers) may not be. The end user must take steps to ensure the device used is bootable.

Here is what worked for me using Puppy 1.0.7, Puppy 1.0.8 and Puppy2Seamonkeyalpha.

I will use /dev/sda as an example for the steps. The device name must be the one for the device being used.

First, one needs to check using fdisk /dev/sda whether or not the partition on the device is marked active (or bootable). The "p" command will show the table. Before doing anything, one should write down the original partition information, such as number of heads, sectors/track, cylinders, file system type number. If the partition table is not marked as active, then use the fdisk command "a" to mark it as active. I have found the MSDOS FAT16 (type 6) seems to work best. I would make the partition a MSDOS FAT16 type if it was not. One then checks everything in table again before writing the new partition table to the device. If you are sure, the table is correct, and then write the table to the device using the "w" command.

Second, one needs a clear MSDOS FAT16 file system. One uses mkfs.msdos /dev/sda to get the clean file system. Just changing the partition table does not change the file system of the device.

Third, needs to ensure the boot strap loader code in the master boot record is correct to work with Syslinux. I have found the standard MSDOS code (from about MSDOS version 2) appears to work best. Once again, there are no "sure things" with consumer items. I have posted a zip version on the Cutting Edge forum on February 26, 2006 at 9:59PM under the title of Puppy2 Installer and USB Test; a bit long. Use gunzip to de-compress the file to the original version. After de-compressing, the file (sys-nopart.mbr) should be in the directory /root/my-mbr. To write it to the device master boot record, one uses dd if=/root/my-mbr/sys-nopart.mbr of=/dev/sda. If one is knowledgeable, one can also use the GRUB (part of Puppy) boot loader to do the same thing.

documented on: 2007.01.02