Updated: September 20, 2021
Several weeks ago, I installed Kubuntu 20.04 on my IdeaPad Y50-70, a somewhat old but rather capable 15.6-inch laptop with a 4K screen resolution. Predictably, the device wasn't usable in its native screen mode, and I had to make everything bigger, scaling and all that. In the end, I managed to create an ergonomically comfortable setup, with two exceptions - the login menu, and the boot menu.
The former gave me some grief, but I was able to get it sorted. With GRUB, there were more problems. One, the menu wouldn't show, even though I had a dual-boot configuration in place. Two, the menu was tiny, with the text barely readable. So I embarked on a journey of GRUB modifications, hence this tutorial. Let me show you how you can make the GRUB menu bigger on HD/UHD displays.
We know what the problem is, so no need to dawdle. The only thing you should do is read my GRUB2 tutorial, because it explains the basics of this bootloader, and how and where you can make modifications to its configuration. Without this knowledge, you may not be comfortable with today's work.
Anyway, backup and then open /etc/default/grub in a text editor, as root or sudo. In this file, we will uncomment several existing entries and add a few new ones. Then, we will update the GRUB menu, and on next reboot, things should be fine.
GRUB_DISTRIBUTOR=`lsb_release -i -s 2> /dev/null || echo Debian`
The above snippet of text is taken from my GRUB configuration. Most notably, the entries that are important include:
- GRUB_GFXMODE - This determines the resolution of your GRUB menu. By default, GRUB uses the "vbe" backend, and the resolution you input needs to be supported. You can check the available resolutions by going into the GRUB command line (c in the boot menu), and running vbeprobe. Please note that if you have Secure Boot enabled, you might not get any output. You will need to disable it to get the results, then enable it if you want. If you're not sure, just use the most basic 640x480 option.
- GRUB_GFXPAYLOAD=keep - This tells the bootloader the graphics mode before the standard graphics driver is loaded into memory. The value keep tells GRUB to use the same parameters as defined during the initial startup sequence.
- GRUB_TERMINAL=gfxterm - This tells the bootloader to use a graphical device for its input and output.
If the entries written above do not work for you, you can alternatively try slightly different formats, one by one. Make a change, update the GRUB menu, and then reboot, to see whether you get the desired results. For instance, for the GFXMODE, you can try any one of the options (one at a time!):
- You can also use GRUB_GFXPAYLOAD_LINUX instead of GRUB_GFXPAYLOAD, with/without quotation marks.
- You can also use GRUB_TERMINAL_OUTPUT=gfxterm in addition to (or instead of) GRUB_TERMINAL=gfxterm.
- You can also use different fonts, but this shouldn't be necessary.
Update the GRUB menu
Now, you need to update the menu. On Ubuntu-based systems, just run:
This is in fact a wrapper script for the command you normally use on the likes of Fedora or openSUSE:
sudo grub2-mkconfig -o /boot/grub/grub.cfg
Please note: on some distributions, the GRUB configuration file may be located under grub2 directory, and the file may actually be called grub2.cfg instead of grub.cfg.
Reboot and enjoy a normal-sized GRUB menu.
New technology always brings new challenges. But then, I'm thinking, 4K displays have been around for a long time. My laptop has had it for the past seven years of its existence. I would have assumed the scaling thingie would have been resolved a long time ago. Oh well.
If you find your GRUB menu way too tiny, you can try the above steps to make the displayed entries bigger, and actually usable. Start with the simplest of configuration, and then, see whether you want to see any other tweaks, like background, font size and type, and alike. Make sure you backup your configuration, so if anything goes back, you can quickly and easily revert. And we're done here.