diff options
author | Max Rees <maxcrees@me.com> | 2020-06-03 19:07:29 -0500 |
---|---|---|
committer | Max Rees <maxcrees@me.com> | 2020-06-03 19:21:30 -0500 |
commit | 186d284bd5683e8e3549067112678419bb058cf9 (patch) | |
tree | 57cb95268ff5ea8f4e484d78601ad82d6fc60eef | |
parent | ecac1f3bd478a81a3a960d60ed7ebc4a99375dbe (diff) | |
download | horizon-186d284bd5683e8e3549067112678419bb058cf9.tar.gz horizon-186d284bd5683e8e3549067112678419bb058cf9.tar.bz2 horizon-186d284bd5683e8e3549067112678419bb058cf9.tar.xz horizon-186d284bd5683e8e3549067112678419bb058cf9.zip |
image: use mtools to generate ESP images for ISOs instead of mounting
-rwxr-xr-x | image/iso-share/post-pmmx.sh | 19 | ||||
-rwxr-xr-x | image/iso-share/post-x86_64.sh | 16 |
2 files changed, 19 insertions, 16 deletions
diff --git a/image/iso-share/post-pmmx.sh b/image/iso-share/post-pmmx.sh index 14d6905..09aeea5 100755 --- a/image/iso-share/post-pmmx.sh +++ b/image/iso-share/post-pmmx.sh @@ -55,19 +55,20 @@ PLIST #echo 'Adélie 32-bit' >cdroot/System/Library/CoreServices/.disk_label.contentDetails cp efi32.exe cdroot/System/Library/CoreServices/boot.efi -if ! type mkfs.fat>/dev/null; then +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 - mkdir -p efitemp + 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 - mount -t vfat -o loop,rw efi32.img efitemp - mkdir -p efitemp/EFI/BOOT - mv efi32.exe efitemp/EFI/BOOT/bootia32.efi - cp efitemp/EFI/BOOT/bootia32.efi efitemp/EFI/BOOT/boot.efi - umount efitemp - rmdir efitemp + 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 fi - diff --git a/image/iso-share/post-x86_64.sh b/image/iso-share/post-x86_64.sh index 445acf2..5594a13 100755 --- a/image/iso-share/post-x86_64.sh +++ b/image/iso-share/post-x86_64.sh @@ -55,17 +55,19 @@ PLIST #echo 'Adélie 64-bit' >cdroot/System/Library/CoreServices/.disk_label.contentDetails cp efi64.exe cdroot/System/Library/CoreServices/boot.efi -if ! type mkfs.fat>/dev/null; then +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 - mkdir -p efitemp + 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 - mount -t vfat -o loop,rw efi64.img efitemp - mkdir -p efitemp/EFI/BOOT - mv efi64.exe efitemp/EFI/BOOT/bootx64.efi - umount efitemp - rmdir efitemp + 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 fi |