Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 29 Sep 2009 09:18:11 -0700
From:      Marcel Moolenaar <xcllnt@mac.com>
To:        John Baldwin <jhb@freebsd.org>
Cc:        svn-src-head@freebsd.org, svn-src-all@freebsd.org, Marcel Moolenaar <marcel@freebsd.org>, src-committers@freebsd.org
Subject:   Re: svn commit: r197608 - head/sys/geom/part
Message-ID:  <1F22EA6A-2793-45CE-9669-3FFD550CF4E2@mac.com>
In-Reply-To: <200909290749.08764.jhb@freebsd.org>
References:  <200909282352.n8SNql1n069970@svn.freebsd.org> <200909290749.08764.jhb@freebsd.org>

next in thread | previous in thread | raw e-mail | index | archive | help

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@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@mac.com






Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?1F22EA6A-2793-45CE-9669-3FFD550CF4E2>