GRUBv2 is the next iteration of the immensely popular GRUB boot loader. It offers improved capabilities like a graphical interface and better design. If you are fan of mods like me and tried the previous tutorial with GRUBv2, you would have realized it no longer works that way. So let’s update the steps and see how we can create a custom GRUB 2 splash image.
- Choose a photo of your choice and open it up in GIMP. Unlike the previous tutorial for GRUB, where you had to choose fairly subdued images which didn’t have a lot of colors or gradients, you can be a bit more extravagant with image selection in GRUB 2
- Once you have it open, resize it to 640 x 480 pixels. (You can use different dimensions, but that requires a bit of extra effort as we shall see below). To do so, go to the image menu and choose scale.
- You can modify the image to your liking, perhaps add a motivational quote or your company’s logo or anything you want.
- Now go to File > Save as. In the dialog that appears, choose to save the file as .tga file.
With the image ready, its time to get into configuration mode. A lot has changed in GRUB2, so read along even if you are familiar with the procedure for the legacy GRUB loader.
- First off, you need to copy the file to the appropriate directory so that you can tell GRUB about it. So copy the file you just created to /boot/grub directory.
- Fire up your favorite text editor and point it to /etc/grub.d/05_debian_theme. Now look for a line mentioning image files. On my system, it is line number 16 of the said file and looks like this:
- We need to edit it and replace the image file name, with the name of the file you saved in previous steps (sunrise_splash in my case)
We are almost done here, now issue the sudo update-grub2 command and verify it completes successfully. It tells you if it found the image you mentioned. If it doesn’t, it most likely means that you missed something in the steps mentioned above.
You can refer to this Debian Wiki page for more details on GRUBv2 splash images. The wiki also lists template files that you can use as a guide when creating your own custom splashimages. If you want to use higher resolution images and not merely 640 x 480 ones, you can do so by editing /etc/default/grub. Remove the # sign if it exists on the line that lists – GRUB_GFXMODE and change its value to the custom resolution you want to use. Keep in mind that not all resolutions may be available. You can view a list of available resolutions by pressing ‘c’ on the GRUB menu and then using the command vbeinfo.
If all goes well, you should be able to view your custom splashscreen the next time GRUB menu is displayed. If the image is not displayed correctly you might want to change the resolution to match the one listed in the /etc/default/grub file. Remember the default is 640 x 480. In case you are running short on imaginative ideas, you can install the grub2-splashimages package, that will give you a set of images that you can use as a splashscreen.
Give it a spin and let us know how things went. We would also love to see your custom splashimages if you feel like sharing them with the world!