Design your own boot menu with Grub Customizer
Paint by Numbers
Is the simple black and white GRUB menu causing confusion and obscuring important choices? Why not customize with GRUB themes and the Grub Customizer?
Many Linux distributions keep the boot menu so simple that it hardly differs from the BIOS messages. If you settle for the default boot menu, you might be missing the chance to provide some visual enhancement to the user experience. The need for visual clarity is often more than cosmetic. The boot menu sometimes contains real choices, including alternative boot options and operating system versions, and some attention to design can make those choices much easier to see and understand.
With just a few settings, you can spice up a drab and confusing boot menu. But be aware that incorrect GRUB settings can quickly cause the boot process to fail. A tool with a graphical user interface can help ensure that editing the GRUB files is a safe experience. On the other hand, editing the files manually is a time-honored practice if you know what you are doing, and it might be your only option: Some Linux distributions don't provide a graphical tool.
First Step: Backup
But before you get started, you will want to back up the boot partition or boot directory: A faulty GRUB configuration can quickly lead to entries disappearing from the boot menu or a system unable to boot. Use the commands in Listing 1 to create the necessary backup copies.
Listing 1
Backup!
# dd if=Partition of=/Path/filename.img status=progress; sync # rsync -vuar /source_directory/ /target_directory/
GRUB Themes
On Gnome-Look.org, you will find ready-made GRUB themes with matching font types and sizes, background images, and colors [1]. Download your choice of theme and unpack it; then place it in the GRUB theme directory.
For some distributions, the theme directory is located in /boot/grub2/themes/
; others prefer the path /boot/grub/themes/
. If a theme directory does not exist, create it with the mkdir
command.
To make sure that the theme works, first test it with the grub2-theme-preview
tool [2]. Many distributions do not have this tool in their repositories, so you have to download and compile it yourself. Then emulate booting with the last command from Listing 2 (Figure 1).
Listing 2
Testing the Theme
<font color="#ffff00">-=https://github.com/hartwork/grub2-theme-preview/archive/master.zip=- proudly presents <font color="#ffff00">-==- proudly presents $ cd /directory_name $ sudo make install $ grub2-theme-preview /path/grub-themes/theme_name --grub2-mkrescue command_sequence
You only need the --grub2-mkrescue
option if the command is different in the distribution you are using. Enter the appropriate command sequence after the --grub2-mkrescue
option. If you don't know the command, open a terminal and type grub
lowercase. Then press the Tab key and search the Bash suggestions for the appropriate command.
After testing the theme, open the /etc/default/grub
configuration file as root and enter the path to the theme (Listing 3). Check in advance whether a file named theme.txt
exists in the theme directory. The theme.txt
file contains the configuration for the theme.
Listing 3
Specifying a Grub Theme
GRUB_THEME="/path/Grub-Themes/theme_name/theme.txt"
In order for the changes to take effect the next time the computer is restarted, you need to update the configuration file grub.cfg
. Call the command in Listing 4 as root.
Listing 4
Updating the Grub Configuration
# grub-mkconfig -o /path/grub/grub.cfg
GRUB searches the boot directory for kernel images and writes the names of the filenames' image files to the GRUB configuration file. GRUB accesses this list during the boot process to generate a list of the operating system choices.
Grub Customizer
Some distributions, including Fedora and Ubuntu, have Grub Customizer [3] in their repositories. Grub Customizer lets you include or change themes in a graphical user interface, adjusting settings that alter the appearance of the boot menu and making further changes to the configuration.
To customize the appearance of the boot menu, first launch Grub Customizer. On Fedora, look in the menu under System | System Administration | Grub Customizer. You can also enter the grub-customizer
command from a root console.
In the List configuration tab, you can change the boot order of the operating systems found by GRUB by right-clicking an entry and selecting the up or down arrows to move the entry to a new location.
Under General Settings you can define the timeout (i.e., the time in seconds that GRUB waits until it continues booting the default entry without user interaction). The standard entry itself can also be modified (Figure 2). If necessary, uncheck show menu to completely hide the boot menu, so that users no longer have the option to select an operating system when starting GRUB.
Finally, you can include a theme in the Appearance settings tab by clicking on the plus symbol top right and selecting the path to the theme's archive. You can then edit the theme by selecting theme.txt
in the file list on the left (Figure 3). When the changes are complete, click Save, which internally triggers the grub-mkconfig
command.
Buy this article as PDF
(incl. VAT)
Buy Linux Magazine
Subscribe to our Linux Newsletters
Find Linux and Open Source Jobs
Subscribe to our ADMIN Newsletters
Support Our Work
Linux Magazine content is made possible with support from readers like you. Please consider contributing when you’ve found an article to be beneficial.
News
-
Canonical Bumps LTS Support to 12 years
If you're worried that your Ubuntu LTS release won't be supported long enough to last, Canonical has a surprise for you in the form of 12 years of security coverage.
-
Fedora 40 Beta Released Soon
With the official release of Fedora 40 coming in April, it's almost time to download the beta and see what's new.
-
New Pentesting Distribution to Compete with Kali Linux
SnoopGod is now available for your testing needs
-
Juno Computers Launches Another Linux Laptop
If you're looking for a powerhouse laptop that runs Ubuntu, the Juno Computers Neptune 17 v6 should be on your radar.
-
ZorinOS 17.1 Released, Includes Improved Windows App Support
If you need or desire to run Windows applications on Linux, there's one distribution intent on making that easier for you and its new release further improves that feature.
-
Linux Market Share Surpasses 4% for the First Time
Look out Windows and macOS, Linux is on the rise and has even topped ChromeOS to become the fourth most widely used OS around the globe.
-
KDE’s Plasma 6 Officially Available
KDE’s Plasma 6.0 "Megarelease" has happened, and it's brimming with new features, polish, and performance.
-
Latest Version of Tails Unleashed
Tails 6.0 is based on Debian 12 and includes GNOME 43.
-
KDE Announces New Slimbook V with Plenty of Power and KDE’s Plasma 6
If you're a fan of KDE Plasma, you'll be thrilled to hear they've announced a new Slimbook with an AMD CPU and the latest version of KDE Plasma desktop.
-
Monthly Sponsorship Includes Early Access to elementary OS 8
If you want to get a glimpse of what's in the pipeline for elementary OS 8, just set up a monthly sponsorship to help fund its continued existence.