summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorrnoland <rnoland@FreeBSD.org>2009-10-14 19:24:01 +0000
committerrnoland <rnoland@FreeBSD.org>2009-10-14 19:24:01 +0000
commit8dda941da3d89fa9cfb82ef6d4ef419f038fb381 (patch)
treeaa3bc92504c7655ab9aef9bebec2307102a3929b
parent43b02493d82ff4f5f5baf466dd0d838789dfaf9c (diff)
downloadFreeBSD-src-8dda941da3d89fa9cfb82ef6d4ef419f038fb381.zip
FreeBSD-src-8dda941da3d89fa9cfb82ef6d4ef419f038fb381.tar.gz
Set the active flag in the PMBR when we install bootcode on a GPT
partitioned disk. Some BIOS require this to be set before they will boot the device. Approved by: marcel MFC after: 2 weeks
-rw-r--r--sys/geom/part/g_part_gpt.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/sys/geom/part/g_part_gpt.c b/sys/geom/part/g_part_gpt.c
index 61f9c7a..f62b467 100644
--- a/sys/geom/part/g_part_gpt.c
+++ b/sys/geom/part/g_part_gpt.c
@@ -382,6 +382,9 @@ g_part_gpt_bootcode(struct g_part_table *basetable, struct g_part_parms *gpp)
codesz = MIN(codesz, gpp->gpp_codesize);
if (codesz > 0)
bcopy(gpp->gpp_codeptr, table->mbr, codesz);
+
+ /* Mark the PMBR active since some BIOS require it */
+ table->mbr[DOSPARTOFF] = 0x80; /* status */
return (0);
}
OpenPOWER on IntegriCloud