Gentoo Archives: gentoo-user

From: Daniel Frey <djqfrey@×××××.com>
To: gentoo-user@l.g.o
Subject: Re: [gentoo-user] Boot Gentoo live iso from grub
Date: Fri, 04 May 2018 01:16:48
Message-Id: 51a72967-fb6c-a2fb-9428-f1ac64725c9f@gmail.com
In Reply to: Re: [gentoo-user] Boot Gentoo live iso from grub by Neil Bothwick
1 On 02/18/18 12:25, Neil Bothwick wrote:
2 > On Sun, 18 Feb 2018 11:10:38 -0800, Daniel Frey wrote:
3 >
4 >> I started moving away from Grub2 mostly because on my EFI computers it
5 >> was booting in blind mode so you couldn't see what was going on while
6 >> booting.
7 >
8 > I moved away from it on my EFI computers simply because I could!
9 >
10 >> The thing I hate is that the grub2 configuration generator generates
11 >> 5000 line config files and if it doesn't do exactly what you want it's a
12 >> real pain in the arse to do something simple like rename a loader entry.
13 >
14 >> So I've been making my own config files that are much more brief.
15 >
16 > The generators are only shell scripts. I wrote my own which generate
17 > much shorter configs that do what I want, and removed the executable bit
18 > on the original scripts.
19 >
20 >
21
22 Well, just an update. refind wasn't using the video properly in my NUC
23 either, but after a couple hours of messing around I found a solution
24 that doesn't boot in blind mode (i.e. I can actually see the text
25 console when it boots up.) This is a manual config that is easy to
26 maintain, not the godawful config the scripts generate.
27
28 Thought I'd share it.
29
30 Dan
31
32 ==== grub.cfg ====
33 timeout=5
34 default=0
35
36 # Declare where the Grub modules are located
37 set prefix=(hd0,gpt2)/grub
38
39 # Load EFI video drivers. This device is EFI so keep the
40 # video mode while booting the linux kernel.
41 insmod efi_gop
42 insmod font
43 if loadfont ${prefix}/fonts/unicode.pf2
44 then
45 insmod gfxterm
46 set gfxmode=auto
47 set gfxpayload=keep
48 terminal_output gfxterm
49 fi
50
51 # Declare boot entries below this line
52 menuentry 'Gentoo 4.9.95' {
53 root=hd0,gpt2
54 linux /boot/kernel-4.9.95-gentoo quiet root=/dev/sda4
55 }