Linux, Operating System

Settings GRUB in Ubuntu

settings-grub-in-ubuntu

Settings GRUB in Ubuntu
After install Ubuntu, the GRUB will also be installed.
However, the default GRUB view is quite depressing.
Follow this instruction you can edit you GRUB more colourful.
Remember, you cannot start your GRUB, if you edit the GRUB wrongly.

1. Editing GRUB menu color

GRUB cannot accept RGB value, only accept color words below

blackbluebrowncyan
dark-graygreenlight-cyanlight-blue
light-greenlight-graylight-magentalight-red
magentaredwhiteyellow

Settings GRUB in Ubuntu
Settings GRUB in Ubuntu
Settings GRUB in Ubuntu
Open Terminal and type

sudo gedit /etc/grub.d/05_debian_theme

You should find “set menu_color_normal” and “set menu_color_highlight” statements
set menu_color_normal is the color of deselected item in menu
The first color is the color of text (including the border lines)
The second color is the color of menu
set menu_color_highlight is the color of the selected item in menu
The first color is the color of text
The second color is the color of the selecting rectangle
If the second color is black, it will be transparent
After modify the file, return to Terminal and type

sudo update-grub

And then reboot the computer and you can see your GRUB is modified

2. Customized Menu Items to GRUB
Settings GRUB in Ubuntu
Settings GRUB in Ubuntu
Settings GRUB in Ubuntu
Settings GRUB in Ubuntu
Settings GRUB in Ubuntu
Settings GRUB in Ubuntu
Open Terminal and type

gedit /boot/grub/grub.cfg

Press Ctrl + Shelf + T to open a new tab in Terminal (or open other Terminal) and type

cd /etc/grub.d/
sudo chmod -x 10_linux 20_memtest86+ 30_os-prober
sudo gedit 40_custom

copy the menuentry data from /boot/grub/grub.cfg to /etc/grub.d/40_custom
We don’t suggest to modify the data inside the menuentry, but you can change the name of menuentry, but you should not use special characters.
After modify the file, return to Terminal and type

sudo update-grub

And then reboot the computer and you can see your GRUB is modified.

3. Add a background image to GRUB
We suggest you use PNG image format for the GRUB background image.
Settings GRUB in Ubuntu
Settings GRUB in Ubuntu
Settings GRUB in Ubuntu
Settings GRUB in Ubuntu
Open Terminal and use mv or cp commands (with super user) to move or copy your images to the /boot/grub/
Type

sudo gedit /etc/grub.d/05_debian_theme

You should find “for i in {/boot/grub,/usr/share/images/desktop-base}/” statement
You can see something like “for i in {/boot/grub,/usr/share/images/desktop-base}/image_file_name.{png,tga} ; do
Change the image_file_name to your image file name (excludes file extension) which you would like to use in GRUB background image.
After modify the file, return to Terminal and type

sudo update-grub

You can see Found Debian background: your image file if your image file detected by GRUB
And then reboot the computer and you can see your GRUB is modified.

4. Change GRUB resolution
The default resolution of GRUB is 640×480, also we can modify the resolution of GRUB.
We suggest you use regular resolution only, like 800×600, 1024×768… etc.
Or you can reboot you computer and press C in the GRUB and type vbeinfo in GRUB command line to get the GRUB which resolution can be accepted.
Settings GRUB in Ubuntu
Settings GRUB in Ubuntu
Settings GRUB in Ubuntu
Settings GRUB in Ubuntu
Settings GRUB in Ubuntu
Settings GRUB in Ubuntu
Open Terminal and type

sudo gedit /etc/default/grub

You should find “GRUB_GFXMODE
Basically, the default settings GRUB_GFXMODE is commented by a # symbol
Delete the # to uncomment the statement (or rewrite the statement).
Set the value of GRUB_GFXMODE (for example: 800×600).
You can also change the background image with relative size
After modify the file, return to Terminal and type

sudo update-grub

And then reboot the computer and you can see your GRUB is modified.

5. Editing GRUB menu color with background image
Settings GRUB in Ubuntu
Settings GRUB in Ubuntu
Settings GRUB in Ubuntu
Open Terminal and type

sudo gedit /etc/grub.d/05_debian_theme

You should find “set color_normal” and “set color_highlight” statements
set color_normal is the color of deselected item in menu
The first color is the color of text (including the border lines)
The second color is the color of menu
set color_highlight is the color of the selected item in menu
The first color is the color of text
The second color is the color of the selecting rectangle
If the second color is black, it will be transparent
After modify the file, return to Terminal and type

sudo update-grub

And then reboot the computer and you can see your GRUB is modified

The images below show using the wrong image size and resolution
Settings GRUB in Ubuntu
Settings GRUB in Ubuntu