My space in the world

Code is poetry

Posted by Sayak
November - 11 - 2009

Well, I’m quite certain that there are a million tutorials on this subject. But I felt that the way I set up my Grub was really easy  and worth sharing. What I am trying to do here is to install a splashimage with the Grub2 bootloader on a (K)ubuntu (or equivalent) system. So here goes…

  1. To begin with, you’d need to install the “grub2-splashimages” package. Please make sure that you’re running Grub2 and not an older version before you continue.
    $ sudo apt-get install grub2-splashimages
  2. Once you do that, you should have a bunch of images under the folder: /usr/share/images/grub/
  3. By default, Grub should offer you a 640×480 resolution. In most cases, the graphics card supports a higher resolution. You can check the highest available resolution by entering into the Grub command mode (press ‘c’ at the boot menu) and typing vbeinfo. Let us assume that your graphics card can support upto 1024×768 resolution at a 32-bit color depth.
  4. Once you know the resolution, you can scale your own image to that size and save it as a TarGA (tga) image (use an image editor like Gimp) within the /usr/share/images/grub/ folder.
  5. Now we edit the theme script. To do that, enter the following in your terminal:
    $ sudo kate /etc/grub.d/05_debian_theme

    Where you can use your favourite text editor where I used kate. In that file, find the following line:

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

    … and change it to:

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

    Note: Replace the splashimage part with the filename. For example, you are using “tulips.png” as your image, replace “splashimage” with “tulips”.

  6. Now to set the resolution, edit the /etc/default/grub file and change GRUB_GFXMODE to 1024×768 (or whatever your supported resolution is).
  7. Once you are done with everything, run:
    $ sudo update-grub

    Once you execute the above, look for the following line in the output:

    Found Debian background: splashimage.tga

    And that should be all!

If you wish to change the text color, you may change the /boot/grub/grub.cfg file to edit the menu_color_normal and menu_color_highlight values (those are written as foreground/background format).

GRUB2 Splash-image preview

12 Responses to “HowTo setup a fancy Grub”

  1. Roger says:

    This would be better if you could just specify the image in /etc/default/grub. The instructions for Gnome users are identical except use gedit instead of kate.

    It should be noted that the images from grub2-splashimages are all intended for 640×480 but not all are exactly that resolution. Most are a little shorted and some not quite so wide.

  2. Johan says:

    And a small addition to not let your beautiful splash image be cluttered by the actual GRUB menu (most of the time you will be booting the default option):
    edit /etc/default/grub and make sure you hash out the line with GRUB_TIMEOUT. Then unhash GRUB_HIDDEN_TIMEOUT:


    (X being greater depending on how much you like your splash screen!)

    If you need the GRUB menu, you can hold SHIFT while booting or press ESC when seeing the splash image.

  3. Arand says:

    I think you forgot a ” ; do” at the end of those both for-lines.

  4. Karthik says:

    Can you put some screenshots please ?

  5. Steve H says:

    I used the Ubuntu xsplash image at my native resolution (1440×900) and it looks very pretty. Thanks.

  6. David says:

    What would be interesting is to show how you can customize the entire menu instead of just changing the background. I was thinking of what openSuSE does for example.

  7. bnj says:

    Great !

    It is probably better to change the color in the /etc/grub.d/05_debian_theme file in the block starting with the comment # set the background if possible


  8. bnj says:

    That’s Great !

    It is probably better to change the color in the /etc/grub.d/05_debian_theme file in the block starting with the comment # set the background if possible


  9. Nice hack, I have been putting my own images and strings for GRUB, makes your machine more personal 🙂

Leave a Reply

About Me

A son, brother and friend. Enjoys scripting and making small bits of apps here and there. Wants to conquer the world (well, who doesnt). A geek who has an obsession for ponies. Loves acoustic and wants to play guitar sitting on the Hollywood hill one day!

A Word About KDE

KDE is a versatile software compilation for all platforms. It is an intuitive and powerful desktop environment that focuses on finding innovative solutions to old and new problems, and creating a vibrant, open atmosphere for experimentation.