diff options
author | A. Wilcox <awilcox@wilcox-tech.com> | 2020-06-03 21:13:56 +0000 |
---|---|---|
committer | A. Wilcox <awilcox@wilcox-tech.com> | 2020-06-03 21:13:56 +0000 |
commit | 598e9e679e6554b8c0f26ada5822f4a3254cec03 (patch) | |
tree | 794792e067a9807a9846ff5333c9a81d4478e7e6 /image/iso-share/post-x86_64.sh | |
parent | 1f685acece95b06b62cab8d81cc26e29d6c13967 (diff) | |
parent | 028a85a03b2df48d776db1f9d834089aa96f22c3 (diff) | |
download | horizon-598e9e679e6554b8c0f26ada5822f4a3254cec03.tar.gz horizon-598e9e679e6554b8c0f26ada5822f4a3254cec03.tar.bz2 horizon-598e9e679e6554b8c0f26ada5822f4a3254cec03.tar.xz horizon-598e9e679e6554b8c0f26ada5822f4a3254cec03.zip |
Merge branch 'sroracle' into 'master'
Miscellaneous fixes
See merge request adelie/horizon!2
Diffstat (limited to 'image/iso-share/post-x86_64.sh')
-rwxr-xr-x | image/iso-share/post-x86_64.sh | 75 |
1 files changed, 50 insertions, 25 deletions
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 |