Make sure when creating new MBR partition it is set to active by default.

Submitted by:	kris
Obtained from:	PC-BSD
This commit is contained in:
Josh Paetzel 2012-03-12 20:41:36 +00:00
parent 6ff44ffc53
commit 2bcfa25df8
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=232889
2 changed files with 7 additions and 2 deletions

View File

@ -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

View File

@ -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