3.8. Grub Customization

Pick one of these two ways.

3.8.1. Grub Customizer

Grub Customizer is a graphical interface to configure the GRUB2/BURG settings and menu entries.

Install Grub Customizer:

1sudo add-apt-repository -y ppa:danielrichter2007/grub-customizer
2sudo apt install -y grub-customizer

You may add a background image in the Appearence Settings tab, or with the command line:

  1. create a directory accessible during the boot process, e.g. /boot/grub/images/

  2. copy the background image to this directory

  3. export some variables in /etc/default/grub, e.g.

1export GRUB_BACKGROUND="/boot/grub/images/some-background.png"
2export GRUB_COLOR_NORMAL="light-gray/black"
3export GRUB_COLOR_HIGHLIGHT="light-magenta/black"
  1. apply this change with sudo update-grub

3.8.2. Grub theme

Copy the theme directory inside /boot/grub/themes/ and change the ownership with:

1chown -R root:root /boot/grub/themes/

Reference the theme:

3# Fix error "can't find command hwmatch"
4# https://bugs.launchpad.net/ubuntu/+source/grub2-signed/+bug/1840560/comments/4

Add some metadata to the menu entries:

1# Change the line 491 at the time of writing from:
2echo "submenu '$(gettext_printf "Advanced options for %s" "${OS}" | grub_quote)' \$menuentry_id_option 'gnulinux-advanced-$boot_device_id' {"
3# To:
4echo "submenu '$(gettext_printf "Advanced options for %s" "${OS}" | grub_quote)' -class ubuntu-advanced --class gnu-linux-advanced --class gnu-advanced \$menuentry_id_option 'gnulinux-advanced-$boot_device_id' {"
5#                                                                                ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
1# Change the line 42 at the time of writing from:
2menuentry '$LABEL' \$menuentry_id_option 'uefi-firmware' {
3# To:
4menuentry '$LABEL' --class uefi --class efi \$menuentry_id_option 'uefi-firmware' {
5#                  ^^^^^^^^^^^^^^^^^^^^^^^^

Some references: