#2889 NORM Untriag: OFW chokes on disks with bogus BIOS Parameter Blocks

Zarro Boogs per Child bugtracker at laptop.org
Fri Aug 17 17:18:37 EDT 2007


#2889: OFW chokes on disks with bogus BIOS Parameter Blocks
---------------------------------+------------------------------------------
 Reporter:  wmb at firmworks.com    |       Owner:  wmb at firmworks.com
     Type:  defect               |      Status:  new              
 Priority:  normal               |   Milestone:  Untriaged        
Component:  ofw - open firmware  |     Version:                   
 Keywords:                       |    Verified:  0                
---------------------------------+------------------------------------------
 OFW can handle FAT file systems on both unpartitioned media and
 partitioned media.  Unpartitioned media has the BPB (BIOS Parameter Block
 - essentially the "super block" for FAT) at the beginning of sector 0,
 whereas partitioned media has a partitioned media has a partition map at
 the end of sector 0, and the BPB is at the beginning of the first sector
 inside the partition.

 So far so good; OFW handles these cases...  However, if the disk is
 partitioned in the usual way, with the FAT file system in the partition,
 AND it also has a spurious BPB at the beginning of sector 0, OFW won't
 read the filesystem.  OFW sees the sector0 BPB and treats the disk as
 unpartitioned, so it looks in the wrong places for the various FAT data
 structures.

 I have seen such a disk; the Linux tools "fdisk" and "mkdosfs" can easily
 create inconsistent disk layouts like this, and both Linux and Windows
 seem to handle them without complaint.  I think the key mistake is to
 apply "mkdosfs" to the raw disk (/dev/sda instead of /dev/sda1), then use
 fdisk to add a partition, then use mkdosfs again with /dev/sda1.

-- 
Ticket URL: <https://dev.laptop.org/ticket/2889>
One Laptop Per Child <http://laptop.org/>



More information about the Bugs mailing list