Wednesday, 11 November 2015

How to Customize Grub

This post willl tell you how to  customize Grub to change the default operating system that is loaded and to change its background image. So let's begin!

Grub stands for Grand Unified Bootloader. For those of you who don't know, it is a multiboot bootloader usually found in dual-boot systems. In simple words, it is the screen that allows you to select the operating system you want to use when you switch on your computer. You can make a lot of changes to it, but here we show you a couple of them. Note that the configuration file is present at /etc/default/grub. You can edit it by typing sudo nano /etc/default/grub (or using any other text editor like vi,kate,gedit etc).

How to Customize Grub: Change Default Operating System


If you don't select an operating system, grub automatically loads up an OS after a specific amount of time, usually the first OS in its list. To change the default operating system to, say the second OS in the list, type the following line in the /etc/default/grub file:
GRUB_DEFAULT=1

To set the default OS to third item in the list, change 1 with 2 and so on.

You can also set the default OS to the one that you used the last time. To do so, type:
GRUB_DEFAULT=saved
GRUB_SAVEDEFAULT="true"

How to Customize Grub: Change Background Image


Type the following line in the file:
GRUB_BACKGROUND="path_to_image"

Replace path_to_image with the path where the image file is stored. Here's an example:
GRUB_BACKGROUND="/home/niks/Desktop/maxresdefault.jpg"


Saving Changes



The changes that you just made need to be updated. To do so in Ubuntu, type:
sudo update-grub

If the above line does not work for your OS, type:
sudo grub-mkconfig -o /boot/grub/grub.cfg

Then, restart your system to see the effect!

Do tell us how did you customize your grub in the comments!

No comments:

Post a Comment