90 lines
3.5 KiB
INI
90 lines
3.5 KiB
INI
# https://www.supergrubdisk.org/wiki/Loopback.cfg
|
|
|
|
# Search for the ISO volume
|
|
search --no-floppy --set=archiso_img_dev --file "${iso_path}"
|
|
probe --set archiso_img_dev_uuid --fs-uuid "${archiso_img_dev}"
|
|
|
|
# Get a human readable platform identifier
|
|
if [ "${grub_platform}" == 'efi' ]; then
|
|
archiso_platform='UEFI'
|
|
elif [ "${grub_platform}" == 'pc' ]; then
|
|
archiso_platform='BIOS'
|
|
else
|
|
archiso_platform="${grub_cpu}-${grub_platform}"
|
|
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
|
|
default=fws
|
|
timeout=3
|
|
timeout_style=menu
|
|
|
|
|
|
# Menu entries (same as grub.cfg, booted through GRUB's loopback support)
|
|
|
|
menuentry "FWS install medium (%ARCH%, ${archiso_platform})" --class fws --class gnu-linux --class gnu --class os --id 'fws' {
|
|
set gfxpayload=keep
|
|
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
|
|
}
|
|
|
|
menuentry "FWS install medium (%ARCH%, ${archiso_platform}, safe graphics)" --class fws --class gnu-linux --class gnu --class os --id 'fws-nomodeset' {
|
|
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
|
|
linux /boot/memtest86+/memtest86${uefi_machine_type_lower}.efi
|
|
}
|
|
elif [ "${grub_platform}" == 'pc' -a -f '/boot/memtest86+/memtest' ]; then
|
|
menuentry 'Run Memtest86+ (RAM test)' --class memtest86 --class memtest --class gnu --class tool {
|
|
set gfxpayload=800x600,1024x768
|
|
linux /boot/memtest86+/memtest
|
|
}
|
|
fi
|
|
|
|
if [ "${grub_platform}" == 'efi' ]; then
|
|
if [ -f "/shell${uefi_machine_type_lower}.efi" ]; then
|
|
menuentry 'UEFI Shell' --class efi {
|
|
chainloader /shell${uefi_machine_type_lower}.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
|
|
}
|