Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sbin/gpt Use less bogus CHS addresses in PMBR.
details: https://anonhg.NetBSD.org/src/rev/9f9d81dcbb8b
branches: trunk
changeset: 760523:9f9d81dcbb8b
user: jakllsch <jakllsch%NetBSD.org@localhost>
date: Thu Jan 06 17:42:10 2011 +0000
description:
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.
diffstat:
sbin/gpt/create.c | 10 +++++-----
1 files changed, 5 insertions(+), 5 deletions(-)
diffs (28 lines):
diff -r 8ac9f8c7ba39 -r 9f9d81dcbb8b sbin/gpt/create.c
--- a/sbin/gpt/create.c Thu Jan 06 17:22:14 2011 +0000
+++ b/sbin/gpt/create.c Thu Jan 06 17:42:10 2011 +0000
@@ -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);
Home |
Main Index |
Thread Index |
Old Index