summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorA. Wilcox <AWilcox@Wilcox-Tech.com>2019-05-14 17:41:45 -0500
committerA. Wilcox <AWilcox@Wilcox-Tech.com>2019-05-14 17:41:45 -0500
commitcabad0bfe37e575a9a2fc2c868e23206d4e174e4 (patch)
tree7400ac51d52bdb91b16ac01104dac15bab7496ee
parentdca122c048d21dbd3cba3cd2e73fd9d3a24d5c09 (diff)
downloadimage-cabad0bfe37e575a9a2fc2c868e23206d4e174e4.tar.gz
image-cabad0bfe37e575a9a2fc2c868e23206d4e174e4.tar.bz2
image-cabad0bfe37e575a9a2fc2c868e23206d4e174e4.tar.xz
image-cabad0bfe37e575a9a2fc2c868e23206d4e174e4.zip
x86_64: Fix UEFI booting
-rw-r--r--iso-params-x86_642
-rwxr-xr-xpost-x86_64.sh34
2 files changed, 34 insertions, 2 deletions
diff --git a/iso-params-x86_64 b/iso-params-x86_64
index a897a55..b74a6e7 100644
--- a/iso-params-x86_64
+++ b/iso-params-x86_64
@@ -1 +1 @@
---grub2-boot-info --grub2-mbr /usr/lib/grub/i386-pc/boot_hybrid.img -eltorito-boot boot/grubcore.img -no-emul-boot -boot-load-size 4 -boot-info-table --eltorito-catalog boot/grub.cat -eltorito-alt-boot -e boot/grubcore-efi.img -no-emul-boot -isohybrid-gpt-basdat
+--grub2-boot-info --grub2-mbr /usr/lib/grub/i386-pc/boot_hybrid.img -eltorito-boot boot/grubcore.img -no-emul-boot -boot-load-size 4 -boot-info-table --eltorito-catalog boot/grub.cat -no-emul-boot -isohybrid-gpt-basdat --efi-boot efi.img -efi-boot-part --efi-boot-image -hfsplus -apm-block-size 2048 -hfsplus-file-creator-type chrp tbxj /System/Library/CoreServices/.disk_label -hfs-bless-by i /System/Library/CoreServices/boot.efi
diff --git a/post-x86_64.sh b/post-x86_64.sh
index 1939162..dec0e7b 100755
--- a/post-x86_64.sh
+++ b/post-x86_64.sh
@@ -8,7 +8,39 @@ else
grub-mkimage -c x86/early.cfg64 -v -p boot -o grubcore-stage1.img -O i386-pc biosdisk boot btrfs datetime disk ext2 gfxmenu help iso9660 jfs linux ls luks lvm memdisk nilfs2 normal part_gpt part_msdos png scsi search xfs reboot gfxterm gfxterm_background gfxterm_menu
cat /usr/lib/grub/i386-pc/cdboot.img grubcore-stage1.img > cdroot-x86_64/boot/grubcore.img
- grub-mkimage -c x86/early.cfg64 -v -p boot -o cdroot-x86_64/boot/grubcore-efi.img -O x86_64-efi boot btrfs datetime disk ext2 gfxmenu help iso9660 jfs ls luks lvm memdisk nilfs2 normal part_gpt part_msdos png scsi search xfs linux reboot gfxterm gfxterm_background gfxterm_menu
+ grub-mkimage -c x86/early.cfg64 -v -p boot -o x86/efi64.exe -O x86_64-efi boot btrfs datetime disk ext2 gfxmenu help iso9660 jfs ls luks lvm memdisk nilfs2 normal part_gpt part_msdos png scsi search xfs linux reboot gfxterm gfxterm_background gfxterm_menu
fi
cp x86/grub.cfg64 cdroot-x86_64/boot/grub.cfg
+
+mkdir -p cdroot-x86_64/System/Library/CoreServices
+touch cdroot-x86_64/System/Library/CoreServices/mach_kernel
+cat >cdroot-x86_64/System/Library/CoreServices/SystemVersion.plist <<PLIST
+<plist version="1.0">
+<dict>
+ <key>ProductBuildVersion</key>
+ <string>1B3</string>
+ <key>ProductName</key>
+ <string>Adélie Linux</string>
+ <key>ProductVersion</key>
+ <string>1.0-BETA3</string>
+</dict>
+PLIST
+cp disk-label cdroot-x86_64/System/Library/CoreServices/.disk_label
+echo 'Adélie 1.0-BETA3' >cdroot-x86_64/System/Library/CoreServices/.disk_label.contentDetails
+cp x86/efi64.exe cdroot-x86_64/System/Library/CoreServices/boot.efi
+
+if ! type mkfs.fat>/dev/null; then
+ printf "EFI image cannot be created.\n"
+ printf "If one does not already exist, this CD will boot BIOS systems only.\n"
+else
+ mkdir -p x86/efitemp
+ dd if=/dev/zero of=x86/efi64.img bs=1024 count=1440
+ mkfs.fat x86/efi64.img
+ mount -t vfat -o loop,rw x86/efi64.img x86/efitemp
+ mkdir -p x86/efitemp/EFI/BOOT
+ mv x86/efi64.exe x86/efitemp/EFI/BOOT/bootx64.efi
+ umount x86/efitemp
+ rmdir x86/efitemp
+fi
+cp x86/efi64.img cdroot-x86_64/efi.img