Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 19 Mar 2012 23:04:21 +0000 (UTC)
From:      Josh Paetzel <jpaetzel@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org
Subject:   svn commit: r233220 - in stable/9/usr.sbin/pc-sysinstall: backend backend-partmanager
Message-ID:  <201203192304.q2JN4L7C090786@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: jpaetzel
Date: Mon Mar 19 23:04:21 2012
New Revision: 233220
URL: http://svn.freebsd.org/changeset/base/233220

Log:
  MFC: 232889
  
  Make sure when creating new MBR partition it is set to active by default.
  
  Submitted by:	kmoore
  Obtained from:	PC-BSD

Modified:
  stable/9/usr.sbin/pc-sysinstall/backend-partmanager/create-part.sh
  stable/9/usr.sbin/pc-sysinstall/backend/functions-disk.sh
Directory Properties:
  stable/9/usr.sbin/pc-sysinstall/   (props changed)

Modified: stable/9/usr.sbin/pc-sysinstall/backend-partmanager/create-part.sh
==============================================================================
--- stable/9/usr.sbin/pc-sysinstall/backend-partmanager/create-part.sh	Mon Mar 19 22:59:19 2012	(r233219)
+++ stable/9/usr.sbin/pc-sysinstall/backend-partmanager/create-part.sh	Mon Mar 19 23:04:21 2012	(r233220)
@@ -86,7 +86,12 @@ fi
 # If this is an empty disk, see if we need to create a new scheme for it
 gpart show ${DISK} >/dev/null 2>/dev/null
 if [ $? -eq 0 -a "${SLICENUM}" = "1" ] ; then
- gpart create -s ${TYPE} ${DISK}
+  if [ "${TYPE}" = "mbr" -o "${TYPE}" = "MBR" ] ; then 
+    flags="-s ${TYPE} -f active"
+  else
+    flags="-s ${TYPE}"
+  fi
+  gpart create ${flags} ${DISK}
 fi
 
 # If we have a starting block, use it

Modified: stable/9/usr.sbin/pc-sysinstall/backend/functions-disk.sh
==============================================================================
--- stable/9/usr.sbin/pc-sysinstall/backend/functions-disk.sh	Mon Mar 19 22:59:19 2012	(r233219)
+++ stable/9/usr.sbin/pc-sysinstall/backend/functions-disk.sh	Mon Mar 19 23:04:21 2012	(r233220)
@@ -641,7 +641,7 @@ init_mbr_full_disk()
   sleep 2
 
   echo_log "Running gpart on ${_intDISK}"
-  rc_halt "gpart create -s mbr ${_intDISK}"
+  rc_halt "gpart create -s mbr -f active ${_intDISK}"
 
   # Lets figure out disk size in blocks
   # Get the cyl of this disk



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