mirror of
https://git.FreeBSD.org/src.git
synced 2025-01-12 14:29:28 +00:00
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:
parent
6ff44ffc53
commit
2bcfa25df8
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=232889
@ -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
|
||||
|
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user