Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 14 Oct 2009 19:24:01 +0000 (UTC)
From:      Robert Noland <rnoland@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r198097 - head/sys/geom/part
Message-ID:  <200910141924.n9EJO1YM046579@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: rnoland
Date: Wed Oct 14 19:24:01 2009
New Revision: 198097
URL: http://svn.freebsd.org/changeset/base/198097

Log:
  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

Modified:
  head/sys/geom/part/g_part_gpt.c

Modified: head/sys/geom/part/g_part_gpt.c
==============================================================================
--- head/sys/geom/part/g_part_gpt.c	Wed Oct 14 18:50:43 2009	(r198096)
+++ head/sys/geom/part/g_part_gpt.c	Wed Oct 14 19:24:01 2009	(r198097)
@@ -382,6 +382,9 @@ g_part_gpt_bootcode(struct g_part_table 
 	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);
 }
 



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200910141924.n9EJO1YM046579>