svn commit: r197608 - head/sys/geom/part

Marcel Moolenaar xcllnt at mac.com
Tue Sep 29 16:18:26 UTC 2009


On Sep 29, 2009, at 4:49 AM, John Baldwin wrote:

> On Monday 28 September 2009 7:52:47 pm Marcel Moolenaar wrote:
>> Author: marcel
>> Date: Mon Sep 28 23:52:47 2009
>> New Revision: 197608
>> URL: http://svn.freebsd.org/changeset/base/197608
>>
>> Log:
>>  The first 96 bytes may not be zeroes. It can contain trivial boot
>>  code that merely emits an error and waits for a key press before
>>  rebooting. The error being that extended partitions are not
>>  bootable. The origin is presumed to be Windows 2000; Windows XP
>>  does not do this...
>>
>>  For now, ignore the first 96 bytes when checking that the EBR is
>>  (for the most part) all zeroes.
>>
>>  Tested by:	Mario Lobo <mlobo at digiart.art.br>
>>  MFC after:	1 week
>>
>> Modified:
>>  head/sys/geom/part/g_part_ebr.c
>
> Why do you check for zeros at all?  AFAIK, the only real check is  
> for AA55 at
> the end of the sector (and having an MBR or other Extended MBR  
> partition
> entry point at the sector in question).  The '96' thing seems rather
> arbitrary in the code, and I think the zero's check is overly  
> restrictive.

Only checking for a signature that 99% of the boot blocks
have isn't enough. The msdos file system has that signature
and the check for all-zeroes is to prevent false positives
there.

-- 
Marcel Moolenaar
xcllnt at mac.com





More information about the svn-src-head mailing list