summaryrefslogtreecommitdiff
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
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
-rwxr-xr-ximage/iso-share/post-pmmx.sh19
-rwxr-xr-ximage/iso-share/post-x86_64.sh16
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