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

BackTrack 2.0 beta on USB stick 

http://manugarg.blogspot.com/2006_11_01_archive.html

I have been playing with backtrack installation on USB since last 3 days. Just thought of sharing my experiences with you. I have a 2 GB USB stick. I wanted to create 2 partitions on it and install backtrack in one of them. Don't ask my why - I just wanted to play with different boot options on a USB stick. Here is what I learned from last 3 days of head breaking:

  1. Using a filesystem other than FAT/FAT32 on USB stick is a bad idea. I tried ext2 and ext3. Sometimes they work and sometimes (and on some systems) they fail for no reason.

  2. Bootloader 'grub' is a bad choice for USB boot. 'grub' tries to know too much about the system and when things change it just raises the hands and aborts. I could get it run my USB stick, but it was very unreliable.

  3. Bootloader 'lilo' also didn't work always. I worked on my laptop, while it got stuck in between on my desktop. I don't know whether it was 'lilo' or filesystem ext2. I didn't test with FAT32. Not to mention that it's 20 times slower than any other bootloader in loading the kernel image.

  4. Bootloader 'extlinux' is also unreliable. On the same system, sometimes it works and sometimes not.

  5. Bootloader 'syslinux' with FAT32 seems to be the most stable thing till now. I think, I'll stop experimenting with other bootloaders and filesystems on my USB stick until somebody convinces me to do otherwise :)

To install backtrack on USB stick (I've been looking for these instructions for quite some time. No, I didn't want to use MySlax Creator.):

Make sure that the partition that you want to use for backtrack is marked as active in partition table.

This procedure can be followed for hard drive installation also. You would probably have another bootloader already installed on the hard drive. In that case you can just add an entry for BT.

documented on: by manu at Monday, November 06, 2006 2 comments

Not helpful urls 

The following articles do not contain helpful information on booting Debian/Linux from USB devices.

Howto Install a Debian GNU/Linux system onto a USB flash thumbdrive http://feraga.com/node/25 follow these 12 simple steps
Booting Linux off of a USB drive http://www.simonf.com/usb/ For Fedora Core, not for Debian
Boot and run Linux from a USB flash memory stick http://www.pendrivelinux.com/
Boot Debian from an USB device http://www.debian-administration.org/articles/446 it's about installing from an USB device. Sorry for the confusion.
Preparing Files for USB Memory Stick Booting http://www.debian.org/releases/stable/i386/ch04s04.html.en From Chapter 4. Obtaining System Installation Media, for install, not use Debian.
HOWTO: Boot from USB http://newsvac.newsforge.com/newsvac/06/01/17/0337237.shtml Read more at hddsaver.com — tell you to install USB puppy linux.

documented on: 2007.01.02