# Inspired by GLIM and Multiboot USB set timeout=30 insmod all_video set gfxpayload=keep # ISOs configuration set isoconfig="/boot/isos.cfg" export isoconfig # Persistent folder set persistent="${prefix}/persistent" export persistent # Enable GUI terminal_output gfxterm # Get the ROOTUUID of this USB stick probe -u $root --set=rootuuid set imgdevpath="/dev/disk/by-uuid/$rootuuid" export imgdevpath rootuuid # Enable the Pager set pager=1 # Get theming if [ -f "${prefix}/theming.cfg" ]; then #source "${prefix}/theming.cfg" fi # Start the menuentries ############## menuentry "[c] CPU info " --hotkey=c { if cpuid -l ; then echo "This CPU supports 64-bit." else echo "This CPU does not support 64-bit." fi if cpuid -p ; then echo "This CPU supports PAE." else echo "This CPU does not support PAE." fi sleep --interruptible 10 } menuentry "[l] Local Boot" --hotkey=l { insmod chain chainloader +1 } if [ -f "${isoconfig}" ]; then menuentry ' ' { true } menuentry "[i] Inspect Isos >" --hotkey=i --default { echo "Loading various ISO configurations" configfile "${isoconfig}" } menuentry ' ' { true } fi submenu "GRUB2 options -> "{ menuentry "Show Drives" { ls -l sleep --interruptible 9999 } menuentry "Enable LVM support" { insmod lvm } menuentry "Enable RAID support" { insmod dm_nv insmod mdraid09_be insmod mdraid09 insmod mdradi1x insmod raid5rec insmod raid6rec } menuentry "Enable PATA support" { insmod ata update_paths } menuentry "Mount encrypted volumnes (LUKS and geli)" { insmod luks insmod geli cryptomount -a } menuentry "Enable Serial Terminal" { serial terminal_input --append serial terminal_output --apend serial } menuentry "Enable USB support *experimental*" { insmod ohci insmod uhci insmod usbms update_paths } } if [ ${grub_platform} == "efi" ]; then # place UEFI-only menu entries here menuentry "Firmware Setup " --class efi { fwsetup } menuentry "UEFI Shell" --class efi { insmod fat insmod chain search --no-floppy --set=root --file /shellx64.efi chainloader /shellx64.efi } fi menuentry ' ' { // Empty Line true } menuentry "[i] Invaders" --hotkey=i --class=game --class=invaders { echo "Starting Invaders" linux16 "${prefix}/persist/invaders/invaders" boot } menuentry "[b] netboot.xyz" --hotkey=b --class=netboot { echo "Using netboot.xyz" if [ ${grub_platform} == "efi" ]; then chainloader "${persistent}/netboot.xyz/netboot.xyz.efi" else linux16 "${persistent}/netboot.xyz/netboot.xyz.lkrn" fi } menuentry "[d] read Grub2 Documentation" --hotkey=d --class=docs { docs="${persistent}/docs" export docs configfile "${docs}/show-docs.cfg" } menuentry "[m] MemTest86+" --hotkey=m { linux16 "${persistent}/memtest86/memtest+-5.31b.bin" } menuentry ' ' { // Empty Line true } menuentry "Shutdown" --class shutdown { echo "System shutting down..." halt } menuentry "Reboot" --class shutdown { echo "System rebooting..." reboot }