Gentoo Archives: gentoo-dev

From: Joakim Tjernlund <Joakim.Tjernlund@××××××××.com>
To: "gentoo-dev@l.g.o" <gentoo-dev@l.g.o>
Subject: Re: [gentoo-dev] grub-2 configuration
Date: Wed, 19 Oct 2016 20:44:11
Message-Id: 1476909838.4877.125.camel@infinera.com
In Reply to: Re: [gentoo-dev] grub-2 configuration by Tom H
1 On Wed, 2016-10-19 at 15:21 -0400, Tom H wrote:
2 > On Tue, Oct 18, 2016 at 1:20 PM, Joakim Tjernlund
3 > <Joakim.Tjernlund@××××××××.com> wrote:
4 > >
5 > > On Tue, 2016-10-18 at 12:45 -0400, Tom H wrote:
6 > > >
7 > > > On Tue, Oct 11, 2016 at 10:54 AM, M. J. Everitt <m.j.everitt@×××.org> wrote:
8 > > > >
9 > > > > On 11/10/16 15:42, Tom H wrote:
10 > > > > >
11 > > > > >
12 > > > > > You can use exactly the same text in 40_grub that you'd use in
13 > > > > > grub.cfg and have the latter generated.
14 > > > >
15 > > > > That's a useful tit-bit .. thanks!
16 > > >
17 > > > You're welcome.
18 > > >
19 > > > I doubt that the grub developers intended 40_custom to be the only
20 > > > "/etc/grub.d/" file to be executed but it's practical for generating a
21 > > > simple grub.cfg. This is what I use in a Debian VM:
22 > >
23 > > We still use grub-1 and I really like the automatic generation of new
24 > > grub menu entries using genkernel --bootloader=grub, does this work
25 > > with grub2 as well?
26 >
27 > It looks ike you can pass "--bootloader=grub2" but it's not documented
28 > in the man page because gen_bootloader.sh has:
29
30 OK, good.
31
32 >
33 > set_bootloader() {
34 > case "${BOOTLOADER}" in
35 > grub)
36 > set_bootloader_grub
37 > ;;
38 > grub2)
39 > set_bootloader_grub2
40 > ;;
41 > *)
42 > print_warning "Bootloader ${BOOTLOADER} is not currently supported"
43 > ;;
44 > esac
45 > }
46 >
47 > but it looks like, unlike for grub-legacy, you need a grub config file
48 > ("/boot/grub{,2}/grub.cfg") to exist.
49
50 That is reasonable, to create a new entry one needs to copy the previous and replace the
51 kernel.
52
53 Would be nice if someone could confirm this though.
54
55     Jocke

Replies

Subject Author
Re: [gentoo-dev] grub-2 configuration Tom H <tomh0665@×××××.com>