USB drive geometry and booting from USB
Posted: 14 April 2007 09:29 AM  
Ace
Total Posts:  1337
Joined 

I’d read that booting from USB was a hit and miss affair.
I’ve now had direct experience with this.
Using a package called larch, I created a ‘live’ image of Arch linux on a USB stick.
That stick (Stick#1) successfully boots on my IBM Thinkpad T40.
However, I tried to boot my VIA EPIA N10000 with it and it wouldn’t work.
I did, however, have another USB stick (Stick#2) and that one successfully boots on both the N10000 and the T40.
So I thought I’d look into it further.

Stick#1:

Disk /dev/sda1031 MB1031798784 bytes
32 heads
62 sectors/track1015 cylinders
Units 
cylinders of 1984 512 1015808 bytes

   Device Boot      Start         End      Blocks   Id  System
/dev/sda1   *           1        1015     1006849    e  W95 FAT16 (LBA)

Stick#2:

Disk /dev/sda1026 MB1026555392 bytes
64 heads
32 sectors/track978 cylinders
Units 
cylinders of 2048 512 1048576 bytes

   Device Boot      Start         End      Blocks   Id  System
/dev/sda1   *           1         978     1001456    e  W95 FAT16 (LBA)

So it appears my N10000 will not boot 32 heads with 62 sectors but will boot 64 heads with 32 sectors.
Both USB sticks boot on my (soon to be sold) Alienware Area-51 m5550 but both return a syslinux error about not being able to find the kernel image.
Hmmm, interesting.
Anyone had any similar experiences?

 Signature 

Reflex is a twat

Profile
 
 
Posted: 14 April 2007 12:54 PM   [ # 1 ]  
Veteran
Total Posts:  377
Joined 

I had all sorts of USB boot issues with older Shuttle boxes (SK41G). The only thing that worked was to
format using HP’s formatting tool: ftp://ftp.compaq.com/pub/softpaq/sp27001-27500/SP27213.exe

I then used fdisk to analyize what the HP tool did. Turns out it uses 255 heads! Apparently, the BIOS
code recognizes a USB stick as a bootable ‘hard drive’ only if it has a specific geometry. Very wierd!

Profile
 
 
Posted: 14 April 2007 05:58 PM   [ # 2 ]  
Ace
Total Posts:  1337
Joined 

Wierd indeed.  H. Peter Andran’s web site mentions that there is no USB boot BIOS-standard and certain BIOSes only recognise certain geometries.

Interesting point about HP’s ‘tool’.  A GUI front end for cfdisk or fdisk perhaps?

 Signature 

Reflex is a twat

Profile
 
 
Posted: 14 April 2007 06:35 PM   [ # 3 ]  
Veteran
Total Posts:  377
Joined 
Shagbag - 14 April 2007 05:58 PM

Wierd indeed.  H. Peter Andran’s web site mentions that there is no USB boot BIOS-standard and certain BIOSes only recognise certain geometries.

Interesting point about HP’s ‘tool’.  A GUI front end for cfdisk or fdisk perhaps?

Given Linux’s tendency to make USB drives SCSI devices, it might be more along the line of sfdisk, not that the distinction is really that great.
I don’t really know what happens under Windows XP these days with regards to ‘real’ SCSI devices and SCSI like devices such as a USB drive.
Under Windows 2K, there used to be an API for doing your SCSI device manipulation (ASPI).

Or, maybe, HP’s tool just uses some other API and doesn’t even treat USB drives as SCSI style devices. It’s the geometry that’s the issue and it
sure would be nice if we had a master listing of supported geometries per BIOS. See the wonderful “unavailable information” you get with
closed source? I’m going to check into the open source BIOS that’s being developed: http://linuxbios.org/Welcome_to_LinuxBIOS

Profile
 
 
Posted: 15 April 2007 04:47 AM   [ # 4 ]  
Ace
Total Posts:  1337
Joined 

Well, I think I’ve narrowed down my options.

Bytes    Bytes/Sector    Sectors    C    H    S    N10000        Thinkpad
1
,026,555,392    512    2,004,991    1,010    32    62.04    No        Yes
1
,025,966,080    512    2,003,840    1,010    48    41.33    No    Not recognised    
1
,019,934,720    512    1,992,060    126    255    62    No    Not recognised    No
1
,023,590,400    512    1,999,200    245    255    32    Yes        No
1
,023,590,400    512    1,999,200    245    170    48    No    Boot error    
1
,023,590,400    512    1,999,200    245    204    40    No    Boot error    
1
,025,095,680    512    2,002,140    245    227    36    No    Boot error    
1
,025,507,328    512    2,002,944    489    128    32    Yes

As the above table shows, it appears that the BIOS in my N10000 doesn’t like anything more that 32 sectors per track, which is no good as my Thinkpad doesn’t like that figure :(
It seems I have no choice but to maintain multiple USBs.  An unappealing situation but at least with the ease of reinstalling a custom live image with larch, it’s a inconvenience not a non-starter.

 Signature 

Reflex is a twat

Profile
 
 
Posted: 15 April 2007 07:28 AM   [ # 5 ]  
Ace
Total Posts:  11331
Joined 
NorthBear - 14 April 2007 12:54 PM

I had all sorts of USB boot issues with older Shuttle boxes (SK41G). The only thing that worked was to
format using HP’s formatting tool: ftp://ftp.compaq.com/pub/softpaq/sp27001-27500/SP27213.exe

I then used fdisk to analyize what the HP tool did. Turns out it uses 255 heads! Apparently, the BIOS
code recognizes a USB stick as a bootable ‘hard drive’ only if it has a specific geometry. Very wierd!

Having delt with USB Boot on these machines I can say definitively that it does work with Windows(XP Embedded), but the USB performance is extremely poor.  So poor that if there are any aspects of the boot process that have a chance of timing out it may cause a failure.  I can’t speak to how that would impact Linux, but it is certainly something we had to deal with in XP.

Profile
 
 
Posted: 27 January 2010 01:42 AM   [ # 6 ]  
Green
Total Posts:  3
Joined  2010-01-27

A computer’s central processor can only execute program code found in Read-Only Memory (ROM) and Random Access Memory (RAM).646-046 Modern operating systems and application program code and data are stored on nonvolatile data storage devices, such as hard disk drives, CD, DVD, USB flash drive,646-363 and floppy disk. When a computer is first powered on, it does not have an operating system in ROM or RAM. The computer must initially,70-432 execute a small program stored in ROM along with the bare minimum of data needed to access the nonvolatile devices from which the operating system programs and data are loaded into RAM.

Profile