How to Change GRUB Menu Font Size on Linux

Enhance your Linux boot menu with larger fonts! This guide shows you how to change the GRUB menu font size for a better startup display.

For many users, the default font size in the GRUB (GRand Unified Bootloader) menu can be straining to the eyes, especially on high-resolution displays or for those with visual impairments.

This guide is designed to walk you through the process of enlarging the font size in your GRUB bootloader, enhancing not just the aesthetics of your boot menu but also its accessibility and usability.

This change caters to your personal preferences and ensures you can comfortably navigate your boot options, a crucial aspect of troubleshooting and system management. So, without further ado, letโ€™s dive in and give your Linux boot menu the facelift it deserves with larger, clearer fonts!

Step 1: Font Conversion to GRUB Readable Format

Given the limitations of the preboot environment, GRUB fonts are optimized for readability and simplicity. They do not have the same anti-aliasing or typographic refinement level found in fonts used within a fully loaded operating system.

In other words, you canโ€™t just take a font in the familiar TTF, OTF, WOFF, and so on formats and use it in GRUB. Instead, it uses its one with the extension PF2. Itโ€™s designed explicitly for preboot environments where standard operating system services and drivers are unavailable.

Fortunately, users can convert almost any font into the GRUB-compatible format with the help of the grub-mkfont command. So, our first step is to create one.

DejaVu Sans is a great candidate for this, offering a full range of character support. So go to its official website, download it (โ€œdejavu-fonts-ttf-2.37.zipโ€œ), and unzip the file. You will find many font varieties in the resulting โ€œttfโ€ folder, but the file we are interested in is โ€œDejaVuSansMono.ttf.โ€

Next, run the command below to convert the font to PF2, with the last argument being the full path to our TTF file:

sudo grub-mkfont -s 24 -o /boot/grub/dejavu-sans-mono.pf2 ./Downloads/dejavu-fonts-ttf-2.37/ttf/DejaVuSansMono.ttf
  • -s: Sets the size of the generated font
  • -o: Sets the commandโ€™s output to a file, providing the full path to the directory where we want it to be created.

Let’s now list the contents of “/boot/grub” to ensure the newly generated font was successfully created in it.

ls -l /boot/grub/
The โ€œdejavu-sans-mono.pf2โ€ font file was successfully created.
The โ€œdejavu-sans-mono.pf2โ€ font file was successfully created.

Step 2: Modify GRUB Config File

We need to change the bootloader configuration to tell GRUB to use the newly generated โ€œdejavu-sans-mono.pf2โ€ font file.

GRUB’s default values are typically located in the “/etc/default/grub” file. However, creating a backup of this file is advisable before making any changes.

sudo cp /etc/default/grub /etc/default/grub.bakCode language: JavaScript (javascript)

Then open the file with your preferred terminal text editor:

sudo nano /etc/default/grubCode language: JavaScript (javascript)

Add the following line at the end specifying the absolute path to the PF2 font file:

GRUB_FONT=/boot/grub/dejavu-sans-mono.pf2Code language: JavaScript (javascript)
Specify the absolute path to the PF2 font file used by GRUB.
Specify the absolute path to the PF2 font file used by GRUB.

Furthermore, for enhanced visual appeal, the resolution of GRUB can be adjusted, creating ample space for the menu display. We will opt for a 1600x1200px, which can be set through the โ€œGRUB_GFXMODEโ€ parameter.

GRUB_GFXMODE=1600x1200
Setting up the GRUB screen resolution.
Setting up the GRUB screen resolution.

Save the file and exit.

Always keep something in mind, though – the font size in the GRUB menu will appear smaller when a higher resolution is chosen. So, it’s essential to recognize this relationship between resolution size and font appearance.

Step 3: Update the GRUB Configuration

As the last step, you need to update GRUB for the changes to take effect. This is typically done with the following command:

sudo grub-mkconfig -o /boot/grub/grub.cfg
Update the GRUB configuration
Update the GRUB configuration

Finally, reboot your system to see the changes take effect.

Successfully changed the GRUB menu font size.
Successfully changed the GRUB menu font size.

Itโ€™s time for some self-congratulations โ€“ youโ€™ve successfully expanded the size of your GRUB menu, now featuring a noticeably larger and easily readable font.

Conclusion

Enhancing the appearance of your Linux boot menu by increasing the font size in the GRUB menu is a straightforward yet impactful modification.

This guide has walked you through the steps necessary to achieve a clearer, more readable startup display, adding an element of customization and improved usability to your system.

Thanks for your time! As always, your feedback and comments are most welcome.

Bobby Borisov

Bobby Borisov

Bobby, an editor-in-chief at Linuxiac, is a Linux professional with over 20 years of experience. With a strong focus on Linux and open-source software, he has worked as a Senior Linux System Administrator, Software Developer, and DevOps Engineer for small and large multinational companies.

Think You're an Ubuntu Expert? Let's Find Out!

Put your knowledge to the test in our lightning-fast Ubuntu quiz!
Ten questions to challenge yourself to see if you're a Linux legend or just a penguin in the making.

1 / 10

Ubuntu is an ancient African word that means:

2 / 10

Who is the Ubuntu's founder?

3 / 10

What year was the first official Ubuntu release?

4 / 10

What does the Ubuntu logo symbolize?

5 / 10

What package format does Ubuntu use for installing software?

6 / 10

When are Ubuntu's LTS versions released?

7 / 10

What is Unity?

8 / 10

What are Ubuntu versions named after?

9 / 10

What's Ubuntu Core?

10 / 10

Which Ubuntu version is Snap introduced?

The average score is 68%