Help - Search - Members - Calendar
Full Version: Change the grub menu pic with gfxboot
MandrivaUsers.org > General Help > Tips and Tricks
skinky
Hi all

I only just figured out how to change the image displayed at the grub boot menu whilst still keeping animations (Mandriva's timer animation) with gfxboot - as opposed to the not-quite-so-pretty (IMHO) pics with standard grub. There is very little info on the internet about gfxboot so I thought this may help someone else who wishes to change Mandriva's nice pic.

I haven't experimented with changing the text/fonts or anything else - just the image. Also I've only done this with Mandriva Spring (2007.1).

Mandriva Spring installs the mandriva-gfxboot-theme package by default which also comes with a program called /usr/sbin/grub-gfxmenu to update the gfxmenu. So all I did was replace Mandriva's images with my own! The images are 800x600 in size and I did not reduce the colours at all. Here's a list of the files I replaced - all with the same image:

CODE
          /usr/share/gfxboot/themes/Mandriva/back.jpg
          /usr/share/gfxboot/themes/Mandriva/welcome.jpg
          /usr/share/gfxboot/themes/Mandriva/install/back.jpg
          /usr/share/gfxboot/themes/Mandriva/install/welcome.jpg


I then did the following:

CODE
          #  su
          #  cd /usr/share/gfxboot/themes/
          #  ln -s Mandriva current
          #  /usr/sbin/grub-gfxmenu --update-gfxmenu
          #  grub-install /dev/hda


Then I rebooted and voila! My pic is now at the grub boot menu and Mandriva's timer animation still works! 2thumbsup.gif

IMORTANT NOTE: Obviously the above command (grub-install /dev/hda) should point to where you have grub installed if not in the MBR of the first IDE disk!

HTH someone.
theYinYeti
Thank you for sharing smile.gif
pindakoe
Thanks a bunch -- I figured stuff out the hard way (by editing the file referenced by the gfxmeny command in grub's menu.lst). The commands to do this (for a file called 'gfxmenu', like the one located in /boot) are:
CODE
cd work                # Go to an empty directory
cpio -i < gfxmenu    # Unpack all files from mandriva default GRUB splash
...                # Commands to modify and/or replace the graphic file
ls . |cpio -o > ../newsplash    # Create a new archive
...                # copy file back to /boot and adapt /boot/grub/menu.lst accordingly

(gfxmenu expects its input in n an CPIO archive)

The only info I have been able to find on gfxmenu (some Suse forums) was that the image should be 800x600 and 'not too big'.
skinky
Your're most welcome. Yes, info for gfxboot is rather sparse on the 'net. Have fun.
Littleguy
QUOTE (pindakoe @ Jun 13 2007, 02:40 PM) *
Thanks a bunch -- I figured stuff out the hard way (by editing the file referenced by the gfxmeny command in grub's menu.lst). The commands to do this (for a file called 'gfxmenu', like the one located in /boot) are:
CODE
cd work                # Go to an empty directory
cpio -i < gfxmenu    # Unpack all files from mandriva default GRUB splash
...                # Commands to modify and/or replace the graphic file
ls . |cpio -o > ../newsplash    # Create a new archive
...                # copy file back to /boot and adapt /boot/grub/menu.lst accordingly

(gfxmenu expects its input in n an CPIO archive)

The only info I have been able to find on gfxmenu (some Suse forums) was that the image should be 800x600 and 'not too big'.


Thanks for the info guys , you saved me a lot of time searching for the location of that pic.

I used pindakoes method, but I can't get the before last part " ls . |cpio -o > ../newsplash # Create a new archive "

I extracted all the gfxmenu CPIO archive to a folder or directory, so when I try to archive that directory with the extracted file I get a message saying that I can not archive that path because it is a directory, I don't know of any other way of archiving a bunch of files at once into one archive. I'm used to using archiver and winrar where you can just archive a folder or directory.

Any ideas ? cool.gif unsure.gif
pindakoe
You shoud move into the directory you want to archive and then use the commands:
CODE
ls . |cpio -o ../whatevernameyoufancy

The commands fro cpio are arcane; it can only operate on a stream of files that are passed to it on stdin. The above method accompmplishes that.
Littleguy
Thanks allot pindakoe I'll give it a trye right now 2thumbsup.gif biggrin.gif
Littleguy
I was able to create the CPIO archive, but I just realized that the files inside my new gfxmenu archive were pointing to my home folder, and then I would have to update Grub ..

All I wanted to do is change the Mandriva Blue Powepack Picture for the Orange Mandriva One Picture ... It's a shame I can't just drag the picture into the original gfxmenu archive and replace it...since they have the same name(back.jpg) and size(800x600).

My gfxmenu archive is in the root folder(/) in: sda8/boot/gfxmenu
Is there a command by any chance to replace blue (back.jpg)mandriva picture for the Orange(back.jpg) picture ? rolleyes.gif ..I'm not getting thrue with the above methods and it's basicaly cause I don't know anything , in other words , i'm lost with all the commands
pindakoe
Just realised there is a small but significant type in my comment. The whole set of commands becomes:

CODE
cd ~
cp /boot/gfxmenu .
# Now make new dir to construct updated gfxmenu
mkdir test
cd test
cpio -i < ../gfxmenu
# Now replace the old graphic by the new one. Make sure name stays the same
mv /path/to/old/orange.jpg back.jpg
ls |cpio -o > ../gfxmenu2

At the end of this you will have the old boot menu (gfxmenu) and the new one (gfxmenu2). Update your /boot/grub/menu.lst with the location of the new bootgraphic and restart.
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here.
Invision Power Board © 2001-2008 Invision Power Services, Inc.