Posted to Linux on February 5th, 2009

I frequently have to switch between OSes to get the jobs done( this way or that ! ). And because i simply grew tired of looking at that same boring text based bootloader installed with Ubuntu, i decided to change it, at least the way it looks !



Being a little generous :D , i now present my findings for a perfect graphical bootloader (gfxboot grub) installation (on a Ubuntu / Debian box). So go ahead, pimp ya bootloader !



Screenshot of the Graphical Grub

Screenshot of the Graphical Grub




The GNU GRUB Graphical Menu is developed by Colin Bennett, which is what we’ll be using along the way. As of now, the project hasn’t made its way to the official repos, hence it isn’t possible to get it using apt-get/aptitude/synaptic ( at least not from the official repos ), so we’ll have to fetch the packaged files.


I would also want to thank Steve Wampler for making one of his Smoke Photographs (which i’ve used in the theme file made available) available on a CC Licence



Now let’s get on with the real deal ! The installation really completes in easy 3-steps.


Step 1 : Download the required files



a) Download the latest release of the patched grub from here.


Make sure you choose the proper file to download for you platform .( If you’re using Ubuntu or a Debian based distro it would be a file named as “grub-gfxboot_……………. _i386.deb” )

b) Download the Gfxboot theme file which i’ve somewhat modified.




Step 2) Install and configure the patched gfxgrub


a) Remove the grub on your system.



Warning : In case you aren’t able ( or forget ) to reinstall the patched-grub later, you won’t be able to boot into you system.
$ sudo apt-get remove grub

b) Install the patched grub that you downloaded

$ sudo dpkg -i <enter-the-name-of-the-patched-grub-you-downloaded>

c) Find out the partition in which you will have to setup the grub to work.

$ sudo fdisk -l
Make a note of the partition u want the grub to be installed in (hdX,Y) form as well as /dev/sd** form, as we will need it later. (Hint : /dev/sda1 -> (hd0,0) ; /dev/sda2 -> (hd0,1) ; /dev/sdb3 -> (hd1,2) and so on )

d) Configure the newly installed grub


$ sudo grub
grub> find /boot/grub/stage1

If it gives an output with something like (hd*,*) continue along, else if you get ‘file not found’ check that u’ve have root permissions. if the error comes up again, try installing a different release(try older ones too) of gfxgrub.


As you made a note earlier, replace the command below with what u got
grub> root (hdX,Y)
If it gives an output with something like “Filesystem type is ***** , partition type *****” go along, else do as mentioned above.
grub> setup (hdX)
If the output mentions all the steps as “succeded”, be happy ! u are almost there.
grub>quit
Finally re-install the grub on the disk, with the /dev/sd** partition u had made a note earlier.
$ sudo grub-install /dev/sd**
If the output mentions “Installation finished. No error reported”, go ahead to Step 3


ELSE


If you have tried everything said above and it still doesn’t work, reinstall the old grub
$ sudo apt-get install grub
Repeat all the steps from b) to d)



Step 3) Configure grub to use the theme file

a) Copy the theme file to an appropriate folder ( /boot/grub/ would be a nice choice )


b)Edit your menu.lst



Use a editor of your choice(with root permissions) and edit /boot/grub/menu.lst

c) Add the following just after the “color” line with the path to where u copied the theme file


( In some cases, u might have to add it to the top of the file)
gfxmenu /boot/grub/<name-of-the-theme-file>

d) Save the file



FINALLY, Reboot !




If everything worked fine, send me a Beer ;) or still, you could send in your comments below !


Further ahead, u can find various themes over the internet. Be warned though, some of them might not work ( ‘invalid file format’ error ! ) because of the gfxboot backwards incompatibility issues. The theme file i have provided worked fine with grub-gfxboot_0.97-40_i386.deb on a Ubuntu Box.




Go ahead ! Search over the internet and make your own theme, and if you do that, do send me a copy too :D


6 Comments

  1. Carlos

    Thanks for tha tutorial,

    Neverttheless I have a few questions:

    - I went to http://grub.gibibit.com/, but it seems another project. It’s imilar to GfxBoot, but it’s another application, isn’t it?

    - I tried to modify your theme, but it doesn’t give as many options as I need to adapt my old crystal theme for gfxBoot.


  2. suVasH.....

    My pleasure, Carlos ! I’m glad that the tutorial worked for you too.

    As you asked I’m now confused if GfxBoot and GfxMenu are same projects, but they must be somewhat related. More info here http://grub.gibibit.com/Journal

    - The theme file I’ve provided is very minimial. You can still change the background image. Try overwriting the file with your image in GIMP.

    - Of course, you can find more theme files. Try searching for gfxboot theme file. I’d found some nice ones. All of them won’t work though ! You can then try modifying the theme file to your wish.


  3. xapik

    thanx much for that howto! i was looking for that quite long and you definitely helped me ;)


  4. Glaedr

    grub> find /boot/grub/stage1
    (hd1,5)

    grub> root (hd0,4)
    Filesystem type is ext2fs, partition type 0×83

    grub> setup (hd0)
    Checking if “/boot/grub/stage1″ exists… no
    Checking if “/grub/stage1″ exists… no

    Error 15: File not found

    hd1,5 is the partition of an other disk where I installed OpenSUSE, which already use grub-gfx…what to do?


  5. suVasH.....

    Hmm.. Glaedr ! It’s been a while since i’ve published this, but i’m going to try my best to help.

    Since u got (hd1,5) -> (hdX,Y) after the “find” command, you are supposed to try as follows,

    grub> find /boot/grub/stage1
    (hd1,5)
    grub> root (hd1,5)
    ……..
    grub> setup (hd1)
    ……….
    grub> quit
    ………..
    Assuming, everything went fine above THE most important part is to update the grub
    sudo grub-install /dev/sd**

    > replace the sd** with your active boot partition, which normally is /dev/sda1 ( if you haven’t changed it before ) , in other words it’s the partition from which the computer boots up. ( Hint: use “fdisk -l” to see your partition information.


  6. [...] Suvash Thapaliya : 19 since 85 ยป Installation of Graphical … [...]


Leave a Reply