summaryrefslogtreecommitdiff
path: root/image/iso-share
diff options
context:
space:
mode:
authorMax Rees <maxcrees@me.com>2020-06-03 06:33:04 -0500
committerMax Rees <maxcrees@me.com>2020-06-03 06:33:04 -0500
commit028a85a03b2df48d776db1f9d834089aa96f22c3 (patch)
tree794792e067a9807a9846ff5333c9a81d4478e7e6 /image/iso-share
parent6d9840c6a8eb23b7a8de4436b50c00490f337482 (diff)
downloadhorizon-028a85a03b2df48d776db1f9d834089aa96f22c3.tar.gz
horizon-028a85a03b2df48d776db1f9d834089aa96f22c3.tar.bz2
horizon-028a85a03b2df48d776db1f9d834089aa96f22c3.tar.xz
horizon-028a85a03b2df48d776db1f9d834089aa96f22c3.zip
image: fixup x86_64 ISO share files
Diffstat (limited to 'image/iso-share')
-rw-r--r--image/iso-share/iso-params-x86_642
-rwxr-xr-ximage/iso-share/post-x86_64.sh75
2 files changed, 51 insertions, 26 deletions
diff --git a/image/iso-share/iso-params-x86_64 b/image/iso-share/iso-params-x86_64
index 84081eb..f1edd2c 100644
--- a/image/iso-share/iso-params-x86_64
+++ b/image/iso-share/iso-params-x86_64
@@ -1 +1 @@
---grub2-boot-info --grub2-mbr target/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
+--grub2-boot-info --grub2-mbr target/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 -hfs-bless-by i /System/Library/CoreServices/boot.efi
diff --git a/image/iso-share/post-x86_64.sh b/image/iso-share/post-x86_64.sh
index 04d0f6d..445acf2 100755
--- a/image/iso-share/post-x86_64.sh
+++ b/image/iso-share/post-x86_64.sh
@@ -1,46 +1,71 @@
-mkdir -p cdroot-x86_64/boot
+#!/bin/sh
+
+mkdir -p cdroot/boot
+
+cat >early.cfg <<'EARLYCFG'
+search.fs_label "Adelie x86_64" root
+set prefix=($root)/boot
+EARLYCFG
+
+cat >cdroot/boot/grub.cfg <<'GRUBCFG'
+menuentry "Adelie Linux Live (Intel 64-bit)" --class linux --id adelie-live-cd {
+ insmod iso9660
+ insmod linux
+ search --label "Adelie x86_64" --no-floppy --set
+ linux ($root)/kernel-x86_64 squashroot=x86_64.squashfs
+ initrd ($root)/initrd-x86_64
+}
+
+menuentry "Reboot and Try Again" --class reboot --id reboot {
+ reboot
+}
+
+GRUB_DEFAULT=adelie-live-cd
+GRUB_TIMEOUT=10
+GRUB_DISTRIBUTOR="Adelie"
+GRUBCFG
if ! type grub-mkimage>/dev/null; then
- printf "GRUB image cannot be created. Using stale copy.\n"
- printf "If you don't have one, this will fail!\n"
+ printf "GRUB image cannot be created.\n"
+ exit 1
else
printf '\033[01;32m * \033[37mInstalling GRUB...\033[00;39m\n'
- 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 all_video
- cat /usr/lib/grub/i386-pc/cdboot.img grubcore-stage1.img > cdroot-x86_64/boot/grubcore.img
+ grub-mkimage -d target/usr/lib/grub/i386-pc -c early.cfg -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 all_video
+ cat target/usr/lib/grub/i386-pc/cdboot.img grubcore-stage1.img > cdroot/boot/grubcore.img
- 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 all_video
+ grub-mkimage -d target/usr/lib/grub/x86_64-efi -c early.cfg -p boot -o 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 all_video
fi
-cp x86/grub.cfg64 cdroot-x86_64/boot/grub.cfg
+rm early.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
+mkdir -p cdroot/System/Library/CoreServices
+touch cdroot/System/Library/CoreServices/mach_kernel
+cat >cdroot/System/Library/CoreServices/SystemVersion.plist <<PLIST
<plist version="1.0">
<dict>
<key>ProductBuildVersion</key>
- <string>1B4</string>
+ <string>100</string>
<key>ProductName</key>
<string>Adélie Linux</string>
<key>ProductVersion</key>
- <string>1.0-BETA4</string>
+ <string>1.0</string>
</dict>
PLIST
-cp disk-label cdroot-x86_64/System/Library/CoreServices/.disk_label
-echo 'Adélie 1.0-BETA4' >cdroot-x86_64/System/Library/CoreServices/.disk_label.contentDetails
-cp x86/efi64.exe cdroot-x86_64/System/Library/CoreServices/boot.efi
+#cp disk-label cdroot/System/Library/CoreServices/.disk_label
+#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
printf "EFI image cannot be created.\n"
- printf "If one does not already exist, this CD will boot BIOS systems only.\n"
+ printf "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
+ mkdir -p efitemp
+ 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
+ mv efi64.img cdroot/efi.img
fi
-cp x86/efi64.img cdroot-x86_64/efi.img