summaryrefslogtreecommitdiff
path: root/scripts/install
diff options
context:
space:
mode:
authorDaniil Baturin <daniil@baturin.org>2018-05-31 01:49:30 +0200
committerDaniil Baturin <daniil@baturin.org>2018-05-31 01:49:30 +0200
commitfba795a09ae9d088a2403b5eaf2bc13e72138a62 (patch)
tree2337dca5b4be8d575b1734dcc479da9bef019b7c /scripts/install
parentbf1313bd0fe4aad4d5c4f24e04f87eab69204bae (diff)
downloadvyatta-cfg-system-fba795a09ae9d088a2403b5eaf2bc13e72138a62.tar.gz
vyatta-cfg-system-fba795a09ae9d088a2403b5eaf2bc13e72138a62.zip
T232: force FAT label creation before creating the root partition.
Diffstat (limited to 'scripts/install')
-rwxr-xr-xscripts/install/install-get-partition17
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"