diff options
author | rnoland <rnoland@FreeBSD.org> | 2009-10-14 19:24:01 +0000 |
---|---|---|
committer | rnoland <rnoland@FreeBSD.org> | 2009-10-14 19:24:01 +0000 |
commit | 8dda941da3d89fa9cfb82ef6d4ef419f038fb381 (patch) | |
tree | aa3bc92504c7655ab9aef9bebec2307102a3929b /sys/geom | |
parent | 43b02493d82ff4f5f5baf466dd0d838789dfaf9c (diff) | |
download | FreeBSD-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
Diffstat (limited to 'sys/geom')
-rw-r--r-- | sys/geom/part/g_part_gpt.c | 3 |
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); } |