Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 757600 - sys-kernel/genkernel-4.1.2-r3: genkernel --lvm initramfs produces an initramfs unable to mount root
Summary: sys-kernel/genkernel-4.1.2-r3: genkernel --lvm initramfs produces an initramf...
Status: RESOLVED NEEDINFO
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: AMD64 Linux
: Normal normal (vote)
Assignee: Gentoo Genkernel Maintainers
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2020-11-29 13:50 UTC by Sergio
Modified: 2021-07-24 16:21 UTC (History)
3 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
genkernel log and info for both working and not working versions (genkernel.tar.bz2,555.37 KB, application/x-bzip)
2020-12-01 11:13 UTC, Sergio
Details
failure screen (failureScreen.jpg,742.43 KB, image/jpeg)
2020-12-03 09:35 UTC, Sergio
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Sergio 2020-11-29 13:50:05 UTC
I regularly have root under LVM management (like /dev/myvg/root) and I regularly follow the common ways, e.g. the wiki ways.
After upgrading to sys-kernel/genkernel-4.1.2-r3, the root mount operation failed. After masking that version and downgrading to sys-kernel/genkernel-4.0.10 everything went fine.
I'm sorry if I can't produce the exact error message and the genkernel.log of the wrong operation. You know that reproduce the error is quite annoying. I can produce more details if the maintainer will ask.
I've found similar bugs around the latest versions, but none was the same. I'm sorry again if this is a duplicate.

Regards,
HUjuice

Reproducible: Always

Steps to Reproduce:
1. Have root as logical volume under LVM management
2. Upgrade from from genkernel-4.0.1 to genkernel-4.1.2-r3
3. Run 'genkernel --lvm initramfs' as usually
4. Reboot
Actual Results:  
Error message about the impossibility to mount root.

Expected Results:  
Mount root during the startup of the system.
Comment 1 Jonas Stein gentoo-dev 2020-11-29 17:55:13 UTC
I have no idea how genkernel maintainers can help here without the logs and precise information what is failing.
Ideally you try to collect more information with the help of our support channels.

[1] https://www.gentoo.org/get-involved/irc-channels/
[2] https://forums.gentoo.org/
[3] https://www.gentoo.org/get-involved/mailing-lists/all-lists.html
[4] https://www.gentoo.org/support/
Comment 2 Thomas Deutschmann (RETIRED) gentoo-dev 2020-11-30 01:04:01 UTC
When mount fails, enter debug shell (genkernel will prompt you to do that).
Run `gksosreport` and attach this report to this bug.
Comment 3 Sergio 2020-12-01 11:13:09 UTC
Created attachment 675997 [details]
genkernel log and info for both working and not working versions

logfile of the 'genkernel initramfs' task, genkernel.conf and emerge --info output for two versions:
genkernel-4.0.10 working
genkernel-4.1.2-r3 NOT WORKING
Comment 4 Sergio 2020-12-01 11:19:29 UTC
The error message obtained with the initramfs generated by genkernel-4.1.2-r3 is the quite common "Kernel panic - not syncing: VFS: unable to mount root fs on unknown-block(0,0)", the same, for what I remember, that I have if I don't activate --lvm (or the corrisponding configuration option).

Please, try to not be so rude: I needed one hour to re-emerge, recompile, restart and blablabla and, since there are so many initramfs related bug, I wanted to be sure that my issue is not a duplicate. I gave my availability to do the "homework", if necessary.
And no, I don't have any shell, it just restarts automatically.

Regards,
HUjuice
Comment 5 Thomas Deutschmann (RETIRED) gentoo-dev 2020-12-01 13:39:09 UTC
You attached genkernel.log, the log file showing the creation of kernel image and initramfs. But I am asking you to create a 'gksosreport' from the running genkernel initramfs, i.e. please boot the genkernel kernel & initramfs. When it will fail, enter rescue shell (genkernel will prompt you to do that). In that rescue shell run the "gksosreport" command. It will create a report showing system details, errors... and will tell you where this report was saved.

If you are unable to get the system booted from rescue shell, you have to copy that report to another location (i.e. USB stick) to preserve it.

If you have a LAN connection to that box, using genkernel's SSH feature might help you with this.


Please also try booting with 'gk.hw.use-modules_load=yes' added to your kernel command-line to see if this will make a difference.
Comment 6 Sergio 2020-12-02 18:10:34 UTC
I don't have a busybox rescue shell. I didn't need it before and I don't know why I don't have it now. Adding init=/bin/bb doesn't help.
After the error message, I simply have an announcement of a restart after 10 seconds, then the restart.

For what I understand, the initramfs should provide it and I do have BUSYBOX="yes" in config. I have it.
I am available to correct something if necessary.

sys-apps/busybox is emerged with the static USE flag.
sys-fs/lvm2 is emerged WITHOUT the static USE flag.
Comment 7 Thomas Deutschmann (RETIRED) gentoo-dev 2020-12-02 18:48:01 UTC
No, you are misunderstanding something. When genkernel's initramfs will fail to boot it will offer you to enter rescue shell. I have the suspicion that the problem might be, that for some reason, you don't boot genkernel's initramfs. Please check your boot loader...

Please see the following screencast: https://dev.gentoo.org/~whissi/stuff/genkernel-rescue-shell.webm

At the beginning I am changing kernel's command-line so that genkernel will be unable to determine root device. That's exactly what is happening at 00:30. As you can see, genkernel is now prompting me to either specify new/correct root device or enter rescue shell by typing "shell" command...
Comment 8 Sergio 2020-12-03 09:35:46 UTC
Created attachment 676393 [details]
failure screen
Comment 9 Sergio 2020-12-03 09:36:46 UTC
It's not my case, I'm not misunderstanding. I don't have any offer to enter in the rescue shell.
Comment 10 Thomas Deutschmann (RETIRED) gentoo-dev 2020-12-03 13:25:21 UTC
This seems to proof my point: For some reason, your system does not boot the kernel or at least the initramfs created by genkernel. Please check your boot (loader) config.
Comment 11 Sergio 2020-12-03 16:55:42 UTC
Only with that version? What's the magic for what 4.0.10 and the previous versions worked for years?
I use syslinux/extlinux there, with dolvm rootfstype=ext
Comment 12 Ben Kohler gentoo-dev 2020-12-03 16:59:36 UTC
Someone on another support venue earlier was building initramfs separately from the kernel and newer genkernel was defaulting to xz compression while the kernel lacked support for it.

I see in your genkernel log it is using XZ compression on the new initramfs, can you verify in your kernel .config that you have support?

Of course, this is only one possible way it could be going wrong.  I agree with Thomas that it is clearly NOT loading the initramfs at all, at this point.
Comment 13 Sergio 2020-12-06 10:34:44 UTC
I update my @world today in my laptop. Same versions, same configurations, same issue.
Comment 14 Mateusz Matejuk 2021-01-24 11:29:11 UTC
yup, its the same for me
Comment 15 Mateusz Matejuk 2021-01-24 11:50:16 UTC
i checked different compression formats, ranging from bzip up to xz, and it makes no difference for me at all. Also yes, downgrading makes genkernel work properly again.

the weirdest thing is that while the system is trying to boot, it can't find root filesystem initially, but after just pressing enter it works (i.e. finds and recognizes the mount point), however I made sure that it is using UUID not /mnt/sdxx.
This is definitively not a bootloader problem. I tested it under various grub2 versions and nothing helps. 
Also, I am sure it's not an issue of lvm since I find the idea abhorrent and I am usually doing fine without it. These are genkernel flags I am using:

> " --b2sum --btrfs --luks --no-lvm --keymap --color --busybox --no-zfs --no-splash"
Comment 16 Thomas Deutschmann (RETIRED) gentoo-dev 2021-01-24 15:48:55 UTC
(In reply to Mateusz Matejuk from comment #14)
> yup, its the same for me

I am a little bit confused. This bug is about LVM. But you showed you run genkernel with '--no-lvm'. So how can you experience the same bug?

Please file an own bug report if you believe this is a genkernel bug. For genkernel support requests, please use appropriate channels (IRC, forums, mailing list).
Comment 17 Sergio 2021-07-24 11:34:20 UTC
Same problem again with genkernel-4.2.3
As resume:
4.0.10 works
4.1.2-r3 didn't work
4.2.1 worked
4.2.3 don't work

Please, don't remove 4.0.10 from portage.
Comment 18 Thomas Deutschmann (RETIRED) gentoo-dev 2021-07-24 16:21:55 UTC
Best thing you can do is to provide the requested information. At the moment it is not clear what you are doing or how to reproduce the issue so we have to assume this is a local issue which is maybe caused by wrong usage (for example, if you are using genkernel only for initramfs generation, it's crucial to pass --kernel-config to genkernel call or generated initramfs might not be compatible with your manually built kernel).