From 713444a957016eece080b6779f1ead51d3da90a9 Mon Sep 17 00:00:00 2001 From: Robert Noland Date: Fri, 30 Oct 2009 15:45:00 +0000 Subject: [PATCH] MFC r198097 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. --- sys/geom/part/g_part_gpt.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/sys/geom/part/g_part_gpt.c b/sys/geom/part/g_part_gpt.c index 61f9c7aa257..f62b46774f5 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); }