summaryrefslogtreecommitdiff
path: root/setup-disk.in
diff options
context:
space:
mode:
authorNatanael Copa <ncopa@alpinelinux.org>2022-11-04 16:07:44 +0100
committerNatanael Copa <ncopa@alpinelinux.org>2022-11-04 15:11:14 +0000
commitf2a081f99a927faa9f7e21f7b25aa55af985fda0 (patch)
tree15abdeacdce71a3a1b43b68b29a8e0dfefece132 /setup-disk.in
parent2eccbac1cb7917cfed89206a9c8310b967b7add4 (diff)
downloadalpine-conf-f2a081f99a927faa9f7e21f7b25aa55af985fda0.zip
setup-disk: fix /boot size for UEFI and encryption
Currently, /boot becomes 34 MB, which is too small. Fixes https://gitlab.alpinelinux.org/alpine/alpine-conf/-/issues/10536
Diffstat (limited to 'setup-disk.in')
-rw-r--r--setup-disk.in3
1 files changed, 2 insertions, 1 deletions
diff --git a/setup-disk.in b/setup-disk.in
index fca6fbf..7e87f2a 100644
--- a/setup-disk.in
+++ b/setup-disk.in
@@ -1601,7 +1601,8 @@ if [ -z "$SWAP_SIZE" ]; then
SWAP_SIZE=$(find_swap_size $diskdevs)
fi
-if [ -n "$USE_EFI" ] && [ -z "$BOOT_SIZE" ]; then
+# reduce size of ESP partition
+if [ -n "$USE_EFI" ] && [ -z "$USE_CRYPT" ] && [ -z "$BOOT_SIZE" ]; then
blocksize=$(cat $(echo $diskdevs | sed -E -e 's:/dev/([^ ]+):/sys/block/\1/queue/logical_block_size:g') | sort -n | tail -n 1)
# calculate minimal FAT32 size
# for block size 512 minimal size is 32MB