syslinux-3.08-2 sources from FC4
[bootcd.git] / syslinux / README.usbkey
1 $Id: README.usbkey,v 1.2 2004/12/30 23:31:14 hpa Exp $
2
3 The proper mode to boot a USB key drive in is "USB-HDD".  That is the
4 ONLY mode in which the C/H/S geometry encoded on the disk itself
5 doesn't have to match what the BIOS thinks it is.  Since geometry on
6 USB drives is completely arbitrary, and can vary from BIOS to BIOS,
7 this is the only mode which will work in general.
8
9 Some BIOSes have been reported (in particular, certain versions of the
10 Award BIOS) that cannot boot USB keys in "USB-HDD" mode.  This is a
11 very serious BIOS bug, but it is unfortunately rather typical of the
12 kind of quality we're seeing out of major BIOS vendors these days.  On
13 these BIOSes, you're generally stuck booting them in USB-ZIP mode.
14
15 THIS MEANS THE FILESYSTEM IMAGE ON THE DISK HAS TO HAVE A CORRECT
16 ZIPDRIVE-COMPATIBLE GEOMETRY.
17
18 A standard zipdrive (both the 100 MB and the 250 MB varieties) have a
19 "geometry" of 64 heads, 32 sectors, and are partitioned devices with a
20 single partition 4 (unlike most other media of this type which uses
21 partition 1.)  The 100 MB variety has 96 cylinders, and the 250 MB
22 variety has 239 cylinders; but any number of cylinders will do as
23 appropriate for the size device you have.  For example, if your device
24 reports when inserted into a Linux system:
25
26 usb-storage: device found at 4
27   Vendor: 32MB      Model: HardDrive         Rev: 1.88
28   Type:   Direct-Access                      ANSI SCSI revision: 02
29 SCSI device sda: 64000 512-byte hdwr sectors (33 MB)
30
31 ... you would have 64000/(64*32) = 31.25 cylinders; round down to 31.
32
33 The script "mkdiskimage" which is supplied with the syslinux
34 distribution can be used to initialize USB keys in a Zip-like fashion.
35 To do that, calculate the correct number of cylinders (31 in the
36 example above), and, if your USB key is /dev/sda (CHECK THE KERNEL
37 MESSAGES CAREFULLY - IF YOU ENTER THE WRONG DISK DRIVE IT CANNOT BE
38 RECOVERED), run:
39
40         mkdiskimage -4 /dev/sda 0 64 32
41
42 (The 0 means automatically determine the size of the device, and -4
43 means mimic a zipdisk by using partition 4.)
44
45 Then you should be able to run
46
47         syslinux /dev/sda4
48
49 ... and mount /dev/sda4 and put your files on it as needed.