Skip to Content

GNU GRUB

Posted on

A few generic tweaks I add to Debian/Ubuntu’s configuration file /etc/default/grub of the GNU GRand Unified Bootloader.

Display menu

Default is to hide the boot menu and - after a slight delay - start loading the system. To make the menu visible, comment out the HIDDEN settings and set a TIMEOUT in seconds …

#GRUB_HIDDEN_TIMEOUT=0
#GRUB_HIDDEN_TIMEOUT_QUIET=true
GRUB_TIMEOUT=5

Single menu

Display entries in a single menu …

GRUB_DISABLE_SUBMENU=y

Default kernel

Set last kernel booted as the default selection …

GRUB_DEFAULT=saved
GRUB_SAVEDEFAULT=true

Make some noise

It is a good thing to start Linux with a bit of song …

# How about 'Close Encounters'?
GRUB_INIT_TUNE="480 900 2 1000 2 800 2 400 2 600 3"

Black screen

On some devices I run into this issue: “Black screen instead of password prompt for boot encryption”.

I have to blindly enter the passphrase for my LUKS-encrypted partitions and ALT+F1 to console. Trying to remove GRUB options splash and/or quiet results in the inability to enter the passphrase at all and a hard reset is required.

To fix, add …

# Force the kernel to boot in normal text mode with '=text'
GRUB_GFXPAYLOAD_LINUX=text

Link: GNU gfxpayload

Wallpaper

Add a background image to the menu …

# Wallpaper                                                                     
GRUB_BACKGROUND="/boot/grub/wallpaper.tga"

Update configuration after any modifications …

$ sudo update-grub

Happy (hacking) New Year!