rss
twitter
    Find out what I'm doing on Twitter

Howto Change Grub2's (Grub-PC) Splash Image On Ubuntu

You can read my previous blog post about upgrading/installing GRUB2 on Ubuntu Jaunty and Karmic Koala here.We installed Grub2 but found its default splash ugly and we want to change it.Let's start the howto by installing grub2-splashimages package :

$sudo apt-get install grub2-splashimages

Now we have a couple grub2 themes under /usr/share/images/grub/ folder.Let's select a grub2 theme from the following folders :

/usr/share/images/desktop-base/
/usr/share/images/grub/


$ls /usr/share/images/grub/

My output :

BLABLABLABLA
Moraine_Lake_17092005.tga TulipStair_QueensHouse_Greenwich.tga
BLABLABLABLA


In this howto i am selecting Moraine Lake splash image.Note down the name of the file and edit the following file :

$sudo gedit /etc/grub.d/05_debian_theme

Search for this line :

for i in {/boot/grub,/usr/share/images/desktop-base}/moreblue-orbit-grub.{png,tga}

And change it to :

for i in {/boot/grub,/usr/share/images/desktop-base,/usr/share/images/grub}/Moraine_Lake_17092005.{png,tga}

This basically tells GRUB2 to look for image name “Moraine_Lake_17092005” in the following locations:

/boot/grub
/usr/share/images/desktop-base
/usr/share/images/grub


Do not forget to change "Moraine_Lake_17092005" with your selected theme's name.Save and exit.

Now we have to regenerate grub's config (grub.cfg) with the following command :

$sudo update-grub

Reboot and test your Grub2 theme.

PS: The output of $update-grub command should look like this (BOLD one) :
Generating grub.cfg ...
Found Debian background: Moraine_Lake_17092005.tga
Found linux image: /boot/vmlinuz-2.6.30-8-generic
Found initrd image: /boot/initrd.img-2.6.30-8-generic
Found linux image: /boot/vmlinuz-2.6.29-02062903-generic
Found initrd image: /boot/initrd.img-2.6.29-02062903-generic
Warning: update-grub_lib is deprecated, use grub-mkconfig_lib instead
Found memtest86+ image: /boot/memtest86+.bin
Found Moblin release 2 (Moblin) on /dev/sda3
done

8 comments:

Durand said...

Good tutorial, thanks!

tru3m0sl3m said...

it never gives Found Debian background: .... as aoutput after the command

Anonymous said...

For this to work you need to change one more line a little bit above the path from "use_bg=false" to "use_bg=true".

Otherwise grub won't use any backgrounds.

Anonymous said...

Do not set use_bg=true, that's up to the script. It only get set if the grub is able to read the path.

If it doesn't work, easiest is just to copy the image you want to /boot/grub and run the script again.

farimi said...

Search for this line :

/desktop-base}/moreblue-orbit-grub.{png,tga}

And change it to :

desktop-base,/usr/share/images/grub}/Moraine_Lake_17092005.{png,tga}

You must add this!!!

,/usr/share/images/grub

Then the

Found Debian background: Moraine_Lake_17092005.tga

will be found and it will appeared!

Anonymous said...

It never found Debian background probably because you forgot to add /usr/share/images/grub to the list inside { }

for i in {/boot/grub,/usr/share/images/desktop-base,/usr/share/images/grub}/Moraine_Lake_17092005.{png,tga} ; do

Savangadi (सवंगडी) said...

Helped a lot. thanks!
Need some help in setting themes..

Anonymous said...

REGARDING:
BEGIN QUOTE:
Search for this line :

for i in {/boot/grub,/usr/share/images/desktop-base}/moreblue-orbit-grub.{png,tga}

And change it to :

for i in {/boot/grub,/usr/share/images/desktop-base,/usr/share/images/grub}/Moraine_Lake_17092005.{png,tga}

This basically tells GRUB2 to look for image name “Moraine_Lake_17092005” in the following locations:

/boot/grub
/usr/share/images/desktop-base
/usr/share/images/grub

:END QUOTE

Wow! What am I missing?! If someone didn't like the splash image that came with grub, and had a nice splash image they'd like to use, instead, wouldn't it have been simpler to rename the original splash image to (name)-backup (or something similar), and rename the NEW image to the old name? Wouldn't grub then use the new image, if it were named exactly the same as the old image, and was located in the same folder? Or does Linux/Grub have to compile the actual image into some file or other, for it to be used? Seems like renaming a couple of files would be a lot simpler than going through all of the instructions that were so kindly posted, above... :-)

Post a Comment