diff options
author | Stephen Hemminger <shemminger@vyatta.com> | 2011-04-29 11:33:32 -0700 |
---|---|---|
committer | Stephen Hemminger <stephen.hemminger@vyatta.com> | 2011-04-30 09:48:39 -0700 |
commit | b2fcc3d68146716f4451e45d7dc86418b67781bb (patch) | |
tree | 37a6167a0b98beacc6ab8fbee042bdc6f3810d4d | |
parent | d9771072a27f15aff8fba6a709fdc83890b954cc (diff) | |
download | vyatta-cfg-quagga-b2fcc3d68146716f4451e45d7dc86418b67781bb.tar.gz vyatta-cfg-quagga-b2fcc3d68146716f4451e45d7dc86418b67781bb.zip |
Fix alignment of root partition
Redo Bug 7038
The previous change did nothing; the alignment option only reports
alignment, it does not change values. Need to manually reserve space
before root partition.
-rwxr-xr-x | scripts/install-system | 9 | ||||
-rwxr-xr-x | scripts/install/install-get-partition | 3 |
2 files changed, 9 insertions, 3 deletions
diff --git a/scripts/install-system b/scripts/install-system index 99782fb1..3d7ab5ee 100755 --- a/scripts/install-system +++ b/scripts/install-system @@ -77,6 +77,9 @@ PARTITION='' # default file system type ROOT_FSTYPE="ext3" +# alignment of root partition (skip to 32Kb boundary) +ROOT_OFFSET="63S" + # Process ID of this script for the lame marketing spinner SPID=$$ @@ -868,7 +871,7 @@ create_partitions() { # make the root partition # align at optimal block boundary - output=$(parted -s -a optimal /dev/$ldrive mkpart primary $start_offset $root_part_size) + output=$(parted -s /dev/$ldrive mkpart primary $start_offset $root_part_size) status=$? if [ "$status" != 0 ]; then echo -e "Error creating primary partition on $ldrive.\nPlease see $INSTALL_LOG for more details.\nExiting..." @@ -1278,7 +1281,7 @@ setup_method_auto() { echo # now take the data and create the partitions - create_partitions "$INSTALL_DRIVE" "$ROOT_PARTITION_SIZE" 0 "yes" + create_partitions "$INSTALL_DRIVE" "$ROOT_PARTITION_SIZE" "$ROOT_OFFSET" "yes" # mark data partition as bootable echo "Marking /dev/$INSTALL_DRIVE partition 1 as bootable" >> $INSTALL_LOG parted -s /dev/$INSTALL_DRIVE set 1 boot on >> $INSTALL_LOG 2>&1 @@ -1540,7 +1543,7 @@ elif [ "$INSTALL_METHOD" == "vyatta" ]; then echo "deleting partitions on $INSTALL_DRIVE" delete_partitions "$INSTALL_DRIVE" echo "creating config partition" - create_partitions "$INSTALL_DRIVE" "$ROOT_PARTITION_SIZE" 0 "yes" + create_partitions "$INSTALL_DRIVE" "$ROOT_PARTITION_SIZE" "$ROOT_OFFSET" "yes" # mark data partition as bootable echo "Marking /dev/$INSTALL_DRIVE partition 1 as bootable" >> $INSTALL_LOG parted -s /dev/$INSTALL_DRIVE set 1 boot on >> $INSTALL_LOG 2>&1 diff --git a/scripts/install/install-get-partition b/scripts/install/install-get-partition index f475b689..e8ccb153 100755 --- a/scripts/install/install-get-partition +++ b/scripts/install/install-get-partition @@ -34,6 +34,9 @@ PARTITION='' # default file system type ROOT_FSTYPE='ext3' +# alignment of root partition (skip to 32Kb boundary) +ROOT_OFFSET="63S" + warn_of_dire_consequences () { # Give the user a requisite warning that we are about to nuke their drive response='' |