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.
This commit is contained in:
Robert Noland 2009-10-30 15:45:00 +00:00
parent e4692ffe5b
commit 713444a957

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