How to Change Grub Theme

When your computer boots up it accesses the boot sector of a particular hard drive. The drive is determined by the settings in the bios boot menu or when manually selecting a drive.

Grub is installed/replaced to the boot sector with sudo grub-install /dev/sda (where sda is the designation of the disk to boot from) or when installing an Operating System, and has a configuration file that is processed when the command sudo update-grub is run. This writes changes to the boot sector of the hard disk.

To check the designations of disks on your system, run this command: lsblk It will list a tree of drives and partitions. Your OS will be installed on a partition named / meaning root. For example on the sda2 partition where the boot partition is sda1 and the drive is called sda.

Say you have found a Grub Theme online and want to install it. The theme probably comes with an installer script which you run from the command line. But, if this does not work, then the wrong configuration file may have been updated.

The regular Grub configuration file is located at: /etc/default/grub. This may be opened in a text editor and the parameters changed for the display resolution and path to a theme etc. And to write the changes to the boot sector, we run sudo update-grub. This will display messages about what theme it detected and what Linux Operating Systems were found to add to the menu.

If your new theme was not found, then consider that the configuration file is somewhere else. In the case of Linux Mint, it is located here: /etc/default/grub.d/60-mint-theme.cfg.

We may specify the path to our theme by editing the value for GRUB_THEME = "path-to-theme/theme.txt".

The theme is likely to be located at: /usr/share/grub/themes/ after running the themes install script.

After editing and saving the config file, remember to run sudo update-grub and check that it finds the theme. If it doesn’t find the theme (maybe because the drive may not be mounted), then the theme should be copied to the boot sector to the path: /boot/grub/themes. Then specify this new path in the config file, and update grub. Now it should find the theme.

To copy the theme recursively and to preserve mode, and ownership, use the command: cp -pr src dest.

Finally, after rebooting, Grub should load using the new Theme.

If you install another OS to another partition it may replace the GRUB bootloader (resetting the theme) if you don’t uncheck this option. But then you need to run sudo update-grub from the command line of your old OS to update GRUB so that it will detect the new OS.