Gentoo Archives: gentoo-user

From: Walter Dnes <waltdnes@××××××××.org>
To: gentoo-user@l.g.o
Subject: [gentoo-user] [SOLVED} Exact setting in grub to default to a kernel by name?
Date: Wed, 16 Jun 2021 00:51:13
Message-Id: YMlLDfwNob6dwVOH@waltdnes.org
In Reply to: Re: [gentoo-user] Re: Exact setting in grub to default to a kernel by name? by Neil Bothwick
1 On Tue, Jun 15, 2021 at 02:56:48PM +0100, Neil Bothwick wrote
2 > On Mon, 14 Jun 2021 16:25:00 -0400, Walter Dnes wrote:
3 >
4 > > Unfortunately, just like the standard grub.cfg, it's a tiny-looking
5 > > text font on my 1920x1080 monitor that I have to squint at. Next
6 > > step... what do I do to get a functioning GUI?
7 >
8 > Set up a theme, you can use one of the supplied examples as a base, with
9 > a larger font.
10 >
11 > https://www.gnu.org/software/grub/manual/grub/grub.html#Fonts
12
13 After more reboots than I want to remember, I'm finally where I want
14 to be. Thanks for everybody's help. I found a thread on Stackexchange
15 https://unix.stackexchange.com/questions/31672/can-grub-font-size-be-customised
16 which supplied the final piece of the puzzle. That thread was started
17 9 years, 4 months ago. grub1 is now a distant memory, so change all
18 mentions of "grub2" to plain "grub". As per the Stackexchange thread,
19 there's a grub-mkfont command that can translate ttf files to pf2 files
20 readable by grub. ***AND YOU CAN RESIZE THE FONT WHILE YOURE AT IT***.
21 So I ran grub-mkfont, with "-s 64" which means 64 pixels high...
22
23 grub-mkfont -s 64 -o /boot/grub/fonts/HonkingBigFont.pf2 /usr/share/fonts/dejavu/DejaVuSansMono-Bold.ttf
24
25 My grub.cfg follows. Yours would obviously differ in details.
26
27 ====================================================================
28 search --set=root --label rootfs
29 sleep 2
30
31 set timeout=15
32 set gfxmode=640x480
33 set gfxpayload=keep
34 loadfont /boot/grub/fonts/HonkingBigFont.pf2
35 insmod all_video
36 insmod gfxterm
37 terminal_output gfxterm
38
39 menuentry 'Linux Experimental' {
40 linux /vmlinuz-experimental root=/dev/sda2 ro noexec=on net.ifnames=0
41 intel_pstate=disable ipv6.disable=1
42 }
43 menuentry 'Linux Experimental Recovery' {
44 linux /vmlinuz-experimental root=/dev/sda2 ro
45 }
46 menuentry 'Linux Production' {
47 linux /vmlinuz-production root=/dev/sda2 ro noexec=on net.ifnames=0 i
48 ntel_pstate=disable ipv6.disable=1
49 }
50 menuentry 'Linux Production Recovery' {
51 linux /vmlinuz-production root=/dev/sda2 ro
52 }
53 ====================================================================
54
55 The menu output is Y-U-U-U-U-U-GE, which makes it nice and readable on
56 my 1920x1080 monitor. There's a cosmetic problem in that this font
57 doesn't have "line-drawing characters"...
58
59 1) The box around the menu is composed of garbage characters.
60 2) The bit about using up-arrow and down-arrow keys to select also shows
61 the same garbage characters.
62
63 grub-mkfont man page says "Convert common font file formats into PF2",
64 so I may look at other character sets that have line-drawing characters.
65
66 --
67 Walter Dnes <waltdnes@××××××××.org>
68 I don't run "desktop environments"; I run useful applications