Advertisement
Guest User

Untitled

a guest
Aug 13th, 2017
167
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 3.31 KB | None | 0 0
  1. set prefix=(memdisk)/boot/grub
  2.  
  3. insmod nativedisk
  4. insmod ehci
  5. insmod ohci
  6. insmod uhci
  7. insmod usb
  8. insmod usbms
  9. insmod usbserial_pl2303
  10. insmod usbserial_ftdi
  11. insmod usbserial_usbdebug
  12.  
  13. # Serial and keyboard configuration, very important.
  14. serial --speed=115200 --unit=0 --word=8 --parity=no --stop=1
  15. terminal_input --append serial
  16. terminal_output --append serial
  17. terminal_input --append at_keyboard
  18. terminal_output --append cbmemc
  19.  
  20. gfxpayload=keep
  21. terminal_output --append gfxterm
  22.  
  23. # Default to first option, automatically boot after 1 second
  24. set default="0"
  25. set timeout=1
  26.  
  27. # This is useful when using 'cat' on long files on GRUB terminal
  28. set pager=1
  29. insmod jpeg
  30.  
  31. background_image (cbfsdisk)/background.jpg
  32. loadfont (memdisk)/dejavusansmono.pf2
  33.  
  34. keymap usqwerty
  35. function try_user_config {
  36. set root="${1}"
  37. for dir in boot grub grub2 boot/grub boot/grub2; do
  38. for name in '' autoboot_ libreboot_ coreboot_; do
  39. if [ -f /"${dir}"/"${name}"grub.cfg ]; then
  40. configfile /"${dir}"/"${name}"grub.cfg
  41. fi
  42. done
  43. done
  44. }
  45. function search_grub {
  46. for i in 0 1; do
  47. # raw devices
  48. try_user_config "(${1}${i})"
  49. for part in 1 2 3 4 5; do
  50. # MBR/GPT partitions
  51. try_user_config "(${1}${i},${part})"
  52. done
  53. done
  54. }
  55. function try_isolinux_config {
  56. set root="${1}"
  57. for dir in '' /boot; do
  58. if [ -f "${dir}"/isolinux/isolinux.cfg ]; then
  59. syslinux_configfile -i "${dir}"/isolinux/isolinux.cfg
  60. elif [ -f "${dir}"/syslinux/syslinux.cfg ]; then
  61. syslinux_configfile -s "${dir}"/syslinux/syslinux.cfg
  62. fi
  63. done
  64. }
  65. function search_isolinux {
  66. for i in 0 1; do
  67. # raw devices
  68. try_isolinux_config "(${1}${i})"
  69. for part in 1 2 3 4 5; do
  70. # MBR/GPT partitions
  71. try_isolinux_config "(${1}${i},${part})"
  72. done
  73. done
  74. }
  75. set superusers=(redacted info)
  76. menuentry 'Load Parabola from encrypted disk [o]' --hotkey='o' {
  77. cryptomount -a ahci0
  78. set root='lvm/matrix-root'
  79. linux /boot/vmlinuz-linux-libre root=/dev/matrix/root cryptdevice=/dev/sda1:root cryptkey=rootfs:/etc/ssdkey ipv6.disable=1
  80. initrd /boot/initramfs-linux-libre.img
  81. }
  82. menuentry 'Load Parabola from encrypted disk (lts) [p]' --hotkey='p' {
  83. cryptomount -a ahci0
  84. set root='lvm/matrix-root'
  85. linux /boot/vmlinuz-linux-libre-lts root=/dev/matrix/root cryptdevice=/dev/sda1:root cryptkey=rootfs:/etc/ssdkey ipv6.disable=1
  86. initrd /boot/initramfs-linux-libre-lts.img
  87. }
  88. menuentry 'Load Parabola from encrypted disk (grsec) [l]' --hotkey='l' {
  89. cryptomount -a ahci0
  90. set root='lvm/matrix-root'
  91. linux /boot/vmlinuz-linux-libre-grsec root=/dev/matrix/root cryptdevice=/dev/sda1:root cryptkey=rootfs:/etc/ssdkey ipv6.disable=1
  92. initrd /boot/initramfs-linux-libre-grsec.img
  93. }
  94. menuentry 'Search ISOLINUX menu (AHCI) [a]' --hotkey='a' {
  95. search_isolinux ahci
  96. }
  97. menuentry 'Search ISOLINUX menu (USB) [u]' --hotkey='u' {
  98. search_isolinux usb
  99. }
  100. menuentry 'Search ISOLINUX menu (CD/DVD) [d]' --hotkey='d' {
  101. insmod ata
  102. for dev in ata0 ahci1; do
  103. try_isolinux_config "(${dev})"
  104. done
  105. }
  106. menuentry 'Load test configuration (grubtest.cfg) inside of CBFS [t]' --hotkey='t' {
  107. set root='(cbfsdisk)'
  108. configfile /grubtest.cfg
  109. }
  110. menuentry 'Search for GRUB2 configuration on external media [s]' --hotkey='s' {
  111. search_grub usb
  112. }
  113. menuentry 'Poweroff [p]' --hotkey='p' {
  114. halt
  115. }
  116. menuentry 'Reboot [r]' --hotkey='r' {
  117. reboot
  118. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement