diff options
author | A. Wilcox <AWilcox@Wilcox-Tech.com> | 2024-09-18 19:28:34 -0500 |
---|---|---|
committer | A. Wilcox <AWilcox@Wilcox-Tech.com> | 2024-09-18 19:28:34 -0500 |
commit | 9ab8b74335d7a4f8b5d3f343ea004a02706b9b86 (patch) | |
tree | bd299dc33517f8a8f14074b8e1b903af3c0ad918 | |
parent | 41bcd8b5147acf869cd78c1f283800a26eb861f2 (diff) | |
download | horizon-9ab8b74335d7a4f8b5d3f343ea004a02706b9b86.tar.gz horizon-9ab8b74335d7a4f8b5d3f343ea004a02706b9b86.tar.bz2 horizon-9ab8b74335d7a4f8b5d3f343ea004a02706b9b86.tar.xz horizon-9ab8b74335d7a4f8b5d3f343ea004a02706b9b86.zip |
ISO: Require EFI tools to be present when needed
Closes: #395
-rwxr-xr-x | image/iso-share/post-aarch64.sh | 26 | ||||
-rwxr-xr-x | image/iso-share/post-armv7.sh | 26 | ||||
-rwxr-xr-x | image/iso-share/post-pmmx.sh | 30 | ||||
-rwxr-xr-x | image/iso-share/post-x86_64.sh | 28 |
4 files changed, 55 insertions, 55 deletions
diff --git a/image/iso-share/post-aarch64.sh b/image/iso-share/post-aarch64.sh index b77dbd4..3381775 100755 --- a/image/iso-share/post-aarch64.sh +++ b/image/iso-share/post-aarch64.sh @@ -59,17 +59,17 @@ PLIST cp efi64.exe cdroot/System/Library/CoreServices/boot.efi if ! type mkfs.fat>/dev/null || ! type mtools>/dev/null; then - printf "EFI image cannot be created.\n" - printf "This CD will not be bootable.\n" -else - cat >mtoolsrc <<-MTOOLSRC - drive A: file="efi64.img" - MTOOLSRC - export MTOOLSRC="$PWD/mtoolsrc" - dd if=/dev/zero of=efi64.img bs=1024 count=1440 - mkfs.fat efi64.img - mmd A:/EFI - mmd A:/EFI/BOOT - mcopy efi64.exe A:/EFI/BOOT/BOOTAA64.EFI - rm efi64.exe mtoolsrc + printf "EFI image creation tools cannot be located.\n" + exit 1 fi + +cat >mtoolsrc <<-MTOOLSRC +drive A: file="efi64.img" +MTOOLSRC +export MTOOLSRC="$PWD/mtoolsrc" +dd if=/dev/zero of=efi64.img bs=1024 count=1440 +mkfs.fat efi64.img +mmd A:/EFI +mmd A:/EFI/BOOT +mcopy efi64.exe A:/EFI/BOOT/BOOTAA64.EFI +rm efi64.exe mtoolsrc diff --git a/image/iso-share/post-armv7.sh b/image/iso-share/post-armv7.sh index 052c08c..8895c12 100755 --- a/image/iso-share/post-armv7.sh +++ b/image/iso-share/post-armv7.sh @@ -44,17 +44,17 @@ fi rm early.cfg if ! type mkfs.fat>/dev/null || ! type mtools>/dev/null; then - printf "EFI image cannot be created.\n" - printf "This CD will not be bootable.\n" -else - cat >mtoolsrc <<-MTOOLSRC - drive A: file="efi32.img" - MTOOLSRC - export MTOOLSRC="$PWD/mtoolsrc" - dd if=/dev/zero of=efi32.img bs=1024 count=1440 - mkfs.fat efi32.img - mmd A:/EFI - mmd A:/EFI/BOOT - mcopy efi32.exe A:/EFI/BOOT/BOOTARM.EFI - rm efi32.exe mtoolsrc + printf "EFI image creation tools cannot be located.\n" + exit 1 fi + +cat >mtoolsrc <<-MTOOLSRC +drive A: file="efi32.img" +MTOOLSRC +export MTOOLSRC="$PWD/mtoolsrc" +dd if=/dev/zero of=efi32.img bs=1024 count=1440 +mkfs.fat efi32.img +mmd A:/EFI +mmd A:/EFI/BOOT +mcopy efi32.exe A:/EFI/BOOT/BOOTARM.EFI +rm efi32.exe mtoolsrc diff --git a/image/iso-share/post-pmmx.sh b/image/iso-share/post-pmmx.sh index 6ac9cc3..e378da9 100755 --- a/image/iso-share/post-pmmx.sh +++ b/image/iso-share/post-pmmx.sh @@ -64,19 +64,19 @@ PLIST cp efi32.exe cdroot/System/Library/CoreServices/boot.efi if ! type mkfs.fat>/dev/null || ! type mtools>/dev/null; then - printf "EFI image cannot be created.\n" - printf "This CD will boot BIOS systems only.\n" -else - cat >mtoolsrc <<-MTOOLSRC - drive A: file="efi32.img" - MTOOLSRC - export MTOOLSRC="$PWD/mtoolsrc" - dd if=/dev/zero of=efi32.img bs=1024 count=2880 - mkfs.fat efi32.img - mmd A:/EFI - mmd A:/EFI/BOOT - mcopy efi32.exe A:/EFI/BOOT/bootia32.efi - mcopy efi32.exe A:/EFI/BOOT/boot.efi - rm efi32.exe mtoolsrc - mv efi32.img cdroot/efi.img + printf "EFI image creation tools cannot be located.\n" + exit 1 fi + +cat >mtoolsrc <<-MTOOLSRC +drive A: file="efi32.img" +MTOOLSRC +export MTOOLSRC="$PWD/mtoolsrc" +dd if=/dev/zero of=efi32.img bs=1024 count=2880 +mkfs.fat efi32.img +mmd A:/EFI +mmd A:/EFI/BOOT +mcopy efi32.exe A:/EFI/BOOT/bootia32.efi +mcopy efi32.exe A:/EFI/BOOT/boot.efi +rm efi32.exe mtoolsrc +mv efi32.img cdroot/efi.img diff --git a/image/iso-share/post-x86_64.sh b/image/iso-share/post-x86_64.sh index 8ede382..7981610 100755 --- a/image/iso-share/post-x86_64.sh +++ b/image/iso-share/post-x86_64.sh @@ -64,18 +64,18 @@ PLIST cp efi64.exe cdroot/System/Library/CoreServices/boot.efi if ! type mkfs.fat>/dev/null || ! type mtools>/dev/null; then - printf "EFI image cannot be created.\n" - printf "This CD will boot BIOS systems only.\n" -else - cat >mtoolsrc <<-MTOOLSRC - drive A: file="efi64.img" - MTOOLSRC - export MTOOLSRC="$PWD/mtoolsrc" - dd if=/dev/zero of=efi64.img bs=1024 count=1440 - mkfs.fat efi64.img - mmd A:/EFI - mmd A:/EFI/BOOT - mcopy efi64.exe A:/EFI/BOOT/bootx64.efi - rm efi64.exe mtoolsrc - mv efi64.img cdroot/efi.img + printf "EFI image creation tools cannot be located.\n" + exit 1 fi + +cat >mtoolsrc <<-MTOOLSRC +drive A: file="efi64.img" +MTOOLSRC +export MTOOLSRC="$PWD/mtoolsrc" +dd if=/dev/zero of=efi64.img bs=1024 count=1440 +mkfs.fat efi64.img +mmd A:/EFI +mmd A:/EFI/BOOT +mcopy efi64.exe A:/EFI/BOOT/bootx64.efi +rm efi64.exe mtoolsrc +mv efi64.img cdroot/efi.img |