diff options
Diffstat (limited to 'projects/grub/install/vesafb')
-rw-r--r-- | projects/grub/install/vesafb/grub.cfg | 21 | ||||
-rw-r--r-- | projects/grub/install/vesafb/grubtest.cfg | 21 |
2 files changed, 32 insertions, 10 deletions
diff --git a/projects/grub/install/vesafb/grub.cfg b/projects/grub/install/vesafb/grub.cfg index c2c14356..40061053 100644 --- a/projects/grub/install/vesafb/grub.cfg +++ b/projects/grub/install/vesafb/grub.cfg @@ -9,6 +9,7 @@ insmod usbms insmod usbserial_pl2303 insmod usbserial_ftdi insmod usbserial_usbdebug +insmod png # Serial and keyboard configuration, very important. serial --speed=115200 --unit=0 --word=8 --parity=no --stop=1 @@ -20,16 +21,16 @@ terminal_output --append cbmemc gfxpayload=keep terminal_output --append gfxterm +# Prettify GRUB +background_image (cbfsdisk)/background.png +loadfont (memdisk)/dejavusansmono.pf2 + # 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 png - -background_image (cbfsdisk)/background.png -loadfont (memdisk)/dejavusansmono.pf2 function try_user_config { set root="${1}" @@ -42,6 +43,7 @@ function try_user_config { done done } + function search_grub { for i in 0 1; do # raw devices @@ -52,6 +54,7 @@ function search_grub { done done } + function try_isolinux_config { set root="${1}" for dir in '' /boot; do @@ -62,6 +65,7 @@ function try_isolinux_config { fi done } + function search_isolinux { for i in 0 1; do # raw devices @@ -72,6 +76,7 @@ function search_isolinux { done done } + menuentry 'Load Operating System (incl. fully encrypted disks) [o]' --hotkey='o' { # GRUB2 handles (almost) every possible disk setup, but only the location of # /boot is actually important since GRUB2 only loads the user's config. @@ -138,29 +143,35 @@ menuentry 'Load Operating System (incl. fully encrypted disks) [o]' --hotkey='o fi done } + 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 ata1 ata2 ata3 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 } - diff --git a/projects/grub/install/vesafb/grubtest.cfg b/projects/grub/install/vesafb/grubtest.cfg index bd6f4560..d0e0b46e 100644 --- a/projects/grub/install/vesafb/grubtest.cfg +++ b/projects/grub/install/vesafb/grubtest.cfg @@ -9,6 +9,7 @@ insmod usbms insmod usbserial_pl2303 insmod usbserial_ftdi insmod usbserial_usbdebug +insmod png # Serial and keyboard configuration, very important. serial --speed=115200 --unit=0 --word=8 --parity=no --stop=1 @@ -20,16 +21,16 @@ terminal_output --append cbmemc gfxpayload=keep terminal_output --append gfxterm +# Prettify GRUB +background_image (cbfsdisk)/background.png +loadfont (memdisk)/dejavusansmono.pf2 + # 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 png - -background_image (cbfsdisk)/background.png -loadfont (memdisk)/dejavusansmono.pf2 function try_user_config { set root="${1}" @@ -42,6 +43,7 @@ function try_user_config { done done } + function search_grub { for i in 0 1; do # raw devices @@ -52,6 +54,7 @@ function search_grub { done done } + function try_isolinux_config { set root="${1}" for dir in '' /boot; do @@ -62,6 +65,7 @@ function try_isolinux_config { fi done } + function search_isolinux { for i in 0 1; do # raw devices @@ -72,6 +76,7 @@ function search_isolinux { done done } + menuentry 'Load Operating System (incl. fully encrypted disks) [o]' --hotkey='o' { # GRUB2 handles (almost) every possible disk setup, but only the location of # /boot is actually important since GRUB2 only loads the user's config. @@ -138,29 +143,35 @@ menuentry 'Load Operating System (incl. fully encrypted disks) [o]' --hotkey='o fi done } + 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 ata1 ata2 ata3 ahci1; do try_isolinux_config "(${dev})" done } + menuentry 'Load standard configuration (grub.cfg) inside of CBFS [t]' --hotkey='t' { set root='(cbfsdisk)' configfile /grub.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 } - |