From a1a10e08ce6717c4212a823b5366a44723b29c0a Mon Sep 17 00:00:00 2001 From: Itxaka Date: Tue, 18 Apr 2023 12:21:55 +0200 Subject: [PATCH] :seedling: Allow override of RECOVERY size in raw image creation Signed-off-by: Itxaka --- tools-image/raw-images.sh | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/tools-image/raw-images.sh b/tools-image/raw-images.sh index 2da0ea9..969b273 100755 --- a/tools-image/raw-images.sh +++ b/tools-image/raw-images.sh @@ -10,6 +10,7 @@ : "${OEM_LABEL:=COS_OEM}" : "${RECOVERY_LABEL:=COS_RECOVERY}" : "${EXTEND:=}" +: "${RECOVERY_SIZE:=2048}" DIRECTORY=$1 OUT=${2:-disk.raw} @@ -34,7 +35,8 @@ mv recovery.squashfs /build/root/cOS/recovery.squashfs grub2-editenv /build/root/grub_oem_env set "default_menu_entry=Kairos" # Create a 2GB filesystem for RECOVERY including the contents for root (grub config and squasfs container) -truncate -s $((2048*1024*1024)) rootfs.part +# shellcheck disable=SC2004 +truncate -s $(($RECOVERY_SIZE*1024*1024)) rootfs.part mkfs.ext2 -L "${RECOVERY_LABEL}" -d /build/root rootfs.part # Create the EFI partition FAT16 and include the EFI image and a basic grub.cfg