export-image: format boot partition with appropriate FAT size

This commit is contained in:
Serge Schneider 2024-03-13 18:16:30 +00:00
parent b829737d2a
commit 3b5e214f5e

View File

@ -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