From 107125bae8b266b5a1cbef582bc51c3ef5e08657 Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Thu, 11 Sep 2008 09:22:45 +0200 Subject: Automatically enforcing fat32 on usb-hdd when detecting partitions bigger than 2GB. --- helpers/lh_binary_usb-hdd | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'helpers') 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})" -- cgit v1.2.3