• banner 3 banner 2 banner 1

How To Use Custom Backgrounds In Grub2

Grub2 – the default boot-loader for new installations of Ubuntu 9.10 – has some nifty new features – including support for background images and custom font colours.
Whilst the previous version of GRUB could also support background images – it involved a hassle, some nifty navigation of folders and and editing some boot files. GRUB2 however supports this out of the box!

Install GRUB Background Package
A set of GRUB backgrounds is included in the Ubuntu repositories. Just install them via synaptic or install via the Terminal using: -
  • sudo apt-get install grub2-splashimages
The default choices aren’t exactly much laud over, but are a nice enough selection. You’ll find them in /usr/share/images/grub.

Choose An Image
If you want to use a background image be sure to FIRST make a backup of the files you’re editing. 
To choose one of the images from the grub2-splashimages packages you need to specify the file name in the grub boot appearance file: -
  • gksudo gedit /etc/grub.d/05_debian_theme
Find the following line: -
  • for i in {/boot/grub,/usr/share/images/grub}/moreblue-orbit-grub.{png,tga} ; do
Change: -
  • moreblue-orbit-grub
to the file name of an image in the /usr/share/images/grub folder.
Save and close.
You then MUST update GRUB2 by running: –
  • sudo update-grub2
Example
Change moreblue-orbit-grub to Plasma-lamp.
  • for i in {/boot/grub,/usr/share/images/grub}/Plasma-lamp.{png,tga} ; do
Use your own image
To use an image of your choice you need to resize it to 640×480 and save it as a .tga file. You then need to make sure you place it in the grub images folder above.

Thanks to webupd8
Post a comment or leave a trackback: Trackback URL.
  • http://twitter.com/nloudon1 Nathan Loudon

    I don’t really like any of the images that come in that package, but the image you have in that screenshot is really nice. Where can I get that image?

  • John

    Doesn’t work. I still see the black background. I definitely ran update-grub2. Any ideas?

  • Anonymous

    i love this blog. i was just wondering how to do this, and poof! theres an article about it. keep the amazingness up!

  • John

    I just noticed that the line in my file is different:

    for i in {/boot/grub,/usr/share/images/grub}/Plasma-lamp.{png,tga} ; do

    Also, the line above it says usebg=false

    If I change that to true, update-grub2 fails with the following:

    john@john-laptop:~$ sudo update-grub2
    Generating grub.cfg …
    No path or device is specified.
    Try “grub-probe –help” for more information.
    No path or device is specified.
    Try “grub-probe –help” for more information.

  • Mohan

    Awesome tip, thanks. I shall add a background to mine, as I don’t know why Ubuntu doesn’t ship with one. OpenSuse, Fedora, Mint, and few other do but Ubuntu doesn’t and we have to stare at command prompt looking GRUB screen.

  • John

    Fixed it – for some reason my 05_debian_theme file wasn’t executable…

  • Anonymous

    doesnt grub2 support higher resolutions now? lets get some 1280×1024 images :)

    Ubuntu is the only OS on my laptop yet I still see the grub2 bootloader. wasnt it supposed to default to quiet mode and boot straight into ubuntu?

  • Ben

    Would a PNG image not work? I’ve not gotten around to installing Karmic yet (exam period, yeck) but that line makes it look like they’re supported.

  • http://omgubuntu.co.uk/ d0od

    .png, .tga and .jpg’s are all supported, but i only mentioned using .tga’s as it’s the “DEfault” format.

  • John

    Yeah, if you hit c on startup and type vbeinfo you can see all of the resolutions grub will support. I managed to get a 1280×800 image to display perfectly.. I had to resize it to 1024×768 and edit my /etc/default/grub GRUB_GFXMODE line to 1024×768 and the image scales up nicely to 1280×800 on boot :)

    Png and jpg are supported (but jpg only in 8-bit). If you want to use a jpg you have to change the {png,tga} bit to {png,tga,jpg,jpeg}

  • Anonymous

    thanks i found a tool called startupmanager that helps you make changes to the bootloader via a gui.

    sudo apt-get install startupmanager

  • Zach

    Are you talking about the top one? I was wondering as well, anyone know?

blog comments powered by Disqus