From owner-svn-src-all@FreeBSD.ORG Tue Sep 29 16:18:26 2009 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 85D0E106566C; Tue, 29 Sep 2009 16:18:26 +0000 (UTC) (envelope-from xcllnt@mac.com) Received: from asmtpout029.mac.com (asmtpout029.mac.com [17.148.16.104]) by mx1.freebsd.org (Postfix) with ESMTP id 6CD098FC1C; Tue, 29 Sep 2009 16:18:26 +0000 (UTC) MIME-version: 1.0 Content-transfer-encoding: 7BIT Content-type: text/plain; charset=us-ascii; format=flowed; delsp=yes Received: from macbook-pro.jnpr.net (natint3.juniper.net [66.129.224.36]) by asmtp029.mac.com (Sun Java(tm) System Messaging Server 6.3-8.01 (built Dec 16 2008; 32bit)) with ESMTPSA id <0KQQ0098TQMBYL50@asmtp029.mac.com>; Tue, 29 Sep 2009 09:18:26 -0700 (PDT) From: Marcel Moolenaar In-reply-to: <200909290749.08764.jhb@freebsd.org> Date: Tue, 29 Sep 2009 09:18:11 -0700 Message-id: <1F22EA6A-2793-45CE-9669-3FFD550CF4E2@mac.com> References: <200909282352.n8SNql1n069970@svn.freebsd.org> <200909290749.08764.jhb@freebsd.org> To: John Baldwin X-Mailer: Apple Mail (2.1076) Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, Marcel Moolenaar , src-committers@freebsd.org Subject: Re: svn commit: r197608 - head/sys/geom/part X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 29 Sep 2009 16:18:26 -0000 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 >> 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