Difference between revisions of "Doc/usbkey"

From Syslinux Wiki
Jump to: navigation, search
(The content of doc/usbkey.txt (release 3.72))
 
m (Wiki formatting.)
 
Line 1: Line 1:
 
[[Category:Release Documentation]]
 
[[Category:Release Documentation]]
''The content of doc/usbkey.txt (release 3.72):''
+
''The content of doc/usbkey.txt (release 6.04-pre1) with minor modifications:''
  
The proper mode to boot a USB key drive in is "USB-HDD".  That is the ONLY mode in which the C/H/S geometry encoded on the disk itself doesn't have to match what the BIOS thinks it is.  Since geometry on USB drives is completely arbitrary, and can vary from BIOS to BIOS, this is the only mode which will work in general.
+
----
  
Some BIOSes have been reported (in particular, certain versions of the Award BIOS) that cannot boot USB keys in "USB-HDD" modeThis is a very serious BIOS bug, but it is unfortunately rather typical of the kind of quality we're seeing out of major BIOS vendors these daysOn these BIOSes, you're generally stuck booting them in USB-ZIP mode.
+
The proper mode to boot a USB key drive in is "USB-HDD".  That is the  
 +
ONLY mode in which the C/H/S geometry encoded on the disk itself
 +
doesn't have to match what the BIOS thinks it isSince geometry on
 +
USB drives is completely arbitrary, and can vary from BIOS to BIOS,
 +
this is the only mode which will work in general.
  
'''THIS MEANS THE FILESYSTEM IMAGE ON THE DISK HAS TO HAVE A CORRECT ZIPDRIVE-COMPATIBLE GEOMETRY.'''
+
Some BIOSes have been reported (in particular, certain versions of the
 +
Award BIOS) that cannot boot USB keys in "USB-HDD" mode.  This is a
 +
very serious BIOS bug, but it is unfortunately rather typical of the
 +
kind of quality we're seeing out of major BIOS vendors these days.  On
 +
these BIOSes, you're generally stuck booting them in USB-ZIP mode.
  
A standard zipdrive (both the 100 MB and the 250 MB varieties) have a "geometry" of 64 heads, 32 sectors, and are partitioned devices with a single partition 4 (unlike most other media of this type which uses partition 1.)  The 100 MB variety has 96 cylinders, and the 250 MB variety has 239 cylinders; but any number of cylinders will do as appropriate for the size device you have.  For example, if your device reports when inserted into a Linux system:
+
<strong>THIS MEANS THE FILESYSTEM IMAGE ON THE DISK HAS TO HAVE A CORRECT
<pre>
+
ZIPDRIVE-COMPATIBLE GEOMETRY.</strong>
 +
 
 +
A standard zipdrive (both the 100 MB and the 250 MB varieties) have a  
 +
"geometry" of 64 heads, 32 sectors, and are partitioned devices with a  
 +
single partition 4 (unlike most other media of this type which uses  
 +
partition 1). The 100 MB variety has 96 cylinders, and the 250 MB  
 +
variety has 239 cylinders; but any number of cylinders will do as  
 +
appropriate for the size device you have.  For example, if your device  
 +
reports when inserted into a Linux system:
 +
{|
 +
|<pre>
 
usb-storage: device found at 4
 
usb-storage: device found at 4
 
   Vendor: 32MB      Model: HardDrive        Rev: 1.88
 
   Vendor: 32MB      Model: HardDrive        Rev: 1.88
Line 15: Line 33:
 
SCSI device sda: 64000 512-byte hdwr sectors (33 MB)
 
SCSI device sda: 64000 512-byte hdwr sectors (33 MB)
 
</pre>
 
</pre>
 +
|}
 
... you would have 64000/(64*32) = 31.25 cylinders; round down to 31.
 
... you would have 64000/(64*32) = 31.25 cylinders; round down to 31.
  
The script "<tt>mkdiskimage</tt>" which is supplied with the syslinux distribution can be used to initialize USB keys in a Zip-like fashion. To do that, calculate the correct number of cylinders (31 in the example above), and, if your USB key is <tt>/dev/sda</tt> ('''CHECK THE KERNEL MESSAGES CAREFULLY - IF YOU ENTER THE WRONG DISK DRIVE IT CANNOT BE RECOVERED'''), run:
+
The script "<tt>mkdiskimage</tt>", which is supplied with the Syslinux
 +
distribution, can be used to initialize USB keys in a Zip-like fashion.  
 +
To do that, calculate the correct number of cylinders (31 in the  
 +
example above), and, if your USB key is "<tt>/dev/sda</tt>" (<strong>CHECK THE KERNEL  
 +
MESSAGES CAREFULLY - IF YOU ENTER THE WRONG DISK DRIVE IT CANNOT BE  
 +
RECOVERED</strong>), run:
 
<pre>
 
<pre>
 
mkdiskimage -4 /dev/sda 0 64 32
 
mkdiskimage -4 /dev/sda 0 64 32
 
</pre>
 
</pre>
(The 0 means automatically determine the size of the device, and -4 means mimic a zipdisk by using partition 4.)
+
(The 0 means automatically determine the size of the device, and {{nowrap|1=-4}}
 +
means mimic a zipdisk by using partition 4.)
  
 
Then you should be able to run
 
Then you should be able to run
Line 27: Line 52:
 
syslinux /dev/sda4
 
syslinux /dev/sda4
 
</pre>
 
</pre>
... and mount <tt>/dev/sda4</tt> and put your files on it as needed.
+
... and mount "<tt>/dev/sda4</tt>" and put your files on it as needed.

Latest revision as of 17:24, 12 October 2020

The content of doc/usbkey.txt (release 6.04-pre1) with minor modifications:


The proper mode to boot a USB key drive in is "USB-HDD". That is the ONLY mode in which the C/H/S geometry encoded on the disk itself doesn't have to match what the BIOS thinks it is. Since geometry on USB drives is completely arbitrary, and can vary from BIOS to BIOS, this is the only mode which will work in general.

Some BIOSes have been reported (in particular, certain versions of the Award BIOS) that cannot boot USB keys in "USB-HDD" mode. This is a very serious BIOS bug, but it is unfortunately rather typical of the kind of quality we're seeing out of major BIOS vendors these days. On these BIOSes, you're generally stuck booting them in USB-ZIP mode.

THIS MEANS THE FILESYSTEM IMAGE ON THE DISK HAS TO HAVE A CORRECT ZIPDRIVE-COMPATIBLE GEOMETRY.

A standard zipdrive (both the 100 MB and the 250 MB varieties) have a "geometry" of 64 heads, 32 sectors, and are partitioned devices with a single partition 4 (unlike most other media of this type which uses partition 1). The 100 MB variety has 96 cylinders, and the 250 MB variety has 239 cylinders; but any number of cylinders will do as appropriate for the size device you have. For example, if your device reports when inserted into a Linux system:

usb-storage: device found at 4
  Vendor: 32MB      Model: HardDrive         Rev: 1.88
  Type:   Direct-Access                      ANSI SCSI revision: 02
SCSI device sda: 64000 512-byte hdwr sectors (33 MB)

... you would have 64000/(64*32) = 31.25 cylinders; round down to 31.

The script "mkdiskimage", which is supplied with the Syslinux distribution, can be used to initialize USB keys in a Zip-like fashion. To do that, calculate the correct number of cylinders (31 in the example above), and, if your USB key is "/dev/sda" (CHECK THE KERNEL MESSAGES CAREFULLY - IF YOU ENTER THE WRONG DISK DRIVE IT CANNOT BE RECOVERED), run:

mkdiskimage -4 /dev/sda 0 64 32

(The 0 means automatically determine the size of the device, and -4 means mimic a zipdisk by using partition 4.)

Then you should be able to run

syslinux /dev/sda4

... and mount "/dev/sda4" and put your files on it as needed.