Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
[SOLVED] Super early kernel panic
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Kernel & Hardware
View previous topic :: View next topic  
Author Message
arvamircea
Tux's lil' helper
Tux's lil' helper


Joined: 21 May 2022
Posts: 109
Location: Swadlincote

PostPosted: Tue Jan 23, 2024 1:11 am    Post subject: [SOLVED] Super early kernel panic Reply with quote

Hello...
I have issues booting into Gentoo.
You know? You do the same thing 100 times (grub-mkconfig -o /boot/grub/grub.cfg) all goes well, till it doesn't.
When booting I see:
Code:

Loading Linux 6.7.1-gentoo ...
Loading initial ramdisk ...

E
FI stub: Loaded initrd from LINUX_EFI_INITRD_MEDIA_GUID device path
EFI stub: Measured initrd data into PCR 9

When chroot-ed from a LiveUSB and running "grub-mkconfig -o /boot/grub/grub.cfg", I see
Code:

Cannot find list of partitions! (Try mounting /sys.)

Any ideas what it wants from me?


Last edited by arvamircea on Wed Jan 24, 2024 1:17 am; edited 1 time in total
Back to top
View user's profile Send private message
arvamircea
Tux's lil' helper
Tux's lil' helper


Joined: 21 May 2022
Posts: 109
Location: Swadlincote

PostPosted: Tue Jan 23, 2024 3:12 am    Post subject: Reply with quote

Update:
I mounted /sys as well before chroot-ing and got rid of that Grub error. But I still get the kernel panic..
Back to top
View user's profile Send private message
Hu
Administrator
Administrator


Joined: 06 Mar 2007
Posts: 22683

PostPosted: Tue Jan 23, 2024 3:25 am    Post subject: Reply with quote

What kernel panic is this? Your posts neither quote its text nor describe it. There are many ways to misconfigure a system in a way that could cause a panic. Without the error text, there is little we can do to guide you.
Back to top
View user's profile Send private message
arvamircea
Tux's lil' helper
Tux's lil' helper


Joined: 21 May 2022
Posts: 109
Location: Swadlincote

PostPosted: Tue Jan 23, 2024 3:44 am    Post subject: Re: Super early kernel panic Reply with quote

arvamircea wrote:
When booting I see:
Code:

Loading Linux 6.7.1-gentoo ...
Loading initial ramdisk ...

E
FI stub: Loaded initrd from LINUX_EFI_INITRD_MEDIA_GUID device path
EFI stub: Measured initrd data into PCR 9


This is all I see after selecting what to boot into from the Grub menu. Keyboard lights go off and nothing happens no matter how long I wait.
Sorry, I thought it's some sort of kernel panic. At least that's what I've found when googling that output.
Back to top
View user's profile Send private message
NeddySeagoon
Administrator
Administrator


Joined: 05 Jul 2003
Posts: 54578
Location: 56N 3W

PostPosted: Tue Jan 23, 2024 10:39 am    Post subject: Reply with quote

arvamircea,

It looks like you have secure boon or measured boot enabled.

Code:
EFI stub: Loaded initrd from LINUX_EFI_INITRD_MEDIA_GUID device path
EFI stub: Measured initrd data into PCR 9


If that fails, the kernel will never start.

Try turning off secure/measured boot.
_________________
Regards,

NeddySeagoon

Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail.
Back to top
View user's profile Send private message
arvamircea
Tux's lil' helper
Tux's lil' helper


Joined: 21 May 2022
Posts: 109
Location: Swadlincote

PostPosted: Tue Jan 23, 2024 11:21 am    Post subject: Reply with quote

Thank you. I've made some progress with this I think.
Secure boot was off in UEFI but I've also found an option called "Intel(R) Platform Trust Technology" and disabled that. I've also reconfigured the bootloader (grub-mkconfig) for good measure.
Now the message I see on booting is:
Code:

Loading Linux 6.7.1-gentoo ...
Loading initial ramdisk ...

                                                                                                                                    E
FI stub: Loaded initrd from LINUX_EFI_INITRD_MEDIA_GUID device path
Back to top
View user's profile Send private message
pietinger
Moderator
Moderator


Joined: 17 Oct 2006
Posts: 5118
Location: Bavaria

PostPosted: Tue Jan 23, 2024 2:37 pm    Post subject: Reply with quote

I guess you had an update for grub and you have not done a re-installation with grub-install. Please try:

1. Boot with our GentooAdminCD (or MinimalCD) and chroot (*) into your system
2. Do a correct "grub-install --efi-directory=/efi"
3. And then "grub-mkconfig -o /boot/grub/grub.cfg"

*) This is chrooting into your gentoo system when using OLD mountpoint /boot for ESP:
Code:
# mount /dev/sdXY /mnt/gentoo
# cd /mnt/gentoo
# mount -t proc /proc /mnt/gentoo/proc
# mount --rbind /sys /mnt/gentoo/sys
# mount --rbind /dev /mnt/gentoo/dev
# mount --bind /run /mnt/gentoo/run
# chroot /mnt/gentoo /bin/bash
# . /etc/profile
# mount /dev/sdXZ /boot

If you have a new installation according our Handbook: https://wiki.gentoo.org/wiki/Handbook:AMD64/Installation/Base#UEFI_systems you must do as last command instead:
Code:
# mount /dev/sdXZ /efi

(see more here: https://forums.gentoo.org/viewtopic-t-1165115-highlight-.html)
(If you want check your UEFI settings: https://wiki.gentoo.org/wiki/User:Pietinger/Tutorials/Boot_kernel_via_UEFI#Prerequisites_for_an_UEFI_boot )

If this does not help you can get an VERY EARLY output from your kernel with these settings (just watch the kernel settings; or translate my german with google):
https://forums.gentoo.org/viewtopic-p-8759603.html#8759603
_________________
https://wiki.gentoo.org/wiki/User:Pietinger
Back to top
View user's profile Send private message
arvamircea
Tux's lil' helper
Tux's lil' helper


Joined: 21 May 2022
Posts: 109
Location: Swadlincote

PostPosted: Tue Jan 23, 2024 3:52 pm    Post subject: Reply with quote

Code:

grub-install --efi-directory=/efi
grub-install: error: /use/lib/grub/i386-pc/modinfo.sh doesn't exist. Please specify --target or --directory.

:(
Code:

grub-install --target=x86_64-efi --efi-directory=/efi
Installing for x86_64-efi platform.
grub-install: error: failed to get canonical path of '/efi'.

:(
Code:

grub-install --target=x86_64-efi --efi-directory=/efi --removable
Installing for x86_64-efi platform.
grub-install: error: failed to get canonical path of '/efi'.

:(
Code:

grub-install --efi-directory=/boot
grub-install: error: /use/lib/grub/i386-pc/modinfo.sh doesn't exist. Please specify --target or --directory.

:(
Code:

grub-install --target=x86_64-efi --efi-directory=/boot
Installing for x86_64-efi platform.
EFI variables are not supported on this system.
EFI variables are not supported on this system.
grub-install: error: efibootmgr failed to register the boot entry: No such file or directory.

:(
Code:

grub-install --target=x86_64-efi --efi-directory=/boot --removable
Installing for x86_64-efi platform.
Installation finished. No errors reported.

:)
Code:

grub-mkconfig -o /boot/grub/grub.cfg
Generating grub configuration file ...
Found linux image: /boot/vmlinuz-6.7.1-gentoo-r1
Found initrd image: /boot/initramfs-6.7.1-gentoo-r1.img
Found linux image: /boot/vmlinuz-6.7.1-gentoo
Found initrd image: /boot/initramfs-6.7.1-gentoo.img
Found linux image: /boot/vmlinuz-6.7.1-gentoo.old
Found initrd image: /boot/initramfs-6.7.1-gentoo-r1.img.old
Warning: os-prober will be executed to detect other bootable partitions.
Its output will be used to detect bootable binaries on them and create new boot entries.
Found Mac OS X on /dev/sdb3
Adding boot menu entry for UEFI Firmware Settings ...
done


/dev/sdb3 is the Gentoo LiveUSB
>un-mount
>reboot
>Same boot error
8O

I have no idea what's wrong. I've updated the kernel hundreds of times with no issues.
Now my PC is a brick.

P.S. I'm unable to disable "CSM mode"/"Legacy mode", for whatever reason the UEFI keeps turning it back on, very frustrating. But it was always like this I think and I don't have a problem.
Back to top
View user's profile Send private message
GDH-gentoo
Veteran
Veteran


Joined: 20 Jul 2019
Posts: 1703
Location: South America

PostPosted: Tue Jan 23, 2024 5:20 pm    Post subject: Reply with quote

arvamircea wrote:
Code:

grub-install --efi-directory=/efi
grub-install: error: /use/lib/grub/i386-pc/modinfo.sh doesn't exist. Please specify --target or --directory.

:(
[...]
Code:

grub-install --efi-directory=/boot
grub-install: error: /use/lib/grub/i386-pc/modinfo.sh doesn't exist. Please specify --target or --directory.

:(
Code:

grub-install --target=x86_64-efi --efi-directory=/boot
Installing for x86_64-efi platform.
EFI variables are not supported on this system.
EFI variables are not supported on this system.
grub-install: error: efibootmgr failed to register the boot entry: No such file or directory.

:(
[...]
P.S. I'm unable to disable "CSM mode"/"Legacy mode", for whatever reason the UEFI keeps turning it back on, very frustrating.

This all suggests that the computer is booting in BIOS / CSM / Legacy mode, not UEFI mode. Has it always been like this?
_________________
NeddySeagoon wrote:
I'm not a witch, I'm a retired electronics engineer :)
Ionen wrote:
As a packager I just don't want things to get messier with weird build systems and multiple toolchains requirements though :)
Back to top
View user's profile Send private message
arvamircea
Tux's lil' helper
Tux's lil' helper


Joined: 21 May 2022
Posts: 109
Location: Swadlincote

PostPosted: Tue Jan 23, 2024 5:36 pm    Post subject: Reply with quote

Hello, thank you for the reply.
Is hard to tell for sure, but I am 90% sure is always been like this (the computer being in Legacy mode, even tho I manually switche it to UEFI it switchedes itself back to BIOS).
In the past
Code:

grub-install --target=x86_64-efi --efi-directory=/boot --removable
grub-mkconfig -o /boot/grub/grub.cfg

used to do the job.
I have to admit it is possible the UEFI chip broke just now and switched itself to Legacy Mode and does not allow to be switched back.


Last edited by arvamircea on Tue Jan 23, 2024 6:44 pm; edited 1 time in total
Back to top
View user's profile Send private message
arvamircea
Tux's lil' helper
Tux's lil' helper


Joined: 21 May 2022
Posts: 109
Location: Swadlincote

PostPosted: Tue Jan 23, 2024 6:33 pm    Post subject: Reply with quote

If my computer is in Legacy Mode/BIOS, what do I need to do to be able to use it again?
Not gonna lie, I'm getting desperate. A simple kernel update bricked my computer for two days and it does not look like I'm any closer to fixing it. ;--;
Back to top
View user's profile Send private message
sokrovenno
n00b
n00b


Joined: 23 Aug 2023
Posts: 67

PostPosted: Tue Jan 23, 2024 7:56 pm    Post subject: Reply with quote

arvamircea wrote:
If my computer is in Legacy Mode/BIOS, what do I need to do to be able to use it again?

You should look into your BIOS. In my notebook I must press F2 before the grub appears on screen. In your computer may be another Fbutton. Take a look there.
On my BIOS there is three options:
UEFI
CSM or UEFI
CSM
I hope it works.

arvamircea wrote:
Not gonna lie, I'm getting desperate. A simple kernel update bricked my computer for two days and it does not look like I'm any closer to fixing it. ;--;

Always keep an older kernel. If things go wrong you always have an option.
I am too having problems with this new kernel. Having a backup kernel saved me. :D
Back to top
View user's profile Send private message
arvamircea
Tux's lil' helper
Tux's lil' helper


Joined: 21 May 2022
Posts: 109
Location: Swadlincote

PostPosted: Tue Jan 23, 2024 8:19 pm    Post subject: Reply with quote

Thank you. Right now my UEFI is in CSM/BIOS/Legacy Mode, I am unable to change it due to probably a hardware failure on the chip. I am fine with that, Gentoo can be run in BIOS mode no problem.
The issue is, I really really don't want to reinstall Gentoo. Ironically I was just thinking a few days ago "Finally I made the computer look and feel exactly how I want it, imagine if I ever need to reinstall."
I still have my old kernel, that's why I was so flabbergasted at the beginning, I am unable to boot it the old kernel either, I get the same boot message...
Back to top
View user's profile Send private message
GDH-gentoo
Veteran
Veteran


Joined: 20 Jul 2019
Posts: 1703
Location: South America

PostPosted: Tue Jan 23, 2024 10:00 pm    Post subject: Reply with quote

Maybe it's just the rescue medium that booted in BIOS mode as a fallback.

arvamircea wrote:
In the past
Code:
grub-install --target=x86_64-efi --efi-directory=/boot --removable
grub-mkconfig -o /boot/grub/grub.cfg
used to do the job.

Using --removable for a hard disk is usually because the UEFI firmware is bad and doesn't properly support BOOT#### EFI variables. How did you originally determine that you needed this to boot your Gentoo kernels? What hardware is this?

arvamircea wrote:
Code:
grub-mkconfig -o /boot/grub/grub.cfg
Generating grub configuration file ...
...
Found Mac OS X on /dev/sdb3

Mac OS X?

arvamircea wrote:
I still have my old kernel, that's why I was so flabbergasted at the beginning, I am unable to boot it the old kernel either, I get the same boot message...

So, are you saying that kernels that used to boot no longer do so?
_________________
NeddySeagoon wrote:
I'm not a witch, I'm a retired electronics engineer :)
Ionen wrote:
As a packager I just don't want things to get messier with weird build systems and multiple toolchains requirements though :)
Back to top
View user's profile Send private message
arvamircea
Tux's lil' helper
Tux's lil' helper


Joined: 21 May 2022
Posts: 109
Location: Swadlincote

PostPosted: Tue Jan 23, 2024 10:19 pm    Post subject: Reply with quote

GDH-gentoo wrote:

How did you originally determine that you needed this to boot your Gentoo kernels? What hardware is this?

When originally installing Gentoo I've tried all option till I found one that worked. ¯\_(ツ)_/¯
I have an ASRock Fatal1ty Z170 gaming K6 motherboard.

GDH-gentoo wrote:

Mac OS X

Yeah, is just a funny output from os-prober. It detected the Gentoo LiveUSB as Mac OS X. But I don't think is relevant at all.

GDH-gentoo wrote:

So, are you saying that kernels that used to boot no longer do so?

I don't know anymore, I've done so many things I'm confusing myself. Most likely I deleted all original kernels and re-built then.

I found some help in IRC. Apparently is all good, the UEFI/BIOS finds the kernel but gets stuck with the initrd. I build all my files inside /boot with "make install" so the theory right now is that's where the problem lies.
Back to top
View user's profile Send private message
arvamircea
Tux's lil' helper
Tux's lil' helper


Joined: 21 May 2022
Posts: 109
Location: Swadlincote

PostPosted: Wed Jan 24, 2024 1:16 am    Post subject: Reply with quote

[SOLVED]
"genkernel all" managed to make a bootable kernel. Oddly enough I still see that message (EFI stub: Loaded initrd from LINUX_EFI_INITRD_MEDIA_GUID device path) for a split second when booting into the working kernel.

[CONCLUSION]
The old method "make install" must have had some changes and it does not do everything that it used to.

[FOR WHOEVER MAY READ THIS]
The Gentoo community is one of the wonders of the modern world.
If you need help:
1th do whatever is in your power and mental capabilities to search the documentation and the forums for a solution.
2nd look for help, it always blows my mind how selfless and goodhearted the Gentoo community is.
3rd don't be a dick and ignore rule 1, the most beautiful things are the easiest to destroy
Back to top
View user's profile Send private message
sipingal
n00b
n00b


Joined: 12 May 2008
Posts: 63
Location: China

PostPosted: Sun Jun 16, 2024 8:51 pm    Post subject: Reply with quote

arvamircea wrote:

"genkernel all" managed to make a bootable kernel. Oddly enough I still see that message (EFI stub: Loaded initrd from LINUX_EFI_INITRD_MEDIA_GUID device path) for a split second when booting into the working kernel.


This message is due to CONFIG_EFI_HANDOVER_PROTOCOL=y enabled in the current kernel configuration even it's DEPRECATED.


The boot problem was likely caused by the intel early microcode loading(i.e. intel-uc.img) on some hardware.
Back to top
View user's profile Send private message
Ramast
n00b
n00b


Joined: 12 Oct 2023
Posts: 8

PostPosted: Sun Oct 27, 2024 5:09 am    Post subject: Reply with quote

I have had that exact same problem but for different reason.
I'd be sharing it here in case someone landed on this page through search engine like I did.

My laptop didn't support deep sleep and the work around was to override ACPI.
I did it by adding entry to my grub bootload

Code:

GRUB_EARLY_INITRD_LINUX_CUSTOM="acpi_override"


I totally forgot about it and when I updated the BIOS, system no longer boot. removing the ACPI override fixed it[/code]
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Kernel & Hardware All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum