From 5989121511b80fd69c4e04706eab3587ee2a7e95 Mon Sep 17 00:00:00 2001 From: Peter Jung Date: Sun, 12 Jun 2022 16:23:53 +0200 Subject: [PATCH] grub as iso bootloader Signed-off-by: Peter Jung --- archiso/grub/grub.cfg | 40 ++++++++++++++++++++++++++++++++-------- archiso/packages.x86_64 | 1 + archiso/profiledef.sh | 4 ++-- 3 files changed, 35 insertions(+), 10 deletions(-) diff --git a/archiso/grub/grub.cfg b/archiso/grub/grub.cfg index 732969e..e336cae 100644 --- a/archiso/grub/grub.cfg +++ b/archiso/grub/grub.cfg @@ -25,22 +25,46 @@ fi # Message: "s for blind" play 500 500 1 300 1 500 1 300 1 500 1 300 1 100 5 500 1 300 1 500 1 300 1 100 2 500 1 300 1 500 1 300 1 600 3 300 1 500 1 300 1 100 5 600 3 300 1 500 1 300 1 500 1 300 1 500 1 300 1 100 2 500 1 300 1 600 3 300 1 500 1 300 1 500 1 300 1 100 2 500 1 300 1 500 1 300 1 100 2 500 1 300 1 500 1 300 1 100 2 600 3 300 1 500 1 300 1 100 2 600 3 300 1 500 1 300 1 500 1 300 1 -menuentry "CachyOS install medium (x86_64, UEFI)" { +menuentry "CachyOS (x86_64, UEFI)" { set gfxpayload=keep search --no-floppy --set=root --label %ARCHISO_LABEL% - linux /%INSTALL_DIR%/boot/x86_64/vmlinuz-linux-cachyos archisobasedir=%INSTALL_DIR% archisolabel=%ARCHISO_LABEL% - initrd /%INSTALL_DIR%/boot/intel-ucode.img /%INSTALL_DIR%/boot/amd-ucode.img /%INSTALL_DIR%/boot/x86_64/initramfs-linux-cachyos.img + linux /%INSTALL_DIR%/boot/x86_64/vmlinuz-linux-cachyos archisobasedir=%INSTALL_DIR% archisolabel=%ARCHISO_LABEL% cow_spacesize=5G driver=free nouveau.modeset=1 radeon.modeset=1 i915.modeset=1 nvme_load=yes + initrd /%INSTALL_DIR%/boot/x86_64/initramfs-linux-cachyos.img } -menuentry "Arch Linux install medium with speakup screen reader (x86_64, UEFI)" --hotkey=s { +menuentry "CachyOS (x86_64, UEFI) Copy to RAM" { set gfxpayload=keep search --no-floppy --set=root --label %ARCHISO_LABEL% linux /%INSTALL_DIR%/boot/x86_64/vmlinuz-linux-cachyos archisobasedir=%INSTALL_DIR% archisolabel=%ARCHISO_LABEL% accessibility=on initrd /%INSTALL_DIR%/boot/intel-ucode.img /%INSTALL_DIR%/boot/amd-ucode.img /%INSTALL_DIR%/boot/x86_64/initramfs-linux-cachyos.img } -menuentry "UEFI Shell" { - insmod chain - search --no-floppy --set=root --label %ARCHISO_LABEL% - chainloader /shellia32.efi +if [ "${grub_platform}" == "efi" ]; then + if [ "${grub_cpu}" == "x86_64" ]; then + menuentry "UEFI Shell" { + insmod chain + search --no-floppy --set=root --label %ARCHISO_LABEL% + chainloader /shellx64.efi + } + elif [ "${grub_cpu}" == "i386" ]; then + menuentry "UEFI Shell" { + insmod chain + search --no-floppy --set=root --label %ARCHISO_LABEL% + chainloader /shellia32.efi + } + fi + + menuentry 'UEFI Firmware Settings' --id 'uefi-firmware' { + fwsetup + } +fi + +menuentry "System shutdown" { + echo "System shutting down..." + halt +} + +menuentry "System restart" { + echo "System rebooting..." + reboot } diff --git a/archiso/packages.x86_64 b/archiso/packages.x86_64 index 917dc6f..352a667 100644 --- a/archiso/packages.x86_64 +++ b/archiso/packages.x86_64 @@ -67,6 +67,7 @@ gpm gptfdisk grsync grub +cachyos-grub-theme gtkmm3 haveged hdparm diff --git a/archiso/profiledef.sh b/archiso/profiledef.sh index e1402b4..7a50cb7 100644 --- a/archiso/profiledef.sh +++ b/archiso/profiledef.sh @@ -9,8 +9,8 @@ iso_version="$(date +%Y.%m.%d)" install_dir="arch" buildmodes=('iso') bootmodes=('bios.syslinux.mbr' 'bios.syslinux.eltorito' - 'uefi-ia32.grub.esp' 'uefi-x64.systemd-boot.esp' - 'uefi-ia32.grub.eltorito' 'uefi-x64.systemd-boot.eltorito') + 'uefi-ia32.grub.esp' 'uefi-x64.grub.esp' + 'uefi-ia32.grub.eltorito' 'uefi-x64.grub.eltorito') arch="x86_64" pacman_conf="pacman.conf" airootfs_image_type="squashfs"