grml / live-boot-grml

GNU General Public License v3.0
10 stars 11 forks source link

9990-main.sh: activate LVM volumes if needed. #17

Closed michaellass closed 1 year ago

michaellass commented 1 year ago

See https://github.com/grml/grml/issues/200 for the reason for this change.

9990-cmdline-old seems to be a very simple script that only sets environment variables and does not interact with the system otherwise. Hence, I put the additional logic into 9990-main.sh , hopefully at a position where it makes sense.

I have not tested this at all outside of a small test script because I am not entirely sure how I could do that. Running grml-live from git would probably still pick up the latest release of live-boot-grml and not the most recent git revision, right?

mika commented 1 year ago

@michaellass you're right, grml-live would use the latest release of live-boot-grml from the grml repository.

I'd say let's give this a try, so I just merged your PR and will release a new live-boot-grml version. The daily Grml ISO builds as of 2023-09-09 should include your change.

Many thanks for the PR, please let me know whether this (not) fixed your issue!

michaellass commented 1 year ago

Thanks for merging!

I tested three of today's images (grml64-full_sid_build4274.iso, grml64-full_testing_build4366.iso, grml32-full_testing_build4309.iso) and all fix the issue.

There is a warning that a file descriptor (/dev/console) is leaked on lvm invocation. I only noticed this on a 32 bit machine but this may be because the more modern machines scroll over this boot phase very quickly. I couldn't find where /dev/console is opened, maybe it's just an initramfs thing to have an open fd to /dev/console. We could hide the warning by redirecting stderr to /dev/null but I'd rather not hide real errors and just live with the warning.

akorn commented 1 year ago

That warning about the leaked file descriptors is due to LVM being (in my opinion) overzealous about reporting potential problems with the environment it runs in (overzealous in that there are probably orders of magnitude more false positives than real issues being reported, which means to most people these warnings will just be noise they'll learn to ignore). See https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=466138 for a discussion. The warnings can (or at least could in 2009) be suppressed by setting the intentionally undocumented LVM_SUPPRESS_FD_WARNINGS environment variable.

mika commented 1 year ago

@michaellass this is fantastic news, thanks a bunch for your efforts! :hugs:

@akorn oh thanks for the pointer to LVM_SUPPRESS_FD_WARNINGS, wasn't aware of this! :+1: