Graphical boot with grub2

Bernd Eggink monoped at sudrala.de
Tue Nov 20 10:12:09 UTC 2012


On 19.11.2012 16:40, Matt Housh wrote:
> On 11/19/2012 07:46 AM, Bernd Eggink wrote:
>> Hi all, has anybody successfully configured a graphical grub-2.00
>> boot in Crux 2.8 - with a nice background image, a correct font and
>> all? I gave up after 2 days of experimenting and approx. 100 reboots.
>> Either I got an image, but with an ugly frame around it (the font
>> missing the line and corner characters), or I got a text mode menu
>> anyway. I also spent some time in searching the web for a grub2
>> documentation, but it seems that any good documentation about grub2
>> is automatically Ubuntu-specific. So if anybody has such a
>> configuration, I'd appreciate if he could send me his grub.cfg and
>> etc/default/grub. - Thanks in advance!
>
> Hi, Bernd,
>
> This is indeed possible with a little bit of work. Here's an example
> grub.cfg:
>
> -----
> set default=0
> set timeout=5
>
> set menu_color_normal=white/black
> set menu_color_highlight=white/blue
>
> loadfont /boot/grub/unifont.pf2
> set gfxmode=1024x768
> insmod all_video
> insmod gfxterm
> terminal_output gfxterm
> insmod jpeg
> background_image -m stretch /boot/grub/artorias.jpg
>
> # set the root variable
> search --fs-uuid --no-floppy --set root aaaaaaaa-bbbb-cccc-dddd-eeeeeeeeeeee
>
> menuentry "CRUX 2.8 x86_64-multilib (3.5.4)" {
> 	set gfxpayload=keep
> 	linux /boot/vmlinuz-3.5.4 root=/dev/sdc2 ro quiet
> }
>
> menuentry "CRUX 2.8 x86_64-multilib (3.5.4) single-user rescue" {
> 	linux /boot/vmlinuz-3.5.4 root=/dev/sdc2 ro single
> }
> -----
>
> First things first, the unifont.pf2 file is created by downloading
> unifont in BDF format from http://unifoundry.com/unifont.html, then
> converting it via grub-mkfont:
>
> $ wget http://unifoundry.com/unifont-5.1.20080820.bdf.gz
> $ gzip -d unifont-5.1.20080820.bdf.gz
> $ grub-mkfont -o unifont.pf2 unifont-5.1.20080820.bdf
> $ sudo install -o root -g root -m 0644 unifont.pf2 /boot/grub/

Matt,

that was helpful, thanks a lot. Using the correct resolution and this 
font fixed things for me. The normal X11 fonts didn't work. I 
additionally set

	color_normal=black/black

to make the header and footer text better visible. And I'll stop using 
grub-mkconfig, which puts a lot of unnecessary and confusing stuff into 
the config file.

I think it would be VERY helpful for others if the grub2 port contained 
a README with a grub.cfg skeleton as well as a directly usable unicode 
.pf2 font.

Bernd



More information about the CRUX mailing list