diff options
author | Daniil Baturin <daniil@baturin.org> | 2018-05-31 01:49:30 +0200 |
---|---|---|
committer | Daniil Baturin <daniil@baturin.org> | 2018-05-31 01:49:30 +0200 |
commit | fba795a09ae9d088a2403b5eaf2bc13e72138a62 (patch) | |
tree | 2337dca5b4be8d575b1734dcc479da9bef019b7c | |
parent | bf1313bd0fe4aad4d5c4f24e04f87eab69204bae (diff) | |
download | vyatta-cfg-system-fba795a09ae9d088a2403b5eaf2bc13e72138a62.tar.gz vyatta-cfg-system-fba795a09ae9d088a2403b5eaf2bc13e72138a62.zip |
T232: force FAT label creation before creating the root partition.
-rwxr-xr-x | scripts/install/install-get-partition | 17 |
1 files changed, 7 insertions, 10 deletions
diff --git a/scripts/install/install-get-partition b/scripts/install/install-get-partition index a8590031..5ea4845e 100755 --- a/scripts/install/install-get-partition +++ b/scripts/install/install-get-partition @@ -669,20 +669,17 @@ create_partitions() { exit 1 fi + # Force FAT label creation + lecho "Creating a new disklabel on $ldrive" + parted -s /dev/$ldrive mklabel msdos + # Make sure you can print disk info using parted parted --script /dev/$ldrive p >/dev/null 2>&1 - # If unable to read disk, it's likely it needs a disklabel + # If we still can't, something has gone terribly wrong if [ "$?" != "0" ]; then - lecho "Creating a new disklabel on $ldrive" - lecho "parted /dev/$ldrive mklabel msdos" - output=$(parted -s /dev/$ldrive mklabel msdos) - - parted --script /dev/$ldrive p >/dev/null 2>&1 - if [ "$?" != "0" ]; then - echo "Unable to read disk label. Exiting." - exit 1 - fi + echo "Unable to read disk label. Exiting." + exit 1 fi lecho "Creating root partition on /dev/$ldrive" |