GNU bug report logs -
#44877
Root on LVM support
Previous Next
To reply to this bug, email your comments to 44877 AT debbugs.gnu.org.
Toggle the display of automated, internal messages from the tracker.
Report forwarded
to
bug-guix <at> gnu.org
:
bug#44877
; Package
guix
.
(Wed, 25 Nov 2020 23:54:01 GMT)
Full text and
rfc822 format available.
Acknowledgement sent
to
Mikhail Tsykalov <tsymsh <at> gmail.com>
:
New bug report received and forwarded. Copy sent to
bug-guix <at> gnu.org
.
(Wed, 25 Nov 2020 23:54:01 GMT)
Full text and
rfc822 format available.
Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):
Guix System in current state can't boot from lvm partition because grub
can't find kernel and initrd. This also applies to systems where
/gnu/store is on lvm partition. Grub has lvm support in the form of
"lvm" module, but it isn't loaded currently. Making grub config
generator emit "insmod lvm" before grub starts accessing stuff on
/gnu/store (so immediately after initial commit) will fix this.
Information forwarded
to
bug-guix <at> gnu.org
:
bug#44877
; Package
guix
.
(Mon, 13 Mar 2023 13:59:02 GMT)
Full text and
rfc822 format available.
Message #8 received at 44877 <at> debbugs.gnu.org (full text, mbox):
[Message part 1 (text/plain, inline)]
Hello Emmanuel!
Thx for the report!
I think this is bug 44877, maybe we can/should merge it.
Here [1] is a patch (and testcase).
[1] https://issues.guix.gnu.org/60442
--
Man braucht zwei Jahre, um sprechen zu lernen,
und fünfzig, um schweigen zu lernen. E.Hemingway
[signature.asc (application/pgp-signature, inline)]
Information forwarded
to
bug-guix <at> gnu.org
:
bug#44877
; Package
guix
.
(Tue, 14 Mar 2023 21:27:02 GMT)
Full text and
rfc822 format available.
Message #11 received at 44877 <at> debbugs.gnu.org (full text, mbox):
De Michael Rohleder le 13/03/2023 à 14:56:
> Hello Emmanuel!
>
> Thx for the report!
>
> I think this is bug 44877, maybe we can/should merge it.
> Here [1] is a patch (and testcase).
>
>
> [1] https://issues.guix.gnu.org/60442
Indeed, it seems to be the same issue.
However, the patch sets the value of `GRUB_PRELOAD_MODULES`, which afaik is
used by `grub-mkconfig` to produce `grub.cfg`, but there seems to be code in
`grub.scm` that also produces `grub.cfg`, and no call to `grub-mkconfig`
there. I'm not sure I understand how all this works anyway…
--
Emmanuel
Information forwarded
to
bug-guix <at> gnu.org
:
bug#44877
; Package
guix
.
(Thu, 23 Mar 2023 12:49:02 GMT)
Full text and
rfc822 format available.
Message #14 received at 44877 <at> debbugs.gnu.org (full text, mbox):
Hi,
Emmanuel Beffara <manu <at> beffara.org> writes:
> De Michael Rohleder le 13/03/2023 à 14:56:
>> Hello Emmanuel!
>>
>> Thx for the report!
>>
>> I think this is bug 44877, maybe we can/should merge it.
>> Here [1] is a patch (and testcase).
>>
>>
>> [1] https://issues.guix.gnu.org/60442
>
> Indeed, it seems to be the same issue.
>
> However, the patch sets the value of `GRUB_PRELOAD_MODULES`, which afaik is
> used by `grub-mkconfig` to produce `grub.cfg`, but there seems to be code in
> `grub.scm` that also produces `grub.cfg`, and no call to `grub-mkconfig`
> there. I'm not sure I understand how all this works anyway…
Guix indeed takes care to generate the grub.cfg itself, via the
make-grub-configuration procedure from (gnu bootloader grub), and
grub-mkconfig is *not* used.
grub-install is used though, so perhaps GRUB_PRELOAD_MODULES could be
honored by it (although it's not documented so I doubt it). It seems to
me that since we produce grub.cfg ourselves if there's something to add
there for LVM support (which I'm not sure there is -- apparently it
already works for you ?), it should be explicitly coded in (gnu
bootloader grub).
info '(grub) Changes from GRUB Legacy' mentions that "* GRUB 2 can read
files directly from LVM and RAID devices.", so I would think there's
nothing special to do?
--
Thanks,
Maxim
Information forwarded
to
bug-guix <at> gnu.org
:
bug#44877
; Package
guix
.
(Fri, 24 Mar 2023 08:24:01 GMT)
Full text and
rfc822 format available.
Message #17 received at 44877 <at> debbugs.gnu.org (full text, mbox):
Hello,
De Maxim Cournoyer le 23/03/2023 à 13:48:
> It seems to me that since we produce grub.cfg ourselves if there's something
> to add there for LVM support (which I'm not sure there is -- apparently it
> already works for you ?), it should be explicitly coded in (gnu bootloader
> grub).
It does not work for me, that is why I reported this! The system does not boot
unless I manually add `insmod lvm` in `grub.cfg` because Grub does not find
the partition that contains the store.
So I agree something has to be done there.
> info '(grub) Changes from GRUB Legacy' mentions that "* GRUB 2 can read
> files directly from LVM and RAID devices.", so I would think there's nothing
> special to do?
As I understand it, this just means that Grub 2 has a module for reading LVM
devices and a module for reading RAID devices. But it still has to load them
somehow (unless there is a way to include them statically so they are
available from the beginning).
--
Emmanuel
Information forwarded
to
bug-guix <at> gnu.org
:
bug#44877
; Package
guix
.
(Fri, 24 Mar 2023 16:31:01 GMT)
Full text and
rfc822 format available.
Message #20 received at 44877 <at> debbugs.gnu.org (full text, mbox):
Hi,
Emmanuel Beffara <manu <at> beffara.org> writes:
> Hello,
>
> De Maxim Cournoyer le 23/03/2023 à 13:48:
>> It seems to me that since we produce grub.cfg ourselves if there's something
>> to add there for LVM support (which I'm not sure there is -- apparently it
>> already works for you ?), it should be explicitly coded in (gnu bootloader
>> grub).
>
> It does not work for me, that is why I reported this! The system does not boot
> unless I manually add `insmod lvm` in `grub.cfg` because Grub does not find
> the partition that contains the store.
>
> So I agree something has to be done there.
OK, thanks for explaining. Could you please try
https://issues.guix.gnu.org/60442 (by applying the patch to a local guix
checkout, building it, then 'sudo -E ./pre-inst-env sudo guix system
reconfigure /path/to/your/config.scm)? The test suite was broken it
seems (it passed without the fix), but perhaps the fix still does work?
--
Thanks,
Maxim
Information forwarded
to
bug-guix <at> gnu.org
:
bug#44877
; Package
guix
.
(Tue, 28 Mar 2023 12:33:01 GMT)
Full text and
rfc822 format available.
Message #23 received at 44877 <at> debbugs.gnu.org (full text, mbox):
Hi,
De Maxim Cournoyer le 24/03/2023 à 13:24:
> OK, thanks for explaining. Could you please try
> https://issues.guix.gnu.org/60442 (by applying the patch to a local guix
> checkout, building it, then 'sudo -E ./pre-inst-env sudo guix system
> reconfigure /path/to/your/config.scm)? The test suite was broken it
> seems (it passed without the fix), but perhaps the fix still does work?
I did as you suggested, and unfortunately the patch has no observable effect
on my system.
I can't say it comes as a surprise. Indeed, what the patch does is set the
environment variable `GRUB_PRELOAD_MODULES` before calling `grub-install`,
which is expected to have no effect: this variable is used by `grub-mkconfig`
to generate a `grub.cfg`, but the code in Guix assembles a Grub configuration
file itself and never calls `grub-mkconfig`. The same applies to the variable
`GRUB_ENABLE_CRYPTODISK`, by the way. Maybe the way `grub.cfg` is produced has
changed at some point in history ?
The only hypothesis I can make is that it would influence `grub-install` by
preloading the given modules in the installed image, but that is not the case.
According to Grub's documentation, passing `--modules=...` to `grub-install`
would have this effect, but I'm not sure it is the right approach.
--
Emmanuel
Information forwarded
to
bug-guix <at> gnu.org
:
bug#44877
; Package
guix
.
(Tue, 28 Mar 2023 14:11:02 GMT)
Full text and
rfc822 format available.
Message #26 received at 44877 <at> debbugs.gnu.org (full text, mbox):
Hi,
Emmanuel Beffara <manu <at> beffara.org> writes:
> Hi,
>
> De Maxim Cournoyer le 24/03/2023 à 13:24:
>> OK, thanks for explaining. Could you please try
>> https://issues.guix.gnu.org/60442 (by applying the patch to a local guix
>> checkout, building it, then 'sudo -E ./pre-inst-env sudo guix system
>> reconfigure /path/to/your/config.scm)? The test suite was broken it
>> seems (it passed without the fix), but perhaps the fix still does work?
>
> I did as you suggested, and unfortunately the patch has no observable effect
> on my system.
Thanks for testing it!
> I can't say it comes as a surprise. Indeed, what the patch does is set the
> environment variable `GRUB_PRELOAD_MODULES` before calling `grub-install`,
> which is expected to have no effect: this variable is used by `grub-mkconfig`
> to generate a `grub.cfg`, but the code in Guix assembles a Grub configuration
> file itself and never calls `grub-mkconfig`. The same applies to the variable
> `GRUB_ENABLE_CRYPTODISK`, by the way. Maybe the way `grub.cfg` is produced has
> changed at some point in history ?
I'm not sure, but I agree it's confusing to have extraneous setenv
there if they serve no purpose (and my understanding is the same as
yours: I don't see how that'd work).
> The only hypothesis I can make is that it would influence `grub-install` by
> preloading the given modules in the installed image, but that is not the case.
> According to Grub's documentation, passing `--modules=...` to `grub-install`
> would have this effect, but I'm not sure it is the right approach.
Since we already generate a custom grub.cfg, the right approach is
probably to add any needed directive directly to it.
--
Thanks,
Maxim
Information forwarded
to
bug-guix <at> gnu.org
:
bug#44877
; Package
guix
.
(Sat, 08 Jun 2024 16:19:02 GMT)
Full text and
rfc822 format available.
Message #29 received at 44877 <at> debbugs.gnu.org (full text, mbox):
From: Ashish SHUKLA <ashish.is <at> lostca.se>
* gnu/bootloader/grub.scm (make-grub-configuration): load lvm grub module
when generating configuration for cryptodisks setup.
Change-Id: I1dbb0c7dbf68a5f93db76dc29793a1f73be49ee2
---
Hi,
I have a Guix setup which has a LUKS2 partition containing a LVM
volume group on which kernels and initrds reside. I think this is one
of the common setups in which folks uses disk-encryption on
GNU/Linux. Since in Guix the kernels/initrd don't get copied to /boot
it requires GRUB to be able to unlock the LUKS2 volume, and look
inside the LVM partitions to find initrd, and kernel. The former part
is already there, this patch enables the latter part, so folks like me
who use LVM on top of LUKS be able to boot, otherwise it requires
going to grub command-line, and running "insmod lvm" prior to
selecting a boot option.
Thanks,
Ashish
gnu/bootloader/grub.scm | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/gnu/bootloader/grub.scm b/gnu/bootloader/grub.scm
index 2723eda5f4..a4ca0bc217 100644
--- a/gnu/bootloader/grub.scm
+++ b/gnu/bootloader/grub.scm
@@ -445,7 +445,7 @@ (define* (make-grub-configuration grub config entries
;; Other type of devices aren't implemented.
#~()))
(let ((devices (map crypto-device->cryptomount store-crypto-devices))
- (modules #~(format port "insmod luks~%insmod luks2~%")))
+ (modules #~(format port "insmod luks~%insmod luks2~%insmod lvm~%")))
(if (null? devices)
devices
(cons modules devices))))
base-commit: 580d77d0fb12448ef1621699cc0c56e787e2aadb
--
2.45.2
Information forwarded
to
bug-guix <at> gnu.org
:
bug#44877
; Package
guix
.
(Thu, 24 Apr 2025 05:18:03 GMT)
Full text and
rfc822 format available.
Message #32 received at 44877 <at> debbugs.gnu.org (full text, mbox):
[Message part 1 (text/plain, inline)]
Hello,
I am newbie to guix and have been trying to install it for the first time
with my usual setup with root on luks + lvm + btrfs. For a week, I thought
that there was something wrong with my config.scm until being aware of by
user ruther in guix channel of libera.chat.
Basically in my case grub can open luks, in grup command prompt, I can see
the lvm devices by ls command and but load kernel somehow.
I am really frustrated that such a important feature is neglected for
years. This is truly a show stopper for me. Please do something about
this.
[Message part 2 (text/html, inline)]
Information forwarded
to
bug-guix <at> gnu.org
:
bug#44877
; Package
guix
.
(Sat, 10 May 2025 21:36:01 GMT)
Full text and
rfc822 format available.
Message #35 received at 44877 <at> debbugs.gnu.org (full text, mbox):
Bilinmek Istemiyor <benibilme <at> gmail.com> writes:
> I am newbie to guix and have been trying to install it for the first time
> with my usual setup with root on luks + lvm + btrfs. For a week, I thought
> that there was something wrong with my config.scm until being aware of by
> user ruther in guix channel of libera.chat.
>
> Basically in my case grub can open luks, in grup command prompt, I can see
> the lvm devices by ls command and but load kernel somehow.
>
> I am really frustrated that such a important feature is neglected for
> years. This is truly a show stopper for me. Please do something about
> this.
My stack is LUKS -> LVM -> BTRFS (seems the same as you) and I can boot
just fine. I have read through the ticket, and must admit I am bit
confused what does not work. Could you share what you configuration
(config.scm) and layout partition layout look like? Maybe also whether
you are using BIOS or UEFI?
Thanks
--
There are only two hard things in Computer Science:
cache invalidation, naming things and off-by-one errors.
This bug report was last modified 32 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.