Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- set prefix=(memdisk)/boot/grub
- insmod nativedisk
- insmod ehci
- insmod ohci
- insmod uhci
- insmod usb
- insmod usbms
- insmod usbserial_pl2303
- insmod usbserial_ftdi
- insmod usbserial_usbdebug
- # Serial and keyboard configuration, very important.
- serial --speed=115200 --unit=0 --word=8 --parity=no --stop=1
- terminal_input --append serial
- terminal_output --append serial
- terminal_input --append at_keyboard
- terminal_output --append cbmemc
- gfxpayload=keep
- terminal_output --append gfxterm
- # Default to first option, automatically boot after 1 second
- set default="0"
- set timeout=1
- # This is useful when using 'cat' on long files on GRUB terminal
- set pager=1
- insmod jpeg
- background_image (cbfsdisk)/background.jpg
- loadfont (memdisk)/dejavusansmono.pf2
- keymap usqwerty
- function try_user_config {
- set root="${1}"
- for dir in boot grub grub2 boot/grub boot/grub2; do
- for name in '' autoboot_ libreboot_ coreboot_; do
- if [ -f /"${dir}"/"${name}"grub.cfg ]; then
- configfile /"${dir}"/"${name}"grub.cfg
- fi
- done
- done
- }
- function search_grub {
- for i in 0 1; do
- # raw devices
- try_user_config "(${1}${i})"
- for part in 1 2 3 4 5; do
- # MBR/GPT partitions
- try_user_config "(${1}${i},${part})"
- done
- done
- }
- function try_isolinux_config {
- set root="${1}"
- for dir in '' /boot; do
- if [ -f "${dir}"/isolinux/isolinux.cfg ]; then
- syslinux_configfile -i "${dir}"/isolinux/isolinux.cfg
- elif [ -f "${dir}"/syslinux/syslinux.cfg ]; then
- syslinux_configfile -s "${dir}"/syslinux/syslinux.cfg
- fi
- done
- }
- function search_isolinux {
- for i in 0 1; do
- # raw devices
- try_isolinux_config "(${1}${i})"
- for part in 1 2 3 4 5; do
- # MBR/GPT partitions
- try_isolinux_config "(${1}${i},${part})"
- done
- done
- }
- set superusers=(redacted info)
- menuentry 'Load Parabola from encrypted disk [o]' --hotkey='o' {
- cryptomount -a ahci0
- set root='lvm/matrix-root'
- linux /boot/vmlinuz-linux-libre root=/dev/matrix/root cryptdevice=/dev/sda1:root cryptkey=rootfs:/etc/ssdkey ipv6.disable=1
- initrd /boot/initramfs-linux-libre.img
- }
- menuentry 'Load Parabola from encrypted disk (lts) [p]' --hotkey='p' {
- cryptomount -a ahci0
- set root='lvm/matrix-root'
- linux /boot/vmlinuz-linux-libre-lts root=/dev/matrix/root cryptdevice=/dev/sda1:root cryptkey=rootfs:/etc/ssdkey ipv6.disable=1
- initrd /boot/initramfs-linux-libre-lts.img
- }
- menuentry 'Load Parabola from encrypted disk (grsec) [l]' --hotkey='l' {
- cryptomount -a ahci0
- set root='lvm/matrix-root'
- linux /boot/vmlinuz-linux-libre-grsec root=/dev/matrix/root cryptdevice=/dev/sda1:root cryptkey=rootfs:/etc/ssdkey ipv6.disable=1
- initrd /boot/initramfs-linux-libre-grsec.img
- }
- menuentry 'Search ISOLINUX menu (AHCI) [a]' --hotkey='a' {
- search_isolinux ahci
- }
- menuentry 'Search ISOLINUX menu (USB) [u]' --hotkey='u' {
- search_isolinux usb
- }
- menuentry 'Search ISOLINUX menu (CD/DVD) [d]' --hotkey='d' {
- insmod ata
- for dev in ata0 ahci1; do
- try_isolinux_config "(${dev})"
- done
- }
- menuentry 'Load test configuration (grubtest.cfg) inside of CBFS [t]' --hotkey='t' {
- set root='(cbfsdisk)'
- configfile /grubtest.cfg
- }
- menuentry 'Search for GRUB2 configuration on external media [s]' --hotkey='s' {
- search_grub usb
- }
- menuentry 'Poweroff [p]' --hotkey='p' {
- halt
- }
- menuentry 'Reboot [r]' --hotkey='r' {
- reboot
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement