You are not logged in.

#1 2012-04-05 14:49:12

fdservices
Member
From: France
Registered: 2012-02-06
Posts: 413

Grub2 themes

I thought I might play with Grub2 and get the starfield theme installed, but I seem to have run into some problem which I cannot work out.

Here is my /etc/default/grub file:

GRUB_DEFAULT=0
GRUB_TIMEOUT=5
GRUB_DISTRIBUTOR="Arch Linux"
GRUB_CMDLINE_LINUX_DEFAULT="quiet add_efi_memmap splash"
GRUB_CMDLINE_LINUX="quiet splash"

# Preload both GPT and MBR modules so that they are not missed
GRUB_PRELOAD_MODULES="part_gpt part_msdos"

# Uncomment to enable Hidden Menu, and optionally hide the timeout count
#GRUB_HIDDEN_TIMEOUT=5
#GRUB_HIDDEN_TIMEOUT_QUIET=true

# Uncomment to use basic console
GRUB_TERMINAL_INPUT=console

# Uncomment to disable graphical terminal
GRUB_TERMINAL_OUTPUT='console gfxterm'

# The resolution used on graphical terminal
# note that you can use only modes which your graphic card supports via VBE
# you can see them in real GRUB with the command `vbeinfo'
GRUB_GFXMODE=auto

# Uncomment to allow the kernel use the same resolution used by grub
GRUB_GFXPAYLOAD_LINUX=keep

# Uncomment if you want GRUB to pass to the Linux kernel the old parameter
# format "root=/dev/xxx" instead of "root=/dev/disk/by-uuid/xxx"
#GRUB_DISABLE_LINUX_UUID=true

# Uncomment to disable generation of recovery mode menu entries
GRUB_DISABLE_RECOVERY=true

# Uncomment and set to the desired menu colors.  Used by normal and wallpaper
# modes only.  Entries specified as foreground/background.
GRUB_COLOR_NORMAL="light-blue/black"
GRUB_COLOR_HIGHLIGHT="light-cyan/blue"

# Uncomment one of them for the gfx desired, a image background or a gfxtheme
#GRUB_BACKGROUND="/path/to/wallpaper"
GRUB_THEME="/boot/grub/themes/starfield/themes.txt"

but all I get is a very nice, colourful, text screen.

Where have I gone wrong?

Andrew

Offline

#2 2012-04-05 17:26:24

wolfcore
Member
From: California
Registered: 2012-03-06
Posts: 137

Re: Grub2 themes

Did you

grub-mkconfig -o /boot/grub/grub.cfg

?

Offline

#3 2012-04-06 08:01:36

fdservices
Member
From: France
Registered: 2012-02-06
Posts: 413

Re: Grub2 themes

Oh yes  big_smile

Offline

#4 2012-04-06 20:51:52

cfr
Member
From: Cymru
Registered: 2011-11-27
Posts: 7,168

Re: Grub2 themes

Does having the theme line uncommented have any effect at all? That is, when you say you get a "nice, colourful menu", is it different from what you get with just the same config but no theme specified or is it different?


CLI Paste | How To Ask Questions

Arch Linux | x86_64 | GPT | EFI boot | refind | stub loader | systemd | LVM2 on LUKS
Lenovo x270 | Intel(R) Core(TM) i5-7200U CPU @ 2.50GHz | Intel Wireless 8265/8275 | US keyboard w/ Euro | 512G NVMe INTEL SSDPEKKF512G7L

Offline

#5 2012-04-07 07:12:50

fdservices
Member
From: France
Registered: 2012-02-06
Posts: 413

Re: Grub2 themes

No fifference at all. Also I do not get the:

If configuring the theme was successful, you'll see Found theme: /boot/grub/themes/starfield/theme.txt in the terminal.

when I re-install. Starfield is the theme distributed with Grub2, I suppose it may not work, but I would have thought that unlikely.

Andrew

Offline

#6 2012-04-08 00:31:51

cfr
Member
From: Cymru
Registered: 2011-11-27
Posts: 7,168

Re: Grub2 themes

I think there's something wrong with the theme. I booted into the grub command line and tried to load the font for the theme and grub complained that the font had data missing so it couldn't load it.

By the way, is there any documentation anywhere on what you're supposed to set the theme to e.g. the directory, the theme.txt file or what? I manage grub.cfg by hand and I couldn't figure it out from the scripts. So I'm not surprised the theme didn't work in my case but given the issue with the font, I don't think it would have worked anyway. grub loads the unicode.pf2 font fine so it definitely isn't a problem loading fonts generally. just the dejavu.pf2.

Note that the font is not itself part of the default theme according to the documentation. According to that, the font is meant to be created from the latest available version at compile time and so is not included in the source. So the theme itself may be all right - there may just be something amiss with the font created for the arch package.

Just guessing here.

EDIT: dejavu.pf2 is *tiny* compared with unicode.pf2. Maybe that's how it should be but the "data missing" doesn't look implausible.

Last edited by cfr (2012-04-08 00:34:10)


CLI Paste | How To Ask Questions

Arch Linux | x86_64 | GPT | EFI boot | refind | stub loader | systemd | LVM2 on LUKS
Lenovo x270 | Intel(R) Core(TM) i5-7200U CPU @ 2.50GHz | Intel Wireless 8265/8275 | US keyboard w/ Euro | 512G NVMe INTEL SSDPEKKF512G7L

Offline

#7 2012-04-08 01:42:27

cfr
Member
From: Cymru
Registered: 2011-11-27
Posts: 7,168

Re: Grub2 themes

Update: OK. So I persuaded it to work. What I did (I think):

grub-mkfont -o /boot/grub/themes/starfield/dejavu10.pf2 -s 10 -v /usr/share/fonts/TTF/DejaVuSans.ttf
grub-mkfont -o /boot/grub/themes/starfield/dejavu12.pf2 -s 12 -v /usr/share/fonts/TTF/DejaVuSans.ttf
grub-mkfont -o /boot/grub/themes/starfield/dejavu14.pf2 -s 14 -v /usr/share/fonts/TTF/DejaVuSans-Bold.ttf

I then told grub to load these fonts in my grub.cfg.

If you are generating grub.cfg automatically, I *think* that you will need to remove /boot/grub/themes/starfield/dejavu.pf2 before regenerating grub.cfg but that the autogeneration process should then ensure that the above font files are loaded correctly.

I should perhaps add that reboot revealed at least two issues with the theme. First, as you move down the list of boot options, the boot menu flashes in a way that hurts the eyes and makes it difficult to navigate if you have quite a long list. (And there's nothing useful like, say "press the number for the option you want" even if the list didn't scroll off the bottom of the menu.) Second, if you need to edit an entry, the console displayed is only part of your screen and the font used is bizarre, making it very difficult to read either entries or instructions. I'm not sure why this is. Maybe I haven't done something I should have.

I'd be interested if you have the same issues because if you don't, it is probably my grub.cfg. If you do, it is probably the theme (or something else about grub's use of it).

PS Does anybody know what gfxmenu is for or how to use it? For some reason, I can't find it - or, rather, I can find completely inconsistent claims about what it is for e.g. maintaining translations of the menu; needed for graphical menu at all; used by grub4dos (lots of results for this topping the google lists which surprised me). I can't find anything in the grub2 manual, though.

Last edited by cfr (2012-04-08 03:07:40)


CLI Paste | How To Ask Questions

Arch Linux | x86_64 | GPT | EFI boot | refind | stub loader | systemd | LVM2 on LUKS
Lenovo x270 | Intel(R) Core(TM) i5-7200U CPU @ 2.50GHz | Intel Wireless 8265/8275 | US keyboard w/ Euro | 512G NVMe INTEL SSDPEKKF512G7L

Offline

#8 2012-04-08 07:42:42

fdservices
Member
From: France
Registered: 2012-02-06
Posts: 413

Re: Grub2 themes

You could look at this http://grub.gibibit.com/ for the themes documentation but it may be out of date.

This looks more recent: http://www.4shared.com/file/lFCl6wxL/grub_guidetar.html

I am not at my grub2 computer at the moment, but will try your suggestions and come back.

Andrew

Offline

#9 2012-04-11 11:47:24

fdservices
Member
From: France
Registered: 2012-02-06
Posts: 413

Re: Grub2 themes

Well I have found something that works and also gives a lot of information about themes:

http://www.4shared.com/archive/lFCl6wxL … detar.html

there is a demo theme included which works, but the install script does not - so take care.

I copied the demo folder from the ed3 folder into /usr/grub/themes/demo and changed my /etc/default/grub file to include GRUB_THEME=" /usr/grub/themes/demo/theme.txt" and updated grub with

grub-mkconfig -o /boot/grub/grub.cfg

It works but there is a delay on the keyboard input.

I also found:

http://grub.gibibit.com/Themes

which kind of, almost, vaguely works and might give some more info on how to construct themes.

Hope this helps

Andrew

Offline

Board footer

Powered by FluxBB