Switch to GRUB

This commit is contained in:
theVakhovskeIsTaken 2022-11-27 16:17:38 +03:00
parent 8588fea1f4
commit ee566db959
2 changed files with 74 additions and 1 deletions

73
grub/grub.cfg Normal file
View File

@ -0,0 +1,73 @@
# Load partition table and file system modules
insmod part_gpt
insmod part_msdos
insmod fat
insmod iso9660
# Use graphics-mode output
insmod all_video
insmod font
if loadfont "${prefix}/fonts/unicode.pf2" ; then
insmod gfxterm
set gfxmode="auto"
terminal_input console
terminal_output gfxterm
fi
# Enable serial console
if serial --unit=0 --speed=115200; then
terminal_input --append serial
terminal_output --append serial
fi
# Set default menu entry
default=archlinux
timeout=15
timeout_style=menu
# Menu entries
menuentry "HoloISO Installer" --class arch --class gnu-linux --class gnu --class os --id 'archlinux' {
set gfxpayload=keep
search --no-floppy --set=root --label %ARCHISO_LABEL%
linux /%INSTALL_DIR%/boot/x86_64/vmlinuz-linux-neptune archisobasedir=%INSTALL_DIR% archisolabel=%ARCHISO_LABEL% cow_spacesize=10G
initrd /%INSTALL_DIR%/boot/intel-ucode.img /%INSTALL_DIR%/boot/amd-ucode.img /%INSTALL_DIR%/boot/x86_64/initramfs-linux-neptune.img
}
menuentry "HoloISO Installer (Copies image to RAM)" --hotkey s --class arch --class gnu-linux --class gnu --class os --id 'archlinux-accessibility' {
set gfxpayload=keep
search --no-floppy --set=root --label %ARCHISO_LABEL%
linux /%INSTALL_DIR%/boot/x86_64/vmlinuz-linux-neptune archisobasedir=%INSTALL_DIR% archisolabel=%ARCHISO_LABEL% cow_spacesize=10G copytoram
initrd /%INSTALL_DIR%/boot/intel-ucode.img /%INSTALL_DIR%/boot/amd-ucode.img /%INSTALL_DIR%/boot/x86_64/initramfs-linux-neptune.img
}
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" --class shutdown --class poweroff {
echo "System shutting down..."
halt
}
menuentry "System restart" --class reboot --class restart {
echo "System rebooting..."
reboot
}

View File

@ -8,7 +8,7 @@ iso_application="HoloISO Installer Image"
iso_version="$(date +%Y%m%d_%H%M)"
install_dir="arch"
buildmodes=('iso')
bootmodes=('uefi-x64.systemd-boot.esp' 'uefi-x64.systemd-boot.eltorito')
bootmodes=('uefi-x64.grub.esp' 'uefi-x64.grub.eltorito')
arch="x86_64"
pacman_conf="pacman.conf"
airootfs_image_type="squashfs"