Change grub2 font-size

I searched and searched for the answer to the following question: «How do I change the font size in grub2?» It seems that no one on the entire Internet knew!

Well, I did a lot of digging into the grub2 documentation and the scripts bundled with Ubuntu and I finally have the answer!

1. Pick a font you want to use for your menu. I recommend a nice easy-to-read monospace font such as DejaVu Sans Mono (it's in the example below).
2. Convert the font to grub2's format using the grub-mkfont command, taking the extra step of setting the font size:

sudo grub-mkfont --output=/boot/grub/DejaVuSansMono.pf2 \
--size=24 /usr/share/fonts/truetype/ttf-dejavu/DejaVuSansMono.ttf

3. GRUB_FONT=/boot/grub/DejaVuSansMono.pf2


sudo update-grub

FYI: I believe the "--size=" indicates point size but I'm not entirely sure (the documentation doesn't say). If it is based on the point scale I don't believe it is taking dpi into account since I tried "--size=72" on a 120dpi display and letters were only about half an inch tall (72 points is precisely one inch).

By riskable
  • +1
  • March 22, 2010, 1:16am
  • t0lkman

Comments (0)

RSS Collapse / Expand

Only registered and authorized users can leave comments. Login or Register