use a +2MiB of extra space for the /boot partition

This commit is contained in:
Pratham Patel 2023-11-20 18:34:40 +05:30
parent cd136e16e1
commit 1594cab9f4
No known key found for this signature in database

View File

@ -39,7 +39,7 @@ function create_new_image {
LOOPBACK_02=$(losetup -f -P --show "${NEW_IMAGE_NAME}")
# 1 MiB = 2048 * (1 block/sector (512 bytes))
UEFI_SECTORS="$(( $(fdisk -l "${LOOPBACK_01}" | grep "${LOOPBACK_01}p1" | awk '{print $4}') + 2048 ))"
BOOT_SECTORS="$(( $(fdisk -l "${LOOPBACK_01}" | grep "${LOOPBACK_01}p2" | awk '{print $4}') + 2048 ))"
BOOT_SECTORS="$(( $(fdisk -l "${LOOPBACK_01}" | grep "${LOOPBACK_01}p2" | awk '{print $4}') + 4096 ))"
cat << EOF | fdisk "${LOOPBACK_02}"
g