2
0

loopback.cfg 2.8 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980
  1. # https://www.supergrubdisk.org/wiki/Loopback.cfg
  2. # Search for the ISO volume
  3. search --no-floppy --set=archiso_img_dev --file "${iso_path}"
  4. probe --set archiso_img_dev_uuid --fs-uuid "${archiso_img_dev}"
  5. # Get a human readable platform identifier
  6. if [ "${grub_platform}" == 'efi' ]; then
  7. archiso_platform='UEFI'
  8. if [ "${grub_cpu}" == 'x86_64' ]; then
  9. archiso_platform="x64 ${archiso_platform}"
  10. elif [ "${grub_cpu}" == 'i386' ]; then
  11. archiso_platform="IA32 ${archiso_platform}"
  12. else
  13. archiso_platform="${grub_cpu} ${archiso_platform}"
  14. fi
  15. elif [ "${grub_platform}" == 'pc' ]; then
  16. archiso_platform='BIOS'
  17. else
  18. archiso_platform="${grub_cpu} ${grub_platform}"
  19. fi
  20. # Set default menu entry
  21. default=pageos
  22. timeout=15
  23. timeout_style=menu
  24. # Menu entries
  25. menuentry "PageOS install medium (%ARCH%, ${archiso_platform})" --class arch --class gnu-linux --class gnu --class os --id 'pageos' {
  26. set gfxpayload=keep
  27. linux /%INSTALL_DIR%/boot/%ARCH%/vmlinuz-linux archisobasedir=%INSTALL_DIR% img_dev=UUID=${archiso_img_dev_uuid} img_loop="${iso_path}"
  28. initrd /%INSTALL_DIR%/boot/%ARCH%/initramfs-linux.img
  29. }
  30. menuentry "PageOS install medium with speakup screen reader (%ARCH%, ${archiso_platform})" --hotkey s --class arch --class gnu-linux --class gnu --class os --id 'archlinux-accessibility' {
  31. set gfxpayload=keep
  32. linux /%INSTALL_DIR%/boot/%ARCH%/vmlinuz-linux archisobasedir=%INSTALL_DIR% img_dev=UUID=${archiso_img_dev_uuid} img_loop="${iso_path}" accessibility=on
  33. initrd /%INSTALL_DIR%/boot/%ARCH%/initramfs-linux.img
  34. }
  35. if [ "${grub_platform}" == 'efi' -a "${grub_cpu}" == 'x86_64' -a -f '/boot/memtest86+/memtest.efi' ]; then
  36. menuentry 'Run Memtest86+ (RAM test)' --class memtest86 --class memtest --class gnu --class tool {
  37. set gfxpayload=800x600,1024x768
  38. linux /boot/memtest86+/memtest.efi
  39. }
  40. fi
  41. if [ "${grub_platform}" == 'pc' -a -f '/boot/memtest86+/memtest' ]; then
  42. menuentry 'Run Memtest86+ (RAM test)' --class memtest86 --class memtest --class gnu --class tool {
  43. set gfxpayload=800x600,1024x768
  44. linux /boot/memtest86+/memtest
  45. }
  46. fi
  47. if [ "${grub_platform}" == 'efi' ]; then
  48. if [ "${grub_cpu}" == 'x86_64' -a -f '/shellx64.efi' ]; then
  49. menuentry 'UEFI Shell' --class efi {
  50. chainloader /shellx64.efi
  51. }
  52. elif [ "${grub_cpu}" == "i386" -a -f '/shellia32.efi' ]; then
  53. menuentry 'UEFI Shell' --class efi {
  54. chainloader /shellia32.efi
  55. }
  56. fi
  57. menuentry 'UEFI Firmware Settings' --id 'uefi-firmware' {
  58. fwsetup
  59. }
  60. fi
  61. menuentry 'System shutdown' --class shutdown --class poweroff {
  62. echo 'System shutting down...'
  63. halt
  64. }
  65. menuentry 'System restart' --class reboot --class restart {
  66. echo 'System rebooting...'
  67. reboot
  68. }