Advertisement
Guest User

GLIM

a guest
Nov 13th, 2018
233
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Bash 1.57 KB | None | 0 0
  1. # GLEE USB GRUB2 Configuration
  2.  
  3. ### https://github.com/thias/glim
  4. #################################
  5. # Required with MBR for GUI
  6. if [ "${grub_platform}" = "pc" ]; then
  7. insmod vbe
  8. fi
  9.  
  10. # Required with EFI for GUI and to prevent "No video mode set" error
  11. if [ "${grub_platform}" = "efi" ]; then
  12. insmod efi_gop
  13. fi
  14.  
  15. # Keep the same graphic mode for kernel booting (passed as vga=)
  16. # other values are "text" or any gfxmode value
  17. set gfxpayload=keep
  18.  
  19. # Enable GUI
  20. terminal_output gfxterm
  21.  
  22. #EFI: special characters (lines composing menu frame)
  23. #replaced by '?' in text _fallback_ text mode if absent
  24. # (useless if gfxterm is not enabled or if GUI theme loading success)
  25. #loadfont ascii
  26.  
  27. insmod png
  28. set theme=${prefix}/themes/invader/theme.txt
  29. ####################################################
  30.  
  31. ### iso in (hda,gpt3)/boot/grub/iso/archlinux.iso
  32. ### the remaining two partitions are set up according to https://wiki.archlinux.org/index.php/Multiboot_USB_drive#Hybrid_UEFI_GPT_+_BIOS_GPT/MBR_boot
  33.  
  34. set isopath=/boot/iso
  35. # Required to have these available in other configfile files
  36. export theme
  37. export isopath
  38.  
  39. set imgdevpath="/dev/disk/by-label/GLIM"
  40. export imgdevpath
  41.  
  42. # Menu!
  43. # Arch
  44. menuentry "Arch Linux 2017.12.01 x86_64" --class arch {
  45.   set isofile="/boot/grub/iso/archlinux.iso"
  46.   echo "Using Arch..."
  47.   loopback loop $isofile
  48.   linux (loop)/arch/boot/x86_64/vmlinuz img_dev=$imgdevpath img_loop=$isofile
  49.   initrd (loop)/arch/boot/x86_64/archiso.img
  50. }
  51.  
  52. menuentry "Shutdown" --class shutdown {
  53.   halt
  54. }
  55. menuentry "Reboot" --class shutdown {
  56.   reboot
  57. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement