diff options
| author | Serge Schneider <serge@raspberrypi.com> | 2024-03-13 18:16:30 +0000 |
|---|---|---|
| committer | Serge Schneider <serge@raspberrypi.com> | 2024-03-13 18:16:30 +0000 |
| commit | 3b5e214f5ec4e23323bdd489b999536c487fcd12 (patch) | |
| tree | 17df2f142edc725333a9ef5298470844c94976b0 | |
| parent | b829737d2a07b6f971b1c0d97b6962110cc8c46c (diff) | |
export-image: format boot partition with appropriate FAT size
| -rwxr-xr-x | export-image/prerun.sh | 9 |
1 files changed, 8 insertions, 1 deletions
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 |
