Quickly change GRUB Picture on Mint Linux - gfxgrub-change

Contribute DEB packages
Forum rules
No support questions here please

Quickly change GRUB Picture on Mint Linux - gfxgrub-change

Postby laedrus on Wed Jun 17, 2009 8:44 pm

Hi all,

I wrote a little script that automates the process of changing just the initial GRUB picture, of the bootmenu, as Mint uses grub-gfxmenu you can put virtually any picture on your bootmenu, yours, your dog, really cool, i made the .deb package of the script to ease my life porting it to my workplaces, and friends houses. I hope community enjoys it too, take a look:

# How to get out if your grub picture becomes crapped :

turn the link /boot/gfxmenu/default.message to /boot/gfxmenu/gnome.message (mint's default)


http://www.samircury.eng.br/gfxgrub-change-0.3.6.deb


for installation and usage :

#dpkg -i gfxgrub-change-0.3.6.deb

#gfxgrub-change -i image.jpg

As i'm studiyng about gfxboot i'm looking for the possibility of adding some music too hehehe

I'm sending attached a screenshot of the results i was testing on my VM (Ubuntu) i'm trying to make this work with Ubuntu, that's a pity that it doesn't have grub-gfxboot as default, so some extra steps are needed, but nevermind, we're on Mint.

Important notes

if you got your image at boot not on the entire screen, or bigger than that, it shouldn't happen, the command detects which resolution of GRUB gfxmenu is being used and resizes the image to that size. If you get wrong, report the bug here.

Options (by now) :

I included an option -c (custom) so you can pass your customized resolution (your bet of which size of the picture will fit your boot screen) example:

gfxgrub-change -c 1024x768 -i Desktop/myimage.jpg

Also, if you got black screen at boot, is some kind of spec of the image that didn't fit, still figuring out why, worst case you got a black-screen GRUB, so i made this option -f (fix) example:

#gfxgrub-change -f

This should repair to Mint's default.
Attachments
gfxgrub-change.png
here's the screenshot
gfxgrub-change.png (507.76 KiB) Viewed 6274 times
Last edited by laedrus on Wed Jun 24, 2009 10:38 am, edited 5 times in total.
laedrus
Level 1
Level 1
 
Posts: 19
Joined: Sun Mar 22, 2009 12:02 am

Linux Mint is funded by ads and donations.
 

Re: Quickly change GRUB Picture on Mint Linux - gfxgrub-change

Postby jaspmatt on Thu Jun 18, 2009 4:43 pm

HI, thanks for this procedure. I ran it and it seemed to work fine but I get only a black and white grub menu now without the .jpg I thought I installed. Can you tell me what I did wrong?
"The Second Amendment isn't about protecting ourselves against criminals. It's about all of us protecting ourselves from all of you." ---Dr. Suzanne Gratia Hupp to Congressman Charles Schumer (D-NY)
User avatar
jaspmatt
Level 3
Level 3
 
Posts: 101
Joined: Fri May 22, 2009 1:18 pm
Location: Florida, USA

Re: Quickly change GRUB Picture on Mint Linux - gfxgrub-change

Postby laedrus on Thu Jun 18, 2009 6:03 pm

hey, sorry for that.

A procedure inside the script maybe didn't recognized the file, i optimized it and will recognize now (if this is the error)

the script gives any output besides the Blocks (from CPIO) counts??

try to install the new version, that should be with this solved:

http://www.samircury.eng.br/gfxgrub-change-0.3.3.deb

Thanks for the feedback =)

I hope it helps
laedrus
Level 1
Level 1
 
Posts: 19
Joined: Sun Mar 22, 2009 12:02 am

Re: Quickly change GRUB Picture on Mint Linux - gfxgrub-change

Postby jaspmatt on Fri Jun 19, 2009 10:56 am

I installed the new one but still can't get it to work. When I run it all that shows up is the block count, twice and it seems to work. It creates a new file called gfxgrub-change.message.and modifies the default.message link to point to that. When I boot it tells me "Invalid File format" and that is all.

EDIT: OK, it works but with a much smaller jpg file but the resolution is crappy. Is there a limit on jpg file size? Also, the one I want is wide-screen. Does that make a difference?
Last edited by jaspmatt on Fri Jun 19, 2009 11:14 am, edited 1 time in total.
"The Second Amendment isn't about protecting ourselves against criminals. It's about all of us protecting ourselves from all of you." ---Dr. Suzanne Gratia Hupp to Congressman Charles Schumer (D-NY)
User avatar
jaspmatt
Level 3
Level 3
 
Posts: 101
Joined: Fri May 22, 2009 1:18 pm
Location: Florida, USA

Re: Quickly change GRUB Picture on Mint Linux - gfxgrub-change

Postby laedrus on Fri Jun 19, 2009 11:08 am

Got it, maybe if the old file was "corrupted" (missing back.jpg or some like that) the procedure could fail, try to point the symlink to the gnome.message (Mint default), see if that works (rebooting), if ok, run the new version (as the output you said should be working fine), but if the input file (default.messsage target) is bad, it can end bad
laedrus
Level 1
Level 1
 
Posts: 19
Joined: Sun Mar 22, 2009 12:02 am

Re: Quickly change GRUB Picture on Mint Linux - gfxgrub-change

Postby laedrus on Fri Jun 19, 2009 2:05 pm

Hi, i observed some strange behavior depending on the picture.

gfxboot requires by default 800x600 pictures, i don't know yet if this can be changed, i hope so, but didn't read docs about.

if you treat the image on gimp first to get it to 800x600 or close, i think things will be better.

For image processing, i'm using (it's dependancy) ImageMagick, so gfxgrub-change is limited to what imagemagick does.

To get it explicity the command i make to do it is > convert -resize 800x600 $file back.jpg

test other pictures, with other resolutions if you want, and help me to get to this conclusion (it's limitations)

thanks for the feedback!

EDIT : I did it now with a 1366 x 768 picture, and it goes fine, and looked like widescreen. My monitor is, before that i didn't redimension the image, and i saw a square on the left side of the monitor.

Than i ported to GIMP and make a 16:9 version, ran, and all goes fine.

I'll see if in 5 hours (when i leave work) i implement a new version that supports a -w (widescreen) option, so the gfxgrub-change itself converts to that proportion.
laedrus
Level 1
Level 1
 
Posts: 19
Joined: Sun Mar 22, 2009 12:02 am

Re: Quickly change GRUB Picture on Mint Linux - gfxgrub-change

Postby laedrus on Sat Jun 20, 2009 1:34 am

Ok,

Just updated for version 0.3.4 which detects which resolution is being used (can be different than 800x600), and resizes the image to that resolution, hope that it solves widescreen and resolution problems.

Please report back

Thanks
laedrus
Level 1
Level 1
 
Posts: 19
Joined: Sun Mar 22, 2009 12:02 am

Re: Quickly change GRUB Picture on Mint Linux - gfxgrub-change

Postby jaspmatt on Sat Jun 20, 2009 10:28 am

Downloaded ver 3.4 to try. Still doesn't work with the large widescreen jpg I am interested in. However it did convert a smaller jpg from an old distro which I formerly used, but it put it in the top left quadrant of the screen with black on the bottom and right side (in other words it did not fill the screen). Also, I am left with a folder named grub_workdir in my home account.
"The Second Amendment isn't about protecting ourselves against criminals. It's about all of us protecting ourselves from all of you." ---Dr. Suzanne Gratia Hupp to Congressman Charles Schumer (D-NY)
User avatar
jaspmatt
Level 3
Level 3
 
Posts: 101
Joined: Fri May 22, 2009 1:18 pm
Location: Florida, USA

Re: Quickly change GRUB Picture on Mint Linux - gfxgrub-change

Postby laedrus on Sat Jun 20, 2009 12:07 pm

humm, i'll try with every kind of image here so, help me to understand:

* you didn't changed the resolution of boot screen? (800x600)

* what's the resolution of the image you're trying to use?

TIP : i added an option ( -c <resolution> ) for users who would like to customize the resolution that the picture is changed to. What i do when -c is turned off, is take what's the size of the original back.jpg file, and convert the infile to the same resolution, no magic at all (except for imagemagick)

Try to customize the resolutions to some that fits your screen, on first versions, i observed that if i take a square image it wouldn't fit my screen too, but that was a limitation of imagemagick, who preserves the aspect ratio, 0.3.4 > versions it ignores the aspect ratio (can distort image to fit all screen) at least, it goes with the same size of the previous image.

I'll try to reproduce that here.

About the grub_workdir i just dropped a variable i thought wasn't needed, will be corrected on 0.3.5 sorry, you can rm that dir =)
EDIT : 0.3.5 available http://samircury.eng.br/gfxgrub-change-0.3.5.deb
laedrus
Level 1
Level 1
 
Posts: 19
Joined: Sun Mar 22, 2009 12:02 am

Re: Quickly change GRUB Picture on Mint Linux - gfxgrub-change

Postby jaspmatt on Sat Jun 20, 2009 1:16 pm

Here is the image I am most interested in. It is 1920x1200 but I don't mind if it is cropped somewhat. I am going to use it on my lappy which is 1280x800. I didn't change any resolution on it because 800x600 so far results in blurry images. I'm not familiar at all with imaging software (Gimp, etc.) because I don't do that kind of work.
DWS.jpg
DWS.jpg (628.96 KiB) Viewed 5999 times
"The Second Amendment isn't about protecting ourselves against criminals. It's about all of us protecting ourselves from all of you." ---Dr. Suzanne Gratia Hupp to Congressman Charles Schumer (D-NY)
User avatar
jaspmatt
Level 3
Level 3
 
Posts: 101
Joined: Fri May 22, 2009 1:18 pm
Location: Florida, USA

Re: Quickly change GRUB Picture on Mint Linux - gfxgrub-change

Postby laedrus on Sun Jun 21, 2009 3:12 pm

Just to give an update :

I tried your image, some of mines, different sizes. Some worked some not.

Isn't size of image that is messing up the whole thing, is some other attribute that is going beyond the specs of gfxboot, i saw this wiki from SUSE : http://en.opensuse.org/Gfxboot#Deciding ... oot_screen

unfortunantly no clue at all, i wrote to one of the guys who edited that page asking for the image specs. I can't think in other attributes to change. DPI and Size i tested and it's ok, equal to mint's standard image.

Ok. Let's see, if i find something i post here

By that wiki gfxboot (command) would do that too, but i installed here (and in my Ubuntu VM), but the command don't seems to be there. i searched for it and nothing (locate), just a few of nothing-to-do commands.

Let's see
laedrus
Level 1
Level 1
 
Posts: 19
Joined: Sun Mar 22, 2009 12:02 am

Re: Quickly change GRUB Picture on Mint Linux - gfxgrub-change

Postby jaspmatt on Wed Aug 19, 2009 5:02 pm

I got rid of the gfxboot by using synaptic to uninstall it and then installing the Ubuntu grub package. Then I used the grub-install and the grub setup commands to rewtie the partition boot record nd the MBR. I also had to eliminate the gfxboot line in menu.lst and put the splashimage command back in. Now at least I can use all of the standard splashimages from the library. I haven't tried the one I really want yet but things are looking up. I don't know why Mint wants to use that gfxboot thing, it seems too restrictive to me.
"The Second Amendment isn't about protecting ourselves against criminals. It's about all of us protecting ourselves from all of you." ---Dr. Suzanne Gratia Hupp to Congressman Charles Schumer (D-NY)
User avatar
jaspmatt
Level 3
Level 3
 
Posts: 101
Joined: Fri May 22, 2009 1:18 pm
Location: Florida, USA

Re: Quickly change GRUB Picture on Mint Linux - gfxgrub-change

Postby emorrp1 on Wed Aug 19, 2009 5:10 pm

mainly because it looks good, but that's all going to change with Helena anyway, as Karmic moves to grub2
If you have a question that has been answered and solved, then please edit your original post and put a [SOLVED] at the end of your subject header
Hint - use a google search including the search term site:forums.linuxmint.com
emorrp1
Level 8
Level 8
 
Posts: 2322
Joined: Thu Feb 26, 2009 8:58 pm

Linux Mint is funded by ads and donations.
 

Return to Packages

Who is online

Users browsing this forum: No registered users and 1 guest