From owner-svn-src-all@FreeBSD.ORG Mon Jun 7 20:31:56 2010 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 10D04106566B; Mon, 7 Jun 2010 20:31:56 +0000 (UTC) (envelope-from ae@FreeBSD.org) Received: from svn.freebsd.org (unknown [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id DA8958FC08; Mon, 7 Jun 2010 20:31:55 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o57KVtaE084532; Mon, 7 Jun 2010 20:31:55 GMT (envelope-from ae@svn.freebsd.org) Received: (from ae@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o57KVtD7084530; Mon, 7 Jun 2010 20:31:55 GMT (envelope-from ae@svn.freebsd.org) Message-Id: <201006072031.o57KVtD7084530@svn.freebsd.org> From: "Andrey V. Elsukov" Date: Mon, 7 Jun 2010 20:31:55 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r208899 - stable/8/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: Mon, 07 Jun 2010 20:31:56 -0000 Author: ae Date: Mon Jun 7 20:31:55 2010 New Revision: 208899 URL: http://svn.freebsd.org/changeset/base/208899 Log: MFC r197608: 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 Dieter PR: kern/141235 Reviewed by: marcel Approved by: kib (mentor) Approved by: re (bz) Modified: stable/8/sys/geom/part/g_part_ebr.c Directory Properties: stable/8/sys/ (props changed) stable/8/sys/amd64/include/xen/ (props changed) stable/8/sys/cddl/contrib/opensolaris/ (props changed) stable/8/sys/contrib/dev/acpica/ (props changed) stable/8/sys/contrib/pf/ (props changed) stable/8/sys/dev/xen/xenpci/ (props changed) stable/8/sys/geom/sched/ (props changed) Modified: stable/8/sys/geom/part/g_part_ebr.c ============================================================================== --- stable/8/sys/geom/part/g_part_ebr.c Mon Jun 7 18:47:53 2010 (r208898) +++ stable/8/sys/geom/part/g_part_ebr.c Mon Jun 7 20:31:55 2010 (r208899) @@ -410,13 +410,13 @@ g_part_ebr_probe(struct g_part_table *ta goto out; /* - * The sector is all zeroes, except for the partition entries - * and some signatures or disk serial number. Those can be - * found in the 9 bytes immediately in front of the partition - * table. + * The sector is all zeroes, except for the partition entries, + * pseudo boot code and some signatures or disk serial number. + * The latter can be found in the 9 bytes immediately in front + * of the partition table. */ sum = 0; - for (index = 0; index < DOSPARTOFF - 9; index++) + for (index = 96; index < DOSPARTOFF - 9; index++) sum += buf[index]; if (sum != 0) goto out;