summaryrefslogtreecommitdiff
path: root/helpers
diff options
context:
space:
mode:
authorDaniel Baumann <daniel@debian.org>2008-09-11 09:22:45 +0200
committerDaniel Baumann <daniel@debian.org>2011-03-09 19:03:41 +0100
commit107125bae8b266b5a1cbef582bc51c3ef5e08657 (patch)
tree8abb98704e5f2af1f0723e16449ce3574f255931 /helpers
parent759d82a2c44f4dbf2acd9b046ac944812f4e361e (diff)
downloadvyos-live-build-107125bae8b266b5a1cbef582bc51c3ef5e08657.tar.gz
vyos-live-build-107125bae8b266b5a1cbef582bc51c3ef5e08657.zip
Automatically enforcing fat32 on usb-hdd when detecting partitions bigger than 2GB.
Diffstat (limited to 'helpers')
-rwxr-xr-xhelpers/lh_binary_usb-hdd9
1 files changed, 9 insertions, 0 deletions
diff --git a/helpers/lh_binary_usb-hdd b/helpers/lh_binary_usb-hdd
index c122606e7..c93e22595 100755
--- a/helpers/lh_binary_usb-hdd
+++ b/helpers/lh_binary_usb-hdd
@@ -98,6 +98,15 @@ then
export LH_BINARY_FILESYSTEM
fi
+# Enforce fat32 if we have images in total bigger than 2GB
+if [ "${LH_BINARY_FILESYSTEM}" = "fat16" ] && [ "$(cd binary && du -s | awk '{ print $1 }')" -gt "1900000" ]
+then
+ Echo_warning "FAT16 doesn't support partitions larger than 2GB, automatically enforcing FAT32"
+
+ LH_BINARY_FILESYSTEM="fat32"
+ export LH_BINARY_FILESYSTEM
+fi
+
# Everything which comes here needs to be cleaned up,
DU_DIM="$(du -ms binary | cut -f1)"
REAL_DIM="$(Calculate_partition_size ${DU_DIM} ${LH_BINARY_FILESYSTEM})"