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
This commit is contained in:
rnoland 2009-10-14 19:24:01 +00:00
parent 43b02493d8
commit 8dda941da3

View File

@ -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);
}