Gentoo Archives: gentoo-user

From: Mick <michaelkintzios@×××××.com>
To: gentoo-user@l.g.o
Subject: Re: [gentoo-user] Irritating ~5s pause whilst booting with grub
Date: Tue, 23 Oct 2018 17:21:25
Message-Id: 1560932.s64649PSti@dell_xps
In Reply to: [gentoo-user] Irritating ~5s pause whilst booting with grub by Alan Mackenzie
1 On Monday, 22 October 2018 21:03:54 BST Alan Mackenzie wrote:
2 > Hello, Gentoo,
3 >
4 > This isn't a critical problem, but it's a little irritating.
5 >
6 > When my machine boots, it first displays the BIOS invitation to type F2,
7 > then starts grub. Grub spends about 5 seconds with a blank screen, and
8 > an underline cursor dotting about randomly in the top left hand area of
9 > the screen, possibly some 25 x 80 area (whatever that might mean). Only
10 > then does it display its boot menu.
11 >
12 > My machine is a standard up to date (18 months old) AMD-64 Ryzen machine
13 > booting from EFI.
14 >
15 > Looking into my /boot/grub/grub.conf, I've got:
16 >
17 > # Menu timeout
18 > timeout=10
19 >
20 > : the irritating delay is ~5 seconds, so this can't be due to anything
21 > dependant on that timeout setting; and
22
23 Yes, this is the time GRUB will wait for keyboard input before booting the
24 default menu entry.
25
26
27 > # If we have a font available, start graphical output.
28 > if loadfont unifont; then
29 > echo "Loading unifont"
30 > # Output resolution for GRUB (eg. 1024x768 or 'auto').
31 > gfxmode=auto
32
33 GRUB will select some resolution your hardware can accommodate. I guess this
34 means probing for suitable resolutions and this is likely to take the ~5
35 seconds you have noticed.
36
37 You could specify something suitable and to check what GRUB can use, run the
38 command 'videoinfo' in GRUB.
39
40
41 > # Output resolution for Linux (VESAFB only).
42 > # 'keep' means use the same resolution as GRUB.
43 > # For other framebuffer drivers, pass a resolution using the
44 > # video= kernel param.
45 > gfxpayload=keep
46 >
47 > # Load all video drivers.
48 > insmod all_video
49 >
50 > # Switch to graphical output.
51 > terminal_output gfxterm
52 > fi
53 >
54 > . I'm wondering if my problem has something to do with the 'insmod
55 > all_video', and then the system is trying out lots of different video
56 > modes, each with a long timeout, before finally finding the correct one.
57 > Would, perhaps, a more specific value of gfxmode help?
58
59 The all_video refers to the GRUB drivers available for video. Have a look in
60 /boot/grub/video.lst to see what GRUB has in there, or in /usr/lib64/grub/
61 x86_64-efi/video.lst and try the one you prefer GRUB to load.
62
63
64 > Also, as an aside, grub has 878 .c files and a user's info guide
65 > weighing in at 300 kbytes. It's great that the documentation exists,
66 > but 300k? This is all just for a boot system. There are 255 loadable
67 > modules. (For comparison, the Emacs core has just 132 .c files.) I
68 > can't help feeling that this has got horribly out of hand.
69
70 I share your feelings here. I don't use GRUB unless I *have* to multiboot,
71 which these days is a rarity.
72
73
74 > I just need a program to boot the machine, that's all - I don't really
75 > care what colours it uses, what fonts it uses, it only needs to read a
76 > GPT partition table, and boot on utterly standard hardware. I
77 > appreciate having a menu of different boot options (in my case, this
78 > just means different kernel versions), but everything else is just
79 > aesthetic sugar. Too much sugar isn't good for one.
80
81 You could use the the kernel EFI stub to boot directly from the EFI partition,
82 without the intermediation of a boot manager.[1] The only problem with this
83 approach is you will need to enter your UEFI boot menu to select another
84 kernel image to boot with, if the default kernel selection is not your
85 requirement.
86
87 [1] https://wiki.gentoo.org/wiki/EFI_stub_kernel
88
89 --
90 Regards,
91 Mick

Attachments

File name MIME type
signature.asc application/pgp-signature

Replies

Subject Author
Re: [gentoo-user] Irritating ~5s pause whilst booting with grub Alan Mackenzie <acm@×××.de>