Ubuntu Forums ubuntu.com - launchpad.net - ubuntu help  

Go Back   Ubuntu Forums > The Ubuntu Forum Community > Other Community Discussions > Tutorials & Tips
Register Reset Password Forum Help Forum Council Search Today's Posts Mark Forums Read

Ubuntu 9.10 is out!!!

When downloading Ubuntu 9.10 please consider using bittorrent to get your copy of Ubuntu.

The Ubuntu Developers Summit for Lucid Lynx will be held the week of 16-Nov-2009 till 20-Nov-2009 in Dallas, TX USA. Visit the the Ubuntu wiki for more information about UDS and how to participate remotely.

Tutorials & Tips
The place to find Ubuntu related Tips & Tricks.

 
Thread Tools Display Modes
Old April 28th, 2005   #1
Eproxus
Just Give Me the Beans!
 
Join Date: Mar 2005
Location: Sweden
Beans: 69
Cool HOWTO: Grub splash images.

Introduction
This guide will tell you how to get a nice background image while in Grub. The guide will first explain how to load an image into Grub and use it as a background and then, for those of you who are interested, how to create such an image in Gimp.

Beware! Do only do this if you feel that you know what you're doing! It may mess up your boot loading if you are careless. (Thanks to jonny for pointing this out, together with backing up). That said, it shouldn't be too hard to follow this anyway.

Table of Contents
Example Image
Configuring Grub


  1. Adding an image
  2. Editing the grub configuration
  3. Seeing your results
  4. Troubleshooting
Making your own splash image
  1. New file
  2. Create the art
  3. Reduce colors
  4. Save and compress
Conclusion
Links

Example Image
I have attached the splash image I'm using (and a thumbnail of it). We will be using this in the guide but you can use any image you want (assuming it is in the boot splash format, see Making your own splash image below). More images can be found in the Links section.

Get the splash image here.

Configuring Grub
1. Adding an image

First, move the image to the grub folder (assuming the current dir is your home folder and this is were you downloaded the image).
Code:
sudo mkdir /boot/grub/images
sudo mv usplash.xpm.gz /boot/grub/images
2. Editing the Grub configuration
Backup!
Code:
sudo cp /boot/grub/menu.lst /boot/grub/menu.lst.old
Then open the grub config file menu.lst:
Code:
sudo gedit /boot/grub/menu.lst
Locate a appropriate place to add the image, find the following (row 24 or therabout):
Code:
# Pretty colours
#color cyan/blue white/blue
And add a new section below the above lines:
Code:
## Splash image!
splashimage (hdX,Y)/boot/grub/images/usplash.xpm.gz
Important! You MUST replace X and Y with the proper numbers. Grub's configuration syntax is a bit weird because it does not have the same offset as the usual mount for example. X in this case is the actual disk drive and Y is the partition. Assuming you have a pretty standard installation of Ubuntu you could find this information further down in menu.lst. Locate the section which matches the entry you normally boot from:
Code:
## ## End Default Options ##
 
title		Ubuntu, kernel 2.?.??-?-??
root		(hdX,Y)
There you can find the proper numbers to use for your splashimage command.
Enter those in the line added before. Save the file.
Important2! If you have a separate boot partition you have to remove the /boot in the path, this is because the root of the boot partition is mounted in /boot on your other partition. Resulting in this section instead:
Code:
  ## Splash image! (On separate partition)
splashimage (hdX,Y)/grub/images/usplash.xpm.gz
3. Seeing your results
Reboot and your splash image should be visible as the Grub background.
4. Troubleshooting
If the image somehow does not load Grub will behave weird, although if you have a timeout (Ubuntu has by default) Grub should boot Ubuntu anyway. Then you should be able to correct the problem. More information and tips & tricks available here.

Making your own splash image
Here's how you make your own image, I will not tell you how to use the Gimp as there are plenty of other tutorials on that, use google.
1. New file
There are some restrictions on the image, it must be 640x480 pixels large and only contain 14 colors.
2. Create the art
Uh, use your artistic talents and produce wicked art! If you want a photo or something just past it in and resize it. If you want to do something Ubuntu specific this page might be of interest. If you want to use the Ubuntu logo in SVG format (vector graphics) there is a Gimp SVG plugin available in apt-get.
3. Reduce colors
The next step is to reduce the amount of colors to 14. Go Image->Mode->Indexed... and select Generate optimum palette, set the maximum number of colors to 14 and chose a dithering algorithm that looks good. Normal gives the most coherent colored areas but the Floyd-Steinberg algorithms are more appropriate for images with many colors.
4. Save and compress
Save the image as an XPM image. You might want to save a Gimp image also (XCF) in case you want to change it. Then compress it with gzip and copy it to the Grub folder:
Code:
gzip image.xpm
sudo cp image.xpm.gz /boot/grub/images
Conclusion
You should now have a nice background in Grub, and perhaps even your own creation!

Links

Grub Splash Image Documentation
Ubuntu Artwork Resources
Additional Ubuntu Splash Screens

Comments and suggestions welcome!


EDIT: Backing up and precautions added. Thanks jonny.
EDIT2: Separate boot partitions handled. Thakns todw1fd.
Attached Images
File Type: png usplash.png (2.9 KB, 2641 views)
Attached Files
File Type: gz usplash.xpm.gz (4.1 KB, 11898 views)

Last edited by Eproxus; April 28th, 2005 at 04:39 PM.. Reason: Added some precautions.
Eproxus is offline   Reply With Quote
Old April 28th, 2005   #2
bored2k
Skinny Extra Sweet Ubuntu
 
bored2k's Avatar
 
Join Date: Feb 2005
My beans are hidden!
Re: HOWTO: Grub splash images.

Nice. You could get some other nice grub images here
__________________
Sylvia: Look at what you've done to him!
Christof: I have given Truman the chance to lead a normal life. The world, the place you live in, is the sick place.
bored2k is offline   Reply With Quote
Old April 28th, 2005   #3
panickedthumb
Cloned
 
panickedthumb's Avatar
 
Join Date: Oct 2004
Location: /home
My beans are hidden!
Ubuntu 9.04 Jaunty Jackalope
Send a message via ICQ to panickedthumb Send a message via AIM to panickedthumb Send a message via MSN to panickedthumb Send a message via Yahoo to panickedthumb Send a message via Skype™ to panickedthumb
Re: HOWTO: Grub splash images.

That first attachment link is a dead link, just FYI
panickedthumb is offline   Reply With Quote
Old April 28th, 2005   #4
bored2k
Skinny Extra Sweet Ubuntu
 
bored2k's Avatar
 
Join Date: Feb 2005
My beans are hidden!
Re: HOWTO: Grub splash images.

Quote:
Originally Posted by panickedthumb
That first attachment link is a dead link, just FYI
usplash.xpm.tgz ? I just download it, its just 4k.
__________________
Sylvia: Look at what you've done to him!
Christof: I have given Truman the chance to lead a normal life. The world, the place you live in, is the sick place.
bored2k is offline   Reply With Quote
Old April 28th, 2005   #5
panickedthumb
Cloned
 
panickedthumb's Avatar
 
Join Date: Oct 2004
Location: /home
My beans are hidden!
Ubuntu 9.04 Jaunty Jackalope
Send a message via ICQ to panickedthumb Send a message via AIM to panickedthumb Send a message via MSN to panickedthumb Send a message via Yahoo to panickedthumb Send a message via Skype™ to panickedthumb
Re: HOWTO: Grub splash images.

Quote:
Originally Posted by bored2k
usplash.xpm.tgz ? I just download it, its just 4k.
No the first link. The second one gave usplash.xpm.tgz. He's edited the dead link
panickedthumb is offline   Reply With Quote
Old April 28th, 2005   #6
donar73
Just Give Me the Beans!
 
donar73's Avatar
 
Join Date: Mar 2005
Location: Thuringia/Germany
Beans: 56
Edgy Eft Testing
Send a message via ICQ to donar73 Send a message via MSN to donar73 Send a message via Yahoo to donar73
Re: HOWTO: Grub splash images.

Thx alot, nice HowTo!
donar73 is offline   Reply With Quote
Old April 28th, 2005   #7
jonny
Way Too Much Ubuntu
 
Join Date: Dec 2004
Beans: 242
Re: HOWTO: Grub splash images.

Good how-to and very clear. A boot splash certainly adds a bit of a feel good factor when you start up your PC, and I have one myself. All punters should be aware, though, that you can render your system unbootable by being careless with /boot/grub/menu.lst

Things are always recoverable, as you can use your Hoary CD to boot and repair the damaged system. I suggest taking a backup
Code:
sudo cp /boot/grub/menu.lst /boot/grub/menu.lst.old
first, as recovery is much simpler with a working file to refer to.

Basically, though, if you don't feel comfortable rescuing a system with a broken boot sector, you're not ready for this how to.
__________________
Make poverty history
jonny is offline   Reply With Quote
Old April 28th, 2005   #8
Eproxus
Just Give Me the Beans!
 
Join Date: Mar 2005
Location: Sweden
Beans: 69
Re: HOWTO: Grub splash images.

Quote:
Originally Posted by jonny
Good how-to and very clear. A boot splash certainly adds a bit of a feel good factor when you start up your PC, and I have one myself. All punters should be aware, though, that you can render your system unbootable by being careless with /boot/grub/menu.lst

Things are always recoverable, as you can use your Hoary CD to boot and repair the damaged system. I suggest taking a backup
Code:
sudo cp /boot/grub/menu.lst /boot/grub/menu.lst.old
first, as recovery is much simpler with a working file to refer to.

Basically, though, if you don't feel comfortable rescuing a system with a broken boot sector, you're not ready for this how to.
Thanks for pointing this out! Added it to the guide.
Eproxus is offline   Reply With Quote
Old April 28th, 2005   #9
Get
5 Cups of Ubuntu
 
Get's Avatar
 
Join Date: Jan 2005
Location: Ängelholm, Sweden
My beans are hidden!
Kubuntu 6.06
Send a message via MSN to Get Send a message via Skype™ to Get
Re: HOWTO: Grub splash images.

Hmm, I only get stripes on the screen
__________________
Ubuntu - Linux for everthing begins, and yes, my mouse is using ubuntu too.
Get is offline   Reply With Quote
Old April 28th, 2005   #10
kuleali
A Carafe of Ubuntu
 
kuleali's Avatar
 
Join Date: Mar 2005
Beans: 120
Re: HOWTO: Grub splash images.

nice
__________________
See, you not only have to be a good coder to create a system like Linux, you have to be a sneaky ******* too.
kuleali is offline   Reply With Quote

Bookmarks

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 06:09 PM.


vBulletin ©2000 - 2009, Jelsoft Enterprises Ltd. Ubuntu Logo, Ubuntu and Canonical © Canonical Ltd. Tango Icons © Tango Desktop Project. bilberry