From 10bdd41a8ea8ce9cf036c22431affa1fe0eb81cf Mon Sep 17 00:00:00 2001 From: Ward from fusion-voyager-3 Date: Thu, 1 Aug 2024 20:05:07 +0300 Subject: [PATCH] use dostools instead of loopbacks to create efiboot --- .github/push-iso | 2 +- build.sh | 21 +++++++++++---------- 2 files changed, 12 insertions(+), 11 deletions(-) diff --git a/.github/push-iso b/.github/push-iso index a45fd52..7273c0f 100644 --- a/.github/push-iso +++ b/.github/push-iso @@ -1 +1 @@ -24 +25 diff --git a/build.sh b/build.sh index 4ea97f1..fee2863 100755 --- a/build.sh +++ b/build.sh @@ -60,16 +60,17 @@ cp ./data/refind/refind_linux.conf \ # Generate bootable EFI Image from refind -dd if=/dev/zero of=disk.img bs=1M count=20 -losetup --offset 1048576 --sizelimit 46934528 /dev/loop5 disk.img -mkfs.vfat /dev/loop5 -mkdir -p /mnt/efi-disk -mount /dev/loop5 /mnt/efi-disk -mkdir -p /mnt/efi-disk/EFI -rsync -av ./data/refind/EFI/* /mnt/efi-disk/EFI/ -mkisofs -o "$LIVE_BOOT_PATH/efiboot.img" /mnt/efi-disk/ -umount -l /mnt/efi-disk -rm -rfv disk.img +dd if=/dev/zero of="$LIVE_BOOT_PATH/efiboot.img" bs=1M count=20 +mkfs.msdos -F 16 "$LIVE_BOOT_PATH/efiboot.img" +for directory in $(find ./data/refind/EFI/ -type d | cut -d'/' -f4-) +do + mmd -i "$LIVE_BOOT_PATH/efiboot.img" ::"$(echo $directory | tr '[:lower:]' '[:upper:]')" +done + +for file in $(find ./data/refind/EFI/ -type f | cut -d'/' -f4-) +do + mcopy -i "$LIVE_BOOT_PATH/efiboot.img" $file ::"$(echo $file | tr '[:lower:]' '[:upper:]')" +done # Create Bootable UEFI Full Image mkdir -p ./output