Daily Ubuntu / Linux news and application reviews.

grub2 ubuntu

GRUB 2 is a new boot loader which comes with Ubuntu Karmic Koala. GRUB 2 is in charge of showing the menu that allows you to choose the operating system or Kernel version when your computer starts.


Changing GRUB2 Splash Image


The Ubuntu repositories already include a set of background images for GRUB 2; the package is called grub2-splashimages. To install it, simply open a terminal and paste this:
sudo apt-get install grub2-splashimages


The installation script will copy a series of images adapted to work for GRUB2, into /usr/share/images/grub

Copy the images to /boot/grub, that way if someone has an installation with a separate /boot with an encrypted file system for / , they can still use the images. (GRUB can't 'see' inside an encrypted file system):

sudo cp /usr/share/images/grub/*.tga /boot/grub/

The GRUB 2 splash images are controlled by /etc/grub.d/05_debian_theme. Open this file for editing:
gksudo gedit /etc/grub.d/05_debian_theme

Find the following line and edit the highlighted area, replacing it with the grub splash image you wish to use (and located in /usr/share/images/grub):
for i in {/boot/grub,/usr/share/images/grub}/moreblue-orbit-grub.{png,tga} ; do


Here are the available images:

http://www.netupd8.com/w8img/2wf1c2q.jpg

Now run this to update GRUB2:
sudo update-grub2


You can use any other image for the GRUB2 slash image. Simply open any image with GIMP, change it's size to 640x480 and save it in .tga format.


Changing GRUB2 font


To modify the grub menu font colors, you need to edit the same file you edited to set your GRUB2 menu background:
gksu gedit  /etc/grub.d/05_debian_theme


Scroll down (it should be around lines 33 to 43) and find this section of the file:

if background_image (hd0,2)/usr/share/images/grub/Windbuchencom.tga ; then
set color_normal=black/black
set color_highlight=magenta/black
else
set menu_color_normal=cyan/blue
set menu_color_highlight=white/blue
fi

You may change the colors you see here highlighted in yellow. If you're displaying a splash image (background), you will probably want to leave 'black' for your second normal color. In GRUB2, 'black' really means transparent. If you try to set any color here, that color will hide most of your background, (splash image).

Note: the first color is the foreground and the second color is the background.


Colors we can choose from include, black (or transparent), dark-gray, light-gray, white, brown, yellow, red, light-red, blue, light-blue, green, light-green, cyan, light-cyan, magenta, light-magenta.

After you are done, run this:
sudo update-grub2


NOTICE: If you do not edit the GRUB files correctly, your system will stop booting so be careful, make backups, etc!

Credits / further reference:

-I can't take a GRUB screenshot (I don't have Karmic installed in VirtualBox, but I use it on my main PC for some time now) so the image in the beginning of the post is from MacUntu user @ubuntuforums.org
-Grub2SplashImages
-Mundo Geek
-Grub 2 Guide thread @ubuntuforums.org
-You can also theme GRUB2 but I'll not get into that in this post. For more info, see THIS.
«
Next
Newer Post
»
Previous
Older Post