How to Customize the Grub Boot Menu With a Background Image

Want to change the background image for the Grub bootloader? Maybe you got bored of the solid black background and now you want to add an attractive image to your boot menu.

Here’s how you can easily change the Grub background on your Linux machine.

How to Change Grub Background

Most of the Linux users are unaware of the fact that the Grub bootloader can be customized according to their needs. You can change the boot order, modify the background color, and add a new image to the boot menu as well.

There are several ways to modify the background image in Grub. You can do it by either using your system’s file manager or via the command-line.

But before getting practical, there are some things that you should know. The image that you are going to use as the background should be either of the following extensions: PNG, JPG, and TGA.

Also, the JPG/JPEG images should be 8-bit (256 colors) non-indexed files. It’s better to stick to a PNG image if you don’t want to mess around with bits and image indexing.

Change Background via Command-Line

The Grub configuration file or grub.cfg is stored in the /etc/default folder. You can edit the file using gedit, a command-line tool that lets you edit important system files on your computer with minimal risks.

To change the Grub boot menu background through the terminal:

  1. Copy the path to the image file.
  2. Open the grub.cfg file located in /etc/default.
    gedit /etc/default/grub.cfg
  3. Append the following line to the file. Note that you must replace the /path-to-image with the path that you have just copied.
    GRUB_BACKGROUND=/path-to-image
  4. Save the file and close the editor.
  5. Update Grub with the new configuration file.
    sudo update-grub

You will see an output that will look something like this. Note that the second line will confirm if Grub has detected the background image or not.

Generating grub.cfg …
Found background image: ~/Pictures/yourpicture.png
Found linux image: /boot/vmlinuz-2.6.39-0-generic
Found initrd image: /boot/initrd.img-2.6.39-0-generic
Found linux image: /boot/vmlinuz-2.6.38-8-generic
Found initrd image: /boot/initrd.img-2.6.38-8-generic
Found memtest86+ image: /boot/memtest86+.bin
done

Reboot your system and check if the background image was successfully changed.

Modify Grub Background Using a File Manager

Those who are not comfortable with the terminal can use any Linux file manager to change the Grub background image.

  1. Open the default file manager on your system as a root user.
  2. Copy the image file that you want to use as the background image.
  3. Paste the file under /boot/grub directory.
  4. Update grub to ensure that the changes are configured.
    sudo update-grub
  5. Check to see if Grub has detected the background image or not.
Generating grub.cfg …
Found background image: ~/Pictures/yourpicture.png
Found linux image: /boot/vmlinuz-2.6.39-0-generic
Found initrd image: /boot/initrd.img-2.6.39-0-generic
Found linux image: /boot/vmlinuz-2.6.38-8-generic
Found initrd image: /boot/initrd.img-2.6.38-8-generic
Found memtest86+ image: /boot/memtest86+.bin
done

If you paste multiple images to the /boot/grub directory, then grub will load the first image and ignore the rest. You can copy the files using the cp command as well.

Note that your system will not allow you to paste the image file in the /boot/grub folder unless you launch the file manager as a superuser. You can open any Linux application as a root user by typing the following in your terminal.

sudo file-manager-name

For example, if you are using the GNOME desktop environment on Ubuntu Linux, then Nautilus will be your default file manager. To launch Nautilus as a root user:

sudo nautilus

Customizing Grub Bootloader on Linux

You can customize the Grub bootloader by simply editing the /etc/default/grub.cfg file. Grub allows users to tweak even the slightest of details in the boot menu.

For beginners, Linux might be a bit hard to adapt to. Even the installation seems a bit complicated for the first time. Dual-booting multiple operating systems on a computer comes with a risk factor that every novice should know about.

Source: makeuseof.com

Related posts

What are AI PCs, and What Makes Them Different?

I Took the Same Photos With My Phone and Camera: Which One Did It Better?

I Really Want My Next Laptop to Have 5G: Here’s Why