summaryrefslogtreecommitdiff
path: root/image/iso-share/post-x86_64.sh
diff options
context:
space:
mode:
authorMax Rees <maxcrees@me.com>2020-06-03 19:07:29 -0500
committerMax Rees <maxcrees@me.com>2020-06-03 19:21:30 -0500
commit186d284bd5683e8e3549067112678419bb058cf9 (patch)
tree57cb95268ff5ea8f4e484d78601ad82d6fc60eef /image/iso-share/post-x86_64.sh
parentecac1f3bd478a81a3a960d60ed7ebc4a99375dbe (diff)
downloadhorizon-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
Diffstat (limited to 'image/iso-share/post-x86_64.sh')
-rwxr-xr-ximage/iso-share/post-x86_64.sh16
1 files changed, 9 insertions, 7 deletions
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