On Fri, Jul 06, 2007 at 03:26:26PM -0400, Matthew Szudzik wrote:
> > reformatted, then they will have MBR partition tables similar to the 
> > following. 
> > 
> > Disk: sd0   geometry: 492/64/32 [1007616 Sectors]
> > Offset: 0   Signature: 0xAA55
> >          Starting       Ending       LBA Info:
> >  #: id    C   H  S -    C   H  S [       start:      size   ]
> > ------------------------------------------------------------------------
> >  0: 0B    0   1 32 -  491  62  7 [          63:     1007496 ] Win95 FAT-32
> >  1: 00    0   0  0 -    0   0  0 [           0:           0 ] unused      
> >  2: 00    0   0  0 -    0   0  0 [           0:           0 ] unused      
> >  3: 00    0   0  0 -    0   0  0 [           0:           0 ] unused      
> 
> I'm still trying to put an MS-DOS (FAT32) file system on a usb flash drive 
> using OpenBSD--I never imagined that it would be so difficult.  Here's 
> where I'm stuck:
> 
> I've been trying to use fdisk to create MBR partition tables, but I can't 
> figure out how Windows (or Mac) chooses the values for the CHS 
> information.  I am assuming that the Windows and Mac formatting utilities 
> do it the "right" way, especially since they both choose exactly the same 
> values.  Can anybody help?
> 
> The best documentation I could find is
> 
>  http://ftp.bg.openbsd.org/OpenBSD/3.3/i386/INSTALL.pt
> 
> It claims that
> 
>  most new versions of FDISK start the first partition (primary or
>  extended) at cylinder 0, head 1, sector 1
> 
> where "FDISK" refers to the corresponding utility used by Windows, Mac, 
> etc. to write the MBR partition table.  But that clearly is not true.  
> After testing different drives on Windows and Mac, I have found that the 
> starting sector is usually near the end of the track (sector 32 in the 
> example above), rather than at sector 1.  Why?

An idea. Uninitiated, friday night, some liquor, but anyway...

It seems the partition always start on LBA 63. For many modern harddrives
that is the max number of heads. And for a drive with 63 heads it will
be Cylinder 0 Head 1 Sector 1 (since sectors start at 1, not 0).
On your flash drive with 32 fake heads LBA 63 becomes C/H/S 0/1/32.

Maybe someone has transformed the rule of skipping the first track
into skipping the first 63 sectors...

I do not remember why the first track is skipped. For the partition
table it is enough to skip the first sector. The LILO and grub
boot loaders can install themselves on the rest of the first
track. Does Windows do anything with the rest of the first track?

-- 

/ Raimo Niskanen, Erlang/OTP, Ericsson AB

Reply via email to