Gentoo Archives: gentoo-user

From: Neil Bothwick <neil@××××××××××.uk>
To: gentoo-user@l.g.o
Subject: Re: [gentoo-user] Re: Grub and multiple distros on LVM [was duplicate gentoo system ...]
Date: Wed, 25 Nov 2020 14:53:02
Message-Id: 20201125145247.02d5480e@digimed.co.uk
In Reply to: Re: [gentoo-user] Re: Grub and multiple distros on LVM [was duplicate gentoo system ...] by Wols Lists
1 On Wed, 25 Nov 2020 08:53:02 +0000, Wols Lists wrote:
2
3 > >>> I suspect not as GRUB will be reading the menu files and GRUB
4 > >>> doesn't read from LVM volumes.
5 > >>
6 > >> Then what does grub's "lvm" module do, and how does it read the
7 > >> distro's .cfg files from the LVM volumes in which the various distros
8 > >> are installed?
9 > >
10 > > Maybe what you want. I haven't used LVM or GRUB much n the past
11 > > several years, so maybe it is OK now, although a quick web search
12 > > before I posted implied it wasn't. RTFM time?
13 > >
14 > >
15 > I *think* the grub volume itself has to be plain, no lvm, mdadm etc. All
16 > the stuff for that is in the initramfs, so grub loads the initramfs,
17 > starts the kernel, the kernel starts pid 1 which can now start mdadm,
18 > lvm etc, and then it can pivot root onto the proper root filesystem.
19
20 That was my thinking, that the kernel/initramfs was reading the LVs but
21 Grant mentioned the lvm module for GRUB so I broke the habit of a
22 lifetime and read the man page :-O
23
24 "GRUB 2 can read files directly from LVM and RAID devices."
25
26
27 --
28 Neil Bothwick
29
30 Top Oxymorons Number 6: Pretty ugly

Replies