Module Name:    src
Committed By:   jakllsch
Date:           Thu Jan  6 17:42:10 UTC 2011

Modified Files:
        src/sbin/gpt: create.c

Log Message:
Use less bogus CHS addresses in PMBR.
With the ending head set at 0xff one machine I have will never leave
the initial startup screen if such a disk is present.  Additionally,
Wikipedia suggests without citiation that 254 is the maximium allowable
value for the head, and this seems to be the case.


To generate a diff of this commit:
cvs rdiff -u -r1.3 -r1.4 src/sbin/gpt/create.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sbin/gpt/create.c
diff -u src/sbin/gpt/create.c:1.3 src/sbin/gpt/create.c:1.4
--- src/sbin/gpt/create.c:1.3	Tue Dec 18 21:46:46 2007
+++ src/sbin/gpt/create.c	Thu Jan  6 17:42:10 2011
@@ -29,7 +29,7 @@
 __FBSDID("$FreeBSD: src/sbin/gpt/create.c,v 1.11 2005/08/31 01:47:19 marcel Exp $");
 #endif
 #ifdef __RCSID
-__RCSID("$NetBSD: create.c,v 1.3 2007/12/18 21:46:46 riz Exp $");
+__RCSID("$NetBSD: create.c,v 1.4 2011/01/06 17:42:10 jakllsch Exp $");
 #endif
 
 #include <sys/types.h>
@@ -100,11 +100,11 @@
 		mbr = gpt_read(fd, 0LL, 1);
 		bzero(mbr, sizeof(*mbr));
 		mbr->mbr_sig = htole16(MBR_SIG);
-		mbr->mbr_part[0].part_shd = 0xff;
-		mbr->mbr_part[0].part_ssect = 0xff;
-		mbr->mbr_part[0].part_scyl = 0xff;
+		mbr->mbr_part[0].part_shd = 0x00;
+		mbr->mbr_part[0].part_ssect = 0x02;
+		mbr->mbr_part[0].part_scyl = 0x00;
 		mbr->mbr_part[0].part_typ = 0xee;
-		mbr->mbr_part[0].part_ehd = 0xff;
+		mbr->mbr_part[0].part_ehd = 0xfe;
 		mbr->mbr_part[0].part_esect = 0xff;
 		mbr->mbr_part[0].part_ecyl = 0xff;
 		mbr->mbr_part[0].part_start_lo = htole16(1);

Reply via email to