28

I would like to reduce the size of the font of GRUB boot loader. Is it possible and so how?

37

After some research based on the answers of @fpmurphy and @hesse, also based on a comprehensive thread at ubuntuforums and on Fedora Wiki, I found out how to reduce the font size of GRUB2.

  1. Choose a font, in this example I chose DejaVuSansMono.ttf
  2. Convert the font in a format GRUB understands:
    sudo grub2-mkfont -s 14 -o /boot/grub2/DejaVuSansMono.pf2 /usr/share/fonts/dejavu/DejaVuSansMono.ttf
  3. Edit the /etc/default/grub file adding a line:
    GRUB_FONT=/boot/grub2/DejaVuSansMono.pf2
  4. Update GRUB configuration with:
    sudo grub2-mkconfig -o /boot/grub2/grub.cfg
  5. reboot.

The resolution of GRUB display may also affect the size of the font, more on resolution etc. on the ubuntuforums link above.

  • 4
    That's cool. With 36px size, the bootloader finally looks good on a high-res display. Works also with grub (grub-mkfont) instead of grub2. – BurninLeo Sep 16 '14 at 17:38
  • 4
    Thanks! grub-mkfont and grub-mkconfig in my case (though I do have grub2). – Deleplace Apr 1 '15 at 21:22
  • when I try to execute the grub-mkfont command I get: Freetype Error 21 loading glyph 0x2c7 for U+0x33f: invalid composite glyph – Aaron N. Brock Oct 16 '17 at 19:10
  • 1
    grub-mkfont and sudo update-grub for me on Ubuntu. Perfect for HiDPI/4k screens – aidan Dec 22 '17 at 10:49
  • On UEFI system one would use grub2-mkconfig -o /boot/efi/EFI/centos/grub.cfg – scrutari Mar 13 at 15:32
4

Yes, both the font and the font size can be customised. See the grub-mkfont utility. Bitmap (.pf2) and Truetype (.ttf) fonts are supported.

Just do an Internet search on grub-mkfont and you will quickly come across a number of examples of the necessary steps.

  • 1
    Nice indeed I found this documentation but somehow I need to update-grub, which command I don't seem to have on Fedora 16 (?). – Benjamin Feb 15 '12 at 12:49
  • OK, I see elsewhere the equivalent of update-grub is grub2-mkconfig -o /boot/grub2/grub.cfg. – Benjamin Feb 15 '12 at 12:51
3

In Debian/Ubuntu you can change the default GRUB resolution, thereby resulting in larger fonts on the GRUB menu:

  1. sudo cp -a /etc/default/grub /etc/default/grub.bak
  2. sudo vi /etc/default/grub
  3. Edit the "GRUB_GFXMODE" entry to suit your resolution e.g. 800x600
  4. sudo update-grub
  5. Reboot - the GRUB will display in the mode you set e.g. 800x600
  • 1
    Should be sudo update-grub - at least on my Ubuntu 17.10. – Alan Mimms Mar 7 '18 at 3:23
  • 1
    You are right it is update-grub. Updated line 4 accordingly. – arunk Nov 13 '18 at 2:12
  • This kind of works at the grub level, but then my X display also has a size of 800x600, urgh. (Intel videocard, FBDEV driver, OpenSUSE Leap 15.0) – David Faure Dec 10 '18 at 17:40
0

If you are looking for a simpler gui alternative, you can use Grub Customiser to change the font size, colors and background of GRUB.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.