I use dual 28" 4k monitors and I got tired of leaning in and squinting when I need to do something with my grub menu, so I set out to enlarge the menu size. At the same time I decided to make the TTY terminal more readable for the same reason.
To make it complicated, I have a nested grub setup; Initial boot goes to a dedicated grub install which lets me select another grub menu from another install to boot from, and my primary distro is KDEneon which uses a GRUB theme making things more difficult.
First the TTY terminal:
For both installs, the solution is easy. Edit /etc/default/console-setup and change FONTSIZE="8x16" to FONTSIZE="16x32" and reboot. That's it.
Next, the dedicated grub install menu:
This one was fairly easy since it's basic grub.
First, I made a new font to use with grub. I picked "Dejavu-sans". To make a grub font this command is needed:
sudo grub-mkfont -s 32 -o /boot/grub/dejavu-sans-mono.pf2 /usr/share/fonts/truetype/dejavu/DejaVuSansMono.ttf
The "-s 32" means 32 point size font. If you prefer the default grub font - Unicode - you'll have to get a TTF version of it to convert to pf2. I wasn't able to easily locate the Unicode TTF file, so I decided on DejaVu instead.
Then I edited /etc/default/grub and added this line:
GRUB_FONT=/boot/grub/fonts/dejavu-sans-mono.pf2
I also have my GRUB_GFXMODE set to 3840x2160
Now update grub;
sudo update-grub
and reboot. Now my grub install has a nice easily readable menu in 4k.
Finally, the grub theme in KDEneon:
**NOTE** This part is very "hacky" so have a backup and a plan to restore the original file if things break! You've been warned!**
KDEneon uses the "breeze" theme to control it's menu look. This is more complicated to enlarge. The theme look is defined in: /boot/grub/themes/breeze/theme.txt
This file contains sizes and fonts and spacing and lots of other stuff. I made a backup of the original file then tore into it.
This theme uses 3 Unicode fonts: Regular 14, Regular 16, and Bold 16. Again, not having easy access to the Unicode family, I decided to use "Hack". It has the needed Regular and Bold options and is a simple font. I decided to just double the sizes and see how it looked. This time, I made three grub fonts:
sudo grub-mkfont -s 32 -o /boot/grub/themes/breeze/hack-bold-32.pf2 /usr/share/fonts/truetype/hack/Hack-Bold.ttf
sudo grub-mkfont -s 32 -o /boot/grub/themes/breeze/hack-regular-32.pf2 /usr/share/fonts/truetype/hack/Hack-Regular.ttf
sudo grub-mkfont -s 28 -o /boot/grub/themes/breeze/hack-regular-28.pf2 /usr/share/fonts/truetype/hack/Hack-Regular.ttf
Now I had my three fonts. I put them in the same folder as the theme Unicode fonts.
Now to editing the theme file:
First I replaced these:
with these:
I noticed the theme file had several lines in the "Show text progress bar" that set some sizes - all nicely commented so I could see them right away.
so I doubled the parts that seemed like the font would have a effect on.
and left it at that. Ran sudo update-grub to lock it in and make sure I didn't muck anything up, and rebooted.
The results:
Before:
After:
The size is MUCH better but the not all the menu items got placed correctly. I need to widen the menu space and center the timer. Otherwise, I'm very happy.
To make it complicated, I have a nested grub setup; Initial boot goes to a dedicated grub install which lets me select another grub menu from another install to boot from, and my primary distro is KDEneon which uses a GRUB theme making things more difficult.
First the TTY terminal:
For both installs, the solution is easy. Edit /etc/default/console-setup and change FONTSIZE="8x16" to FONTSIZE="16x32" and reboot. That's it.
Next, the dedicated grub install menu:
This one was fairly easy since it's basic grub.
First, I made a new font to use with grub. I picked "Dejavu-sans". To make a grub font this command is needed:
sudo grub-mkfont -s 32 -o /boot/grub/dejavu-sans-mono.pf2 /usr/share/fonts/truetype/dejavu/DejaVuSansMono.ttf
The "-s 32" means 32 point size font. If you prefer the default grub font - Unicode - you'll have to get a TTF version of it to convert to pf2. I wasn't able to easily locate the Unicode TTF file, so I decided on DejaVu instead.
Then I edited /etc/default/grub and added this line:
GRUB_FONT=/boot/grub/fonts/dejavu-sans-mono.pf2
I also have my GRUB_GFXMODE set to 3840x2160
Now update grub;
sudo update-grub
and reboot. Now my grub install has a nice easily readable menu in 4k.
Finally, the grub theme in KDEneon:
**NOTE** This part is very "hacky" so have a backup and a plan to restore the original file if things break! You've been warned!**
KDEneon uses the "breeze" theme to control it's menu look. This is more complicated to enlarge. The theme look is defined in: /boot/grub/themes/breeze/theme.txt
This file contains sizes and fonts and spacing and lots of other stuff. I made a backup of the original file then tore into it.
This theme uses 3 Unicode fonts: Regular 14, Regular 16, and Bold 16. Again, not having easy access to the Unicode family, I decided to use "Hack". It has the needed Regular and Bold options and is a simple font. I decided to just double the sizes and see how it looked. This time, I made three grub fonts:
sudo grub-mkfont -s 32 -o /boot/grub/themes/breeze/hack-bold-32.pf2 /usr/share/fonts/truetype/hack/Hack-Bold.ttf
sudo grub-mkfont -s 32 -o /boot/grub/themes/breeze/hack-regular-32.pf2 /usr/share/fonts/truetype/hack/Hack-Regular.ttf
sudo grub-mkfont -s 28 -o /boot/grub/themes/breeze/hack-regular-28.pf2 /usr/share/fonts/truetype/hack/Hack-Regular.ttf
Now I had my three fonts. I put them in the same folder as the theme Unicode fonts.
Now to editing the theme file:
First I replaced these:
Code:
"Unifont Regular 14" "Unifont Regular 16" "Unifont Bold 16"
Code:
"Hack Regular 28" "Hack Regular 32" "Hack Bold 32"
Code:
top = 50%+66 # (50+16) half menu + spacer width = 400 # same as menu height = 19 # 14pt
Code:
top = 50%+82 # (50+32) half menu + spacer width = 800 # same as menu height = 38 # 28pt
The results:
Before:
After:
The size is MUCH better but the not all the menu items got placed correctly. I need to widen the menu space and center the timer. Otherwise, I'm very happy.
Comment