-
Notifications
You must be signed in to change notification settings - Fork 97
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
No Boot with lvm / initramfs #211
Comments
I actually have never used genkernel, so I'm not sure. From a theoretical perspective, there's no reason LTO shouldn't work with an initramfs. But there may be some practical considerations that are at fault. Questions:
|
I do no specific commands to enable LTO with the kernel's generation. Unless this is somehow done by genkernel when invoking GCC 8.2.0, I guess the kernel generated without LTO, although I don't know exactly. Next compile attempt I'll write stdout to a file to submit, not that there is much useful info there, unless there is some better way. I created "genkernel.conf" in /etc/portage/package.cflags with "sys-kernel/genkernel FLAGS-=-flto" and reinstalled genkernel. Is this the correct way to disable LTO for a package? |
In the linked PR (https://github.com/InBetweenNames/gentooLTO/pull/31/files), if you add those exceptions, re-emerge them, and do your genkernel does it work? |
Will do just that and report back :] |
Do you have an argument If the issue is indeed within the kernel, the kernel might have failed before the console loads. You can consider using earlyprintk and see if that gives anything (earlyprintk must be compiled in). I use If even with earlyprintk nothing is printed, the kernel might be very broken, eg. the kernel self-decompression code failed. In that case, yeah, check the architecture. For reference, I have gentooLTO + systemd + gummiboot + dracut-generated initramfs. It boots fine. |
Again, no luck, hang on boot. This time I did the Logfile and it is attached to this comment.
The booting proccess never leaves Grub. Those two lines I got from grub. My grub config does not have quiet set as boot param under GRUB_CMDLINE_LINUX, but then again as I understand it it doesn't matter, since Grub is never left. Just those two frozen messages. I read about dracut before solving LTO and the initramfs issues, but I have always relied on genkernel to do the heavy lifting. |
Grub has already jumped to the kernel entry point. Kernel won't print anything, by default, until the console is loaded; this is why I'm asking if earlyprintk shows anything. Have you tried booting without initramfs? Do you see any kernel messages if booted that way? |
In addition to what @zhuyifei1999 has suggested, could you post your kernel boot command line from Grub as well? |
I'm pretty sure the kernel is just broken beyond believe. I tried earlyprintk with efi and vga param and checked that it is indeed compiled. In get nothing.
As read from the generated grub.cfg: |
Does a precompiled known-working (say, from another distro) kernel work? By work I mean you can some kernel messages after the grub Also, I'm wondering if grub is at fault here, though I can't imagine a reason why it would. |
I had gentoo all well and running before trying the LTO overlay. Also genkernel generated that kernel. I guess I'll try full manual route next. It is definetly related to this overlay or the way my gentoo is set up. Just to be sure, how can I check whether genkernel was emerged without LTO? Just in case the exception didn't get honored... |
AFAICT genkernel isn't a compiled binary, but lots of bash scripts. There isn't some sort of "LTO for bash scripts"... |
That explains the fast emerge time :D
Ohh, I didn't write an exception to that, so I guess the overlay already provided an exception? Except watching the emerge live and seeing -flto, I have no I idea how to check whether a package was LTO'ed afterwards or not... |
Hey. I just had this problem some weeks ago and it kept getting me crazy for a lot of time. I have a T440p, it’s provsbly some vendor issues, I don’t think it’s linked with LTO. You can boot this kernel with ”acpi=off", it’s the only acpi flag that will work, and there will be obviously no acpi, battery management, suspend etc. The other solution is to switch to the latest mainline kernel (4.19.something), the latest beta gentoo sources (or pf-patchset) doesn’t have the issue anymore. Hope this will fix it. (And use dracut it’s more up to date even if the doc is uterly shit). |
In addition to what @aphypnise and @zhuyifei1999 said, @SairesArt , to my knowledge your Now when talking about userspace, there's a few checks you can do to see if your package was emerged with LTO. The easiest one is by just looking at the symbols in a static library that was installed during the emerge of the package. You'll see By the way, are you using |
Hey there,
my kernel as generated by genkernel does not boot and is stuck on booting initramfs.
As far as I understand it LTO does not work with initramfs, or genkernel, but you cannot boot an LVM root file system without initramfs, even with unencrypted /boot.
According to #31 a patch is already applied to remedy this, but apparently it didn't automatically apply the workaround.
How can I check whether my emerge of genkernel honored the workaround?
As I understand it genkernel does not do any LTO stuff and nothing has to be changed there, just with the emerge of genkernel itself...
The text was updated successfully, but these errors were encountered: