diff --git a/export-image/prerun.sh b/export-image/prerun.sh index b95fe36..d9778d1 100755 --- a/export-image/prerun.sh +++ b/export-image/prerun.sh @@ -55,7 +55,14 @@ if grep -q "$FEATURE" /etc/mke2fs.conf; then ROOT_FEATURES="^$FEATURE,$ROOT_FEATURES" fi done -mkdosfs -n bootfs -F 32 -s 4 -v "$BOOT_DEV" > /dev/null + +if [ "$BOOT_SIZE" -lt 134742016 ]; then + FAT_SIZE=16 +else + FAT_SIZE=32 +fi + +mkdosfs -n bootfs -F "$FAT_SIZE" -s 4 -v "$BOOT_DEV" > /dev/null mkfs.ext4 -L rootfs -O "$ROOT_FEATURES" "$ROOT_DEV" > /dev/null mount -v "$ROOT_DEV" "${ROOTFS_DIR}" -t ext4