diff options
author | Kim <kim.sidney@gmail.com> | 2018-02-22 11:40:47 +0100 |
---|---|---|
committer | UnicronNL <kim.sidney@gmail.com> | 2018-05-11 21:06:32 +0200 |
commit | ba9eb77586b82fccaa60d6319e93a3adf0cb55ab (patch) | |
tree | fb85ee736a4aba9eb6d8bdf1b583283c82394f64 | |
parent | 8891fafc52e29a5e84fd806280a88c9a822c80e8 (diff) | |
download | vyatta-cfg-system-helium.tar.gz vyatta-cfg-system-helium.zip |
sometimes drives report they are not alignedhelium
And then on reboot it hangs where it should start grub
-rwxr-xr-x | scripts/install/install-get-partition | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/scripts/install/install-get-partition b/scripts/install/install-get-partition index eee0dc73..8321e156 100755 --- a/scripts/install/install-get-partition +++ b/scripts/install/install-get-partition @@ -698,7 +698,12 @@ create_partitions() { lecho "Creating root partition on /dev/$ldrive" # Make the root partition - output=$(parted --script --align optimal /dev/$ldrive mkpart primary 0% $root_part_size) + # if optimal_io_size is empty use default of 2048s + if [ $(cat /sys/block/$ldrive/queue/optimal_io_size) -gt 0 ]; then + output=$(parted --script --align optimal /dev/$ldrive mkpart primary 0% $root_part_size) + else + output=$(parted --script --align optimal /dev/$ldrive mkpart primary 2048s $root_part_size) + fi status=$? if [ "$status" != 0 ]; then echo -e "Error creating primary partition on $ldrive.\nPlease see $INSTALL_LOG for more details.\nExiting..." |