feat(boot): mirror the BIOS menu entries in the GRUB loopback menu
This commit is contained in:
1 file changed
+40
-29
@@ -13,52 +13,63 @@ else
|
|||||||
archiso_platform="${grub_cpu}-${grub_platform}"
|
archiso_platform="${grub_cpu}-${grub_platform}"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
# Get the lowercase UEFI machine type short-name to use for architecture-specific tools
|
||||||
|
if [ "${grub_platform}" == 'efi' ]; then
|
||||||
|
if [ "${grub_cpu}" == 'x86_64' ]; then
|
||||||
|
uefi_machine_type_lower='x64'
|
||||||
|
elif [ "${grub_cpu}" == 'i386' ]; then
|
||||||
|
uefi_machine_type_lower='ia32'
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
|
||||||
# Set default menu entry
|
# Set default menu entry
|
||||||
default=fwslinux
|
default=fws
|
||||||
timeout=15
|
timeout=3
|
||||||
timeout_style=menu
|
timeout_style=menu
|
||||||
|
|
||||||
|
|
||||||
# Menu entries
|
# Menu entries (same as grub.cfg, booted through GRUB's loopback support)
|
||||||
|
|
||||||
menuentry "FWS Linux (%ARCH%, ${archiso_platform})" --class arch --class gnu-linux --class gnu --class os --id 'fwslinux' {
|
menuentry "FWS install medium (%ARCH%, ${archiso_platform})" --class fws --class gnu-linux --class gnu --class os --id 'fws' {
|
||||||
set gfxpayload=keep
|
set gfxpayload=keep
|
||||||
linux /%INSTALL_DIR%/boot/%ARCH%/vmlinuz-linux archisobasedir=%INSTALL_DIR% img_dev=UUID=${archiso_img_dev_uuid} img_loop="${iso_path}"
|
linux /%INSTALL_DIR%/boot/%ARCH%/vmlinuz-linux archisobasedir=%INSTALL_DIR% img_dev=UUID=${archiso_img_dev_uuid} img_loop="${iso_path}" udev.event_timeout=45
|
||||||
initrd /%INSTALL_DIR%/boot/%ARCH%/initramfs-linux.img
|
initrd /%INSTALL_DIR%/boot/%ARCH%/initramfs-linux.img
|
||||||
}
|
}
|
||||||
|
|
||||||
if [ "${grub_platform}" == 'efi' -a "${grub_cpu}" == 'x86_64' -a -f '/boot/memtest86+/memtest.efi' ]; then
|
menuentry "FWS install medium (%ARCH%, ${archiso_platform}, safe graphics)" --class fws --class gnu-linux --class gnu --class os --id 'fws-nomodeset' {
|
||||||
menuentry 'Run Memtest86+ (RAM test)' --class memtest86 --class gnu --class tool {
|
set gfxpayload=keep
|
||||||
|
linux /%INSTALL_DIR%/boot/%ARCH%/vmlinuz-linux archisobasedir=%INSTALL_DIR% img_dev=UUID=${archiso_img_dev_uuid} img_loop="${iso_path}" nomodeset udev.event_timeout=45
|
||||||
|
initrd /%INSTALL_DIR%/boot/%ARCH%/initramfs-linux.img
|
||||||
|
}
|
||||||
|
|
||||||
|
menuentry "FWS - Reparer une installation (recovery)" --class fws --class gnu-linux --class gnu --class os --id 'fws-recovery' {
|
||||||
|
set gfxpayload=keep
|
||||||
|
linux /%INSTALL_DIR%/boot/%ARCH%/vmlinuz-linux archisobasedir=%INSTALL_DIR% img_dev=UUID=${archiso_img_dev_uuid} img_loop="${iso_path}" fws.recovery=1 udev.event_timeout=45
|
||||||
|
initrd /%INSTALL_DIR%/boot/%ARCH%/initramfs-linux.img
|
||||||
|
}
|
||||||
|
|
||||||
|
menuentry "FWS install medium (%ARCH%, ${archiso_platform}) with speech" --hotkey s --class fws --class gnu-linux --class gnu --class os --id 'fws-accessibility' {
|
||||||
|
set gfxpayload=keep
|
||||||
|
linux /%INSTALL_DIR%/boot/%ARCH%/vmlinuz-linux archisobasedir=%INSTALL_DIR% img_dev=UUID=${archiso_img_dev_uuid} img_loop="${iso_path}" accessibility=on udev.event_timeout=45
|
||||||
|
initrd /%INSTALL_DIR%/boot/%ARCH%/initramfs-linux.img
|
||||||
|
}
|
||||||
|
|
||||||
|
if [ "${grub_platform}" == 'efi' -a -f "/boot/memtest86+/memtest86${uefi_machine_type_lower}.efi" ]; then
|
||||||
|
menuentry 'Run Memtest86+ (RAM test)' --class memtest86 --class memtest --class gnu --class tool {
|
||||||
set gfxpayload=800x600,1024x768
|
set gfxpayload=800x600,1024x768
|
||||||
linux /boot/memtest86+/memtest.efi
|
linux /boot/memtest86+/memtest86${uefi_machine_type_lower}.efi
|
||||||
}
|
}
|
||||||
fi
|
elif [ "${grub_platform}" == 'pc' -a -f '/boot/memtest86+/memtest' ]; then
|
||||||
if [ "${grub_platform}" == 'pc' -a -f '/boot/memtest86+/memtest' ]; then
|
menuentry 'Run Memtest86+ (RAM test)' --class memtest86 --class memtest --class gnu --class tool {
|
||||||
menuentry 'Run Memtest86+ (RAM test)' --class memtest86 --class gnu --class tool {
|
|
||||||
set gfxpayload=800x600,1024x768
|
set gfxpayload=800x600,1024x768
|
||||||
linux /boot/memtest86+/memtest
|
linux /boot/memtest86+/memtest
|
||||||
}
|
}
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [ "${grub_platform}" == 'efi' ]; then
|
if [ "${grub_platform}" == 'efi' ]; then
|
||||||
if [ "${grub_cpu}" == 'x86_64' -a -f '/shellx64.efi' ]; then
|
if [ -f "/shell${uefi_machine_type_lower}.efi" ]; then
|
||||||
menuentry 'UEFI Shell' --class efi {
|
menuentry 'UEFI Shell' --class efi {
|
||||||
chainloader /shellx64.efi
|
chainloader /shell${uefi_machine_type_lower}.efi
|
||||||
}
|
|
||||||
elif [ "${grub_cpu}" == 'i386' -a -f '/shellia32.efi' ]; then
|
|
||||||
menuentry 'UEFI Shell' --class efi {
|
|
||||||
chainloader /shellia32.efi
|
|
||||||
}
|
|
||||||
elif [ "${grub_cpu}" == 'arm64' -a -f '/shellaa64.efi' ]; then
|
|
||||||
menuentry 'UEFI Shell' --class efi {
|
|
||||||
chainloader /shellaa64.efi
|
|
||||||
}
|
|
||||||
elif [ "${grub_cpu}" == 'riscv64' -a -f '/shellriscv64.efi' ]; then
|
|
||||||
menuentry 'UEFI Shell' --class efi {
|
|
||||||
chainloader /shellriscv64.efi
|
|
||||||
}
|
|
||||||
elif [ "${grub_cpu}" == 'loongarch64' -a -f '/shellloongarch64.efi' ]; then
|
|
||||||
menuentry 'UEFI Shell' --class efi {
|
|
||||||
chainloader /shellloongarch64.efi
|
|
||||||
}
|
}
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
|||||||
Reference in new issue
Block a user