Module Name: src Committed By: jakllsch Date: Wed Dec 4 19:59:47 UTC 2013
Modified Files: src/sbin/gpt: migrate.c Log Message: Mirror my changes of src/sbin/gpt/create.c 1.4 in migrate.c; 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.12 -r1.13 src/sbin/gpt/migrate.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/migrate.c diff -u src/sbin/gpt/migrate.c:1.12 src/sbin/gpt/migrate.c:1.13 --- src/sbin/gpt/migrate.c:1.12 Wed Nov 13 21:25:40 2013 +++ src/sbin/gpt/migrate.c Wed Dec 4 19:59:47 2013 @@ -29,7 +29,7 @@ __FBSDID("$FreeBSD: src/sbin/gpt/migrate.c,v 1.16 2005/09/01 02:42:52 marcel Exp $"); #endif #ifdef __RCSID -__RCSID("$NetBSD: migrate.c,v 1.12 2013/11/13 21:25:40 christos Exp $"); +__RCSID("$NetBSD: migrate.c,v 1.13 2013/12/04 19:59:47 jakllsch Exp $"); #endif #include <sys/types.h> @@ -430,11 +430,11 @@ migrate(int fd) * Turn the MBR into a Protective MBR. */ bzero(mbr->mbr_part, sizeof(mbr->mbr_part)); - 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);