misc/151967: src: usr.sbin/pc-sysinstall - Add support 4k partition
alignment
Kris Moore
kmoore at FreeBSD.org
Fri Nov 5 16:30:10 UTC 2010
>Number: 151967
>Category: misc
>Synopsis: src: usr.sbin/pc-sysinstall - Add support 4k partition alignment
>Confidential: no
>Severity: non-critical
>Priority: low
>Responsible: freebsd-bugs
>State: open
>Quarter:
>Keywords:
>Date-Required:
>Class: sw-bug
>Submitter-Id: current-users
>Arrival-Date: Fri Nov 05 16:30:09 UTC 2010
>Closed-Date:
>Last-Modified:
>Originator: Kris Moore
>Release: 9.0-Current
>Organization:
PC-BSD / iXsystems
>Environment:
9.0-Current
>Description:
After talking to pjd@, jpaetzel@ and a few others at MeetBSD, the fix to getting proper alignment on 4K drives seems to be changing our starting block to "64" when doing a full-disk installation or creating the first partition. The attached patch fixes this.
>How-To-Repeat:
>Fix:
Attached patch fixes the issue in pc-sysinstall
Patch attached with submission follows:
diff -ruN src.o/usr.sbin/pc-sysinstall/backend/functions-disk.sh src/usr.sbin/pc-sysinstall/backend/functions-disk.sh
--- src.o/usr.sbin/pc-sysinstall/backend/functions-disk.sh 2010-11-05 12:05:57.066860900 -0400
+++ src/usr.sbin/pc-sysinstall/backend/functions-disk.sh 2010-11-05 12:11:43.416538580 -0400
@@ -562,6 +562,8 @@
init_gpt_full_disk()
{
_intDISK=$1
+
+ startblock="64"
# Set our sysctl so we can overwrite any geom using drives
sysctl kern.geom.debugflags=16 >>${LOGOUT} 2>>${LOGOUT}
@@ -580,7 +582,7 @@
echo_log "Running gpart on ${_intDISK}"
rc_halt "gpart create -s GPT ${_intDISK}"
- rc_halt "gpart add -b 34 -s 128 -t freebsd-boot ${_intDISK}"
+ rc_halt "gpart add -b ${startblock} -s 128 -t freebsd-boot ${_intDISK}"
echo_log "Stamping boot sector on ${_intDISK}"
rc_halt "gpart bootcode -b /boot/pmbr ${_intDISK}"
@@ -593,7 +595,7 @@
_intDISK=$1
_intBOOT=$2
- startblock="63"
+ startblock="64"
# Set our sysctl so we can overwrite any geom using drives
sysctl kern.geom.debugflags=16 >>${LOGOUT} 2>>${LOGOUT}
@@ -763,7 +765,7 @@
# Lets get the starting block first
if [ "${slicenum}" = "1" ]
then
- startblock="63"
+ startblock="64"
else
# Lets figure out where the prior slice ends
checkslice="`expr ${slicenum} - 1`"
diff -ruN src.o/usr.sbin/pc-sysinstall/backend-partmanager/create-part.sh src/usr.sbin/pc-sysinstall/backend-partmanager/create-part.sh
--- src.o/usr.sbin/pc-sysinstall/backend-partmanager/create-part.sh 2010-11-05 12:05:56.876842879 -0400
+++ src/usr.sbin/pc-sysinstall/backend-partmanager/create-part.sh 2010-11-05 12:25:50.192031927 -0400
@@ -69,7 +69,7 @@
# Lets get the starting block
if [ "${SLICENUM}" = "1" ] ; then
- STARTBLOCK="63"
+ STARTBLOCK="64"
else
# Lets figure out where the prior slice ends
checkslice="`expr ${SLICENUM} - 1`"
>Release-Note:
>Audit-Trail:
>Unformatted:
More information about the freebsd-bugs
mailing list