summaryrefslogtreecommitdiff
path: root/image/iso-share/post-x86_64.sh
diff options
context:
space:
mode:
authorA. Wilcox <awilcox@wilcox-tech.com>2020-06-04 00:23:22 +0000
committerA. Wilcox <awilcox@wilcox-tech.com>2020-06-04 00:23:22 +0000
commitae228b7b879389da753851855e05a405aac520f4 (patch)
tree57cb95268ff5ea8f4e484d78601ad82d6fc60eef /image/iso-share/post-x86_64.sh
parentecac1f3bd478a81a3a960d60ed7ebc4a99375dbe (diff)
parent186d284bd5683e8e3549067112678419bb058cf9 (diff)
downloadhorizon-ae228b7b879389da753851855e05a405aac520f4.tar.gz
horizon-ae228b7b879389da753851855e05a405aac520f4.tar.bz2
horizon-ae228b7b879389da753851855e05a405aac520f4.tar.xz
horizon-ae228b7b879389da753851855e05a405aac520f4.zip
Merge branch 'mtools' into 'master'
image: use mtools to generate ESP images for ISOs instead of mounting See merge request adelie/horizon!3
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