2022-10-07 06:19:14 +00:00
|
|
|
# Load partition table and file system modules
|
|
|
|
insmod part_gpt
|
|
|
|
insmod part_msdos
|
|
|
|
insmod fat
|
|
|
|
insmod iso9660
|
2023-07-21 10:13:56 +00:00
|
|
|
insmod ntfs
|
|
|
|
insmod ntfscomp
|
|
|
|
insmod exfat
|
|
|
|
insmod udf
|
2022-10-07 06:19:14 +00:00
|
|
|
|
|
|
|
# Use graphics-mode output
|
|
|
|
insmod all_video
|
|
|
|
insmod font
|
|
|
|
if loadfont "${prefix}/fonts/unicode.pf2" ; then
|
|
|
|
set gfxmode="auto"
|
|
|
|
terminal_input console
|
2023-07-21 10:13:56 +00:00
|
|
|
terminal_output console
|
2022-10-07 06:19:14 +00:00
|
|
|
fi
|
|
|
|
|
|
|
|
# Enable serial console
|
|
|
|
if serial --unit=0 --speed=115200; then
|
|
|
|
terminal_input --append serial
|
|
|
|
terminal_output --append serial
|
|
|
|
fi
|
|
|
|
|
2023-07-21 10:13:56 +00:00
|
|
|
# Search for the ISO volume
|
|
|
|
if [ -z "${ARCHISO_UUID}" ]; then
|
|
|
|
if [ -z "${ARCHISO_HINT}" ]; then
|
|
|
|
regexp --set=1:ARCHISO_HINT '^\(([^)]+)\)' "${cmdpath}"
|
|
|
|
fi
|
|
|
|
search --no-floppy --set=root --file '%ARCHISO_SEARCH_FILENAME%' --hint "${ARCHISO_HINT}"
|
|
|
|
probe --set ARCHISO_UUID --fs-uuid "${root}"
|
|
|
|
fi
|
|
|
|
|
2022-10-07 06:19:14 +00:00
|
|
|
# Set default menu entry
|
|
|
|
default=archcraft
|
|
|
|
timeout=10
|
|
|
|
timeout_style=menu
|
|
|
|
|
|
|
|
# Menu entries
|
2023-01-19 10:05:31 -01:00
|
|
|
menuentry "Boot Archcraft (x86_64, UEFI)" --class archcraft --class arch --class gnu-linux --class gnu --class os --id 'archcraft' {
|
2022-10-07 06:19:14 +00:00
|
|
|
set gfxpayload=keep
|
2023-07-21 10:13:56 +00:00
|
|
|
linux /%INSTALL_DIR%/boot/x86_64/vmlinuz-linux archisobasedir=%INSTALL_DIR% archisodevice=UUID=${ARCHISO_UUID} quiet splash loglevel=3 udev.log_level=3 vt.global_cursor_default=0 cow_spacesize=5G copytoram=n module_blacklist=pcspkr,snd_pcsp
|
2023-01-19 10:05:31 -01:00
|
|
|
initrd /%INSTALL_DIR%/boot/intel-ucode.img /%INSTALL_DIR%/boot/amd-ucode.img /%INSTALL_DIR%/boot/x86_64/initramfs-linux.img
|
|
|
|
}
|
|
|
|
|
|
|
|
menuentry "Boot Archcraft (x86_64, UEFI, open source)" --class archcraft --class arch --class gnu-linux --class gnu --class os --id 'archcraftos' {
|
|
|
|
set gfxpayload=keep
|
2023-07-21 10:13:56 +00:00
|
|
|
linux /%INSTALL_DIR%/boot/x86_64/vmlinuz-linux archisobasedir=%INSTALL_DIR% archisodevice=UUID=${ARCHISO_UUID} quiet splash loglevel=3 udev.log_level=3 vt.global_cursor_default=0 cow_spacesize=5G copytoram=n nouveau.modeset=1 radeon.modeset=1 i915.modeset=1 nvme_load=yes module_blacklist=nvidia,nvidia_modeset,nvidia_uvm,nvidia_drm module_blacklist=pcspkr,snd_pcsp
|
2023-01-19 10:05:31 -01:00
|
|
|
initrd /%INSTALL_DIR%/boot/intel-ucode.img /%INSTALL_DIR%/boot/amd-ucode.img /%INSTALL_DIR%/boot/x86_64/initramfs-linux.img
|
|
|
|
}
|
|
|
|
|
2023-07-21 10:13:56 +00:00
|
|
|
menuentry "Boot Archcraft (x86_64, UEFI, nvidia)" --class archcraft --class arch --class gnu-linux --class gnu --class os --id 'archcraftpn' {
|
2023-01-19 10:05:31 -01:00
|
|
|
set gfxpayload=keep
|
2023-07-21 10:13:56 +00:00
|
|
|
linux /%INSTALL_DIR%/boot/x86_64/vmlinuz-linux archisobasedir=%INSTALL_DIR% archisodevice=UUID=${ARCHISO_UUID} quiet splash loglevel=3 udev.log_level=3 vt.global_cursor_default=0 cow_spacesize=5G copytoram=n nvidia_drm.modeset=1 nouveau.modeset=0 module_blacklist=nouveau radeon.modeset=1 i915.modeset=1 nvme_load=yes module_blacklist=pcspkr,snd_pcsp
|
|
|
|
initrd /%INSTALL_DIR%/boot/intel-ucode.img /%INSTALL_DIR%/boot/amd-ucode.img /%INSTALL_DIR%/boot/x86_64/initramfs-linux-nvidia.img
|
2023-01-19 10:05:31 -01:00
|
|
|
}
|
|
|
|
|
|
|
|
menuentry "Boot Archcraft (x86_64, UEFI, nomodeset)" --class archcraft --class arch --class gnu-linux --class gnu --class os --id 'archcraftnm' {
|
|
|
|
set gfxpayload=keep
|
2023-07-21 10:13:56 +00:00
|
|
|
linux /%INSTALL_DIR%/boot/x86_64/vmlinuz-linux archisobasedir=%INSTALL_DIR% archisodevice=UUID=${ARCHISO_UUID} quiet splash loglevel=3 udev.log_level=3 vt.global_cursor_default=0 cow_spacesize=5G copytoram=n nomodeset module_blacklist=nvidia,nvidia_modeset,nvidia_uvm,nvidia_drm nouveau.modeset=0 radeon.modeset=0 i915.modeset=0 nvme_load=yes module_blacklist=pcspkr,snd_pcsp
|
2022-10-07 06:19:14 +00:00
|
|
|
initrd /%INSTALL_DIR%/boot/intel-ucode.img /%INSTALL_DIR%/boot/amd-ucode.img /%INSTALL_DIR%/boot/x86_64/initramfs-linux.img
|
|
|
|
}
|
|
|
|
|
|
|
|
if [ "${grub_platform}" == "efi" ]; then
|
|
|
|
if [ "${grub_cpu}" == "x86_64" ]; then
|
2023-07-21 10:13:56 +00:00
|
|
|
menuentry "UEFI Shell" --class recovery --class efi {
|
2022-10-07 06:19:14 +00:00
|
|
|
insmod chain
|
|
|
|
chainloader /shellx64.efi
|
|
|
|
}
|
|
|
|
elif [ "${grub_cpu}" == "i386" ]; then
|
2023-07-21 10:13:56 +00:00
|
|
|
menuentry "UEFI Shell" --class recovery --class efi {
|
2022-10-07 06:19:14 +00:00
|
|
|
insmod chain
|
|
|
|
chainloader /shellia32.efi
|
|
|
|
}
|
|
|
|
fi
|
|
|
|
|
|
|
|
menuentry 'UEFI Firmware Settings' --class recovery --id 'uefi-firmware' {
|
|
|
|
fwsetup
|
|
|
|
}
|
|
|
|
fi
|
|
|
|
|
|
|
|
menuentry "System shutdown" --class shutdown --class poweroff {
|
|
|
|
halt
|
|
|
|
}
|
|
|
|
|
|
|
|
menuentry "System restart" --class restart --class reboot {
|
|
|
|
reboot
|
|
|
|
}
|