Skip to contentSkip to conversation

Grub2 background images

DISCUSSION BandiPat 3 participants 6 messages Feb 3, 2009 – Feb 4, 2009

lore
Share & tools
lore

BandiPat

author
#0 lore raw

Thanks Felix for this earlier:
Oh for the graphic mode to work you need to have /usr/src/unifont.bdf file which is for Debian/Ubuntu in bf-utf-source package and then compile grub2 with `./configure --enable-grub-mkfont' so that the fonts files needed for it are generated.
And then you can use a background image with something like this in grub.cfg:
insmod png
background_image /my/image.png
or you can use insmod jpeg or tga
------------------

Downloaded the new svn on 02/2, which I've compiled and added the --enable-grub-mkfont option. I've also added a readme.1st file as a basic tutorial for installing, changing from lilo to the files. I thought I would attempt to write something while all this new info you guys have helped me with before it fled from my brain. ;-)

If you would like to see, have a copy, add it to Wiki, etc. just let me know, as I will pass it along for your approval. It's not Zenwalk specific, but may help some new user. I thought about following up with a manual, but realized I just don't have the knowledge of Grub2 yet to undertake that job, although I would be willing to help with it.

Now on to my questions. I have built the new svn as a Zenwalk package.
When updating Grub2 with new versions, is it advisable to run
grub-install again, so that new or revised files get copied to your /boot/grub directory or is just upgrading all that is necessary for grub2 to take advantage of the new stuff?

Next, I followed your instructions Felix, but am still not able to get a background image to display. I will include my grub.cfg, so you guys might look at that. Thanks again for all the help! Since switching over to Grub2, it has been stable & reliable with my XFS partitions. I'm actually thinking it might be a good time for you guys to release another version. 1.97 would be good, but I honestly think 2.0beta1 is obtainable. It's a good program.

grub.cfg follows:

#
# DO NOT EDIT THIS FILE
#
# It is automatically generated by /usr/sbin/grub-mkconfig using templates

# from  and settings from /usr/etc/default/grub
#

### BEGIN /usr/etc/grub.d/00_header ###
set default=0
set timeout=10
set root=(hd0,2)
insmod video
insmod vbe
insmod png
insmod jpg
backgroung_image /boot/grub/ZenGrub.png
terminal console
### END /usr/etc/grub.d/00_header ###

### BEGIN /usr/etc/grub.d/10_freebsd ###
### END /usr/etc/grub.d/10_freebsd ###

### BEGIN /usr/etc/grub.d/10_hurd ###
### END /usr/etc/grub.d/10_hurd ###

### BEGIN /usr/etc/grub.d/10_linux ###

menuentry "GNU/Linux, Zenwalk 6.0" {
        set root=(hd0,2)
        search --fs-uuid --set aa0d3fde-d609-45b8-9af9-081d159768ef
        linux   /boot/vmlinuz root=/dev/sda2 ro splash=silent vga=794
		initrd (hd0,2)/boot/initrd.splash
}
menuentry "GNU/Linux, Zenwalk Text" {
        set root=(hd0,2)
        search --fs-uuid --set aa0d3fde-d609-45b8-9af9-081d159768ef
        linux   /boot/vmlinuz root=/dev/sda2 3 ro splash=silent vga=794
		initrd (hd0,2)/boot/initrd.splash
}
menuentry "Memory Test (memtest86+)" {
		set root=(hd0,2)
		linux (hd0,2)/boot/memtest86+-1.70.bin
}
menuentry "GNU/Linux, linux 2.6.28.2 (single-user mode)" {
        set root=(hd0,2)
        search --fs-uuid --set aa0d3fde-d609-45b8-9af9-081d159768ef
        linux   /boot/vmlinuz-2.6.28.2 root=/dev/sda2 ro single
}

### END /usr/etc/grub.d/10_linux ###

### BEGIN /usr/etc/grub.d/30_os-prober ###
### END /usr/etc/grub.d/30_os-prober ###

### BEGIN /usr/etc/grub.d/40_custom ###
# This file is an example on how to add custom entries ### END /usr/etc/grub.d/40_custom ###

Thanks,
Pat

Signature · 3 lines
       ---Zenwalk v6.0--Linux 2.6.28---
        Registered Linux User #225206
"Ever tried Zen computing?"  http://www.zenwalk.org
#1 lore raw

Am Dienstag, den 03.02.2009, 15:22 -0500 schrieb BandiPat:

Quoted 5 lines

Now on to my questions. I have built the new svn as a Zenwalk package.
When updating Grub2 with new versions, is it advisable to run
grub-install again, so that new or revised files get copied to your /boot/grub directory or is just upgrading all that is necessary for grub2 to take advantage of the new stuff?

Yes you need to run grub-install to really update it.

Quoted 7 lines

Next, I followed your instructions Felix, but am still not able to get a background image to display. I will include my grub.cfg, so you guys might look at that. Thanks again for all the help! Since switching over to Grub2, it has been stable & reliable with my XFS partitions. I'm actually thinking it might be a good time for you guys to release another version. 1.97 would be good, but I honestly think 2.0beta1 is obtainable. It's a good program.

There was already some talk about releasing 1.97 but it has stopped.

Quoted 1 line

grub.cfg follows:

Your config is generated without the graphical terminal stuff. It should look like this:

if loadfont /usr/share/grub/ascii.pf2 ; then
set gfxmode=640x480
insmod gfxterm
insmod vbe
terminal_output gfxterm
fi
insmod png
backgroung_image /boot/grub/ZenGrub.png

Signature · 1 line
Felix Zielcke
author
#2 lore raw
Quoted 17 lines · Felix Zielcke

Am Dienstag, den 03.02.2009, 15:22 -0500 schrieb BandiPat:

Quoted 3 lines

Now on to my questions. I have built the new svn as a Zenwalk package.
When updating Grub2 with new versions, is it advisable to run
grub-install again, so that new or revised files get copied to your /boot/grub directory or is just upgrading all that is necessary for grub2 to take advantage of the new stuff?

Yes you need to run grub-install to really update it.

Quoted 1 line

Next, I followed your instructions Felix, but am still not able to get a background image to display. I will include my grub.cfg, so you guys might look at that. Thanks again for all the help! Since switching over to Grub2, it has been stable & reliable with my XFS partitions. I'm actually thinking it might be a good time for you guys to release another version. 1.97 would be good, but I honestly think 2.0beta1 is obtainable. It's a good program.

There was already some talk about releasing 1.97 but it has stopped.

Quoted 1 line

grub.cfg follows:

Your config is generated without the graphical terminal stuff. It should look like this:

Quoted 9 lines

if loadfont /usr/share/grub/ascii.pf2 ; then
set gfxmode=640x480
insmod gfxterm
insmod vbe
terminal_output gfxterm
fi
insmod png
backgroung_image /boot/grub/ZenGrub.png

===========
Ok, it's getting better! I can see the changes made with the above code you gave me, but I can still not get a background image to display. I even reduced a picture down to 640x480-256 to see if maybe the picture was too large. Can I change the size from 640x480 to say 800x600 or 1024x768 for the gfxterm?

Here is my new grub.cfg file:
#
# DO NOT EDIT THIS FILE
#
# It is automatically generated by /usr/sbin/grub-mkconfig using templates

# from  and settings from /usr/etc/default/grub
#

### BEGIN /usr/etc/grub.d/00_header ###
set default=0
set timeout=10
if loadfont /usr/share/grub/ascii.pf2 ; then
set gfxmode=640x480
insmod gfxterm
insmod vbe
terminal_output gfxterm
fi
insmod png
backgroung_image /boot/grub/Zen-splash.png
terminal console
### END /usr/etc/grub.d/00_header ###

### BEGIN /usr/etc/grub.d/10_freebsd ###
### END /usr/etc/grub.d/10_freebsd ###

### BEGIN /usr/etc/grub.d/10_hurd ###
### END /usr/etc/grub.d/10_hurd ###

### BEGIN /usr/etc/grub.d/10_linux ###

menuentry "GNU/Linux, Zenwalk 6.0" {
        set root=(hd0,2)
        search --fs-uuid --set aa0d3fde-d609-45b8-9af9-081d159768ef
        linux   /boot/vmlinuz root=/dev/sda2 ro splash=silent vga=794
		initrd (hd0,2)/boot/initrd.splash
}
menuentry "GNU/Linux, Zenwalk Text" {
        set root=(hd0,2)
        search --fs-uuid --set aa0d3fde-d609-45b8-9af9-081d159768ef
        linux   /boot/vmlinuz root=/dev/sda2 3 ro splash=silent vga=794
		initrd (hd0,2)/boot/initrd.splash
}
menuentry "Memory Test (memtest86+)" {
		set root=(hd0,2)
		linux (hd0,2)/boot/memtest86+-1.70.bin
}
menuentry "GNU/Linux, Linux 2.6.28.2 (single-user mode)" {
        set root=(hd0,2)
        search --fs-uuid --set aa0d3fde-d609-45b8-9af9-081d159768ef
        linux   /boot/vmlinuz root=/dev/sda2 ro single
}

### END /usr/etc/grub.d/10_linux ###

### BEGIN /usr/etc/grub.d/30_os-prober ###
### END /usr/etc/grub.d/30_os-prober ###

### BEGIN /usr/etc/grub.d/40_custom ###
# This file is an example on how to add custom entries ### END /usr/etc/grub.d/40_custom ###

Thanks as always,
Pat

#3 lore raw
Quoted 1 line · On Tue, 03 Feb 2009 20:03:04 -0500 BandiPat <[email protected]> wrote:

Here is my new grub.cfg file:

...

Quoted 11 lines

### BEGIN /usr/etc/grub.d/00_header ###
set default=0
set timeout=10
if loadfont /usr/share/grub/ascii.pf2 ; then
set gfxmode=640x480
insmod gfxterm
insmod vbe
terminal_output gfxterm
fi
insmod png
backgroung_image /boot/grub/Zen-splash.png

^^^ 'backgroung_image' -> 'background_image'
I think that is your problem. Also, you can try executing 'background_image' from the command line to see if it works that way, if you're having trouble.

Regards,
Colin

author
#4 lore raw
Quoted 22 lines · Colin D Bennett
Quoted 1 line · On Tue, 03 Feb 2009 20:03:04 -0500 BandiPat <[email protected]> wrote:

Here is my new grub.cfg file:

...

Quoted 11 lines

### BEGIN /usr/etc/grub.d/00_header ###
set default=0
set timeout=10
if loadfont /usr/share/grub/ascii.pf2 ; then
set gfxmode=640x480
insmod gfxterm
insmod vbe
terminal_output gfxterm
fi
insmod png
backgroung_image /boot/grub/Zen-splash.png

^^^ 'backgroung_image' -> 'background_image'
I think that is your problem. Also, you can try executing 'background_image' from the command line to see if it works that way, if you're having trouble.

Quoted 5 lines

Regards,
Colin

------------------------------------------------------------------------

Yep, thanks Colin, I caught that also after I wrote my email. That's what I get for copying Felix's email. ;-)

It didn't work though, but I did test the different screen sizes which do work up to 1024x768 at least. Wonder if it would do wide screen sizes also? hmmm, will try that.

Now, are you talking about calling the command from the loader screen or after you've booted up? I will try it both ways to test, then I'll report back.

Regards,
Pat

author
#5 lore raw
In reply to Colin D Bennett
Quoted 22 lines · Colin D Bennett
Quoted 1 line · On Tue, 03 Feb 2009 20:03:04 -0500 BandiPat <[email protected]> wrote:

Here is my new grub.cfg file:

...

Quoted 11 lines

### BEGIN /usr/etc/grub.d/00_header ###
set default=0
set timeout=10
if loadfont /usr/share/grub/ascii.pf2 ; then
set gfxmode=640x480
insmod gfxterm
insmod vbe
terminal_output gfxterm
fi
insmod png
backgroung_image /boot/grub/Zen-splash.png

^^^ 'backgroung_image' -> 'background_image'
I think that is your problem. Also, you can try executing 'background_image' from the command line to see if it works that way, if you're having trouble.

Quoted 5 lines

Regards,
Colin

------------------------------------------------------------------------

Thanks Colin,
This gave me the last little bit of info I needed to get this working! Thanks very much for everyone's help & patience. Grub2 rocks! Now all I have to do is convince the head guys for Slackware and Zenwalk to switch over. I have a snapshot of the screen, but didn't know if this list allowed attachments.

Regards,
Pat