> > I have a usb flash drive that I wish to reformat as an MS-DOS (FAT) file
> > system.  How do I do that on OpenBSD?
> 
> For interactive MBR edits you can use "fdisk -e sd0"
> You probably want to use "0C" for FAT32 with long file name support.

I recently bought several flash drives and tested them out on my friends' 
Windows machines and Macintoshes.  The factory-installed MBR partition 
tables vary dramatically between drives.  But if the drives are 
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      

When reformatting a drive, both Windows machines and Macintoshes produce 
identical partition tables for any given drive, so this clearly sets a 
precedent: the id entry in the table should be "0B" for maximum 
compatibility.

I did encounter something odd, though.  On every Macintosh-formatted 
drive, fsck_msdos complains that "FAT starts with odd byte sequence", and 
offers to fix the problem.  But regardless of whether or not I choose to 
fix it, the problem is still there the next time I run fsck_msdos.  Does 
anybody know what's going on?

Reply via email to