Forums

Skip to content

Advanced search
  • Quick links
    • Unanswered topics
    • Active topics
    • Search
  • FAQ
  • Login
  • Register
  • Board index Assistance Kernel & Hardware
  • Search

[SOLVED] Super early kernel panic

Kernel not recognizing your hardware? Problems with power management or PCMCIA? What hardware is compatible with Gentoo? See here. (Only for kernels supported by Gentoo.)
Post Reply
Advanced search
18 posts • Page 1 of 1
Author
Message
arvamircea
Tux's lil' helper
Tux's lil' helper
User avatar
Posts: 109
Joined: Sat May 21, 2022 10:09 am
Location: Swadlincote
Contact:
Contact arvamircea
Website

[SOLVED] Super early kernel panic

  • Quote

Post by arvamircea » Tue Jan 23, 2024 1:11 am

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: Select all

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: Select all

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.
Top
arvamircea
Tux's lil' helper
Tux's lil' helper
User avatar
Posts: 109
Joined: Sat May 21, 2022 10:09 am
Location: Swadlincote
Contact:
Contact arvamircea
Website

  • Quote

Post by arvamircea » Tue Jan 23, 2024 3:12 am

Update:
I mounted /sys as well before chroot-ing and got rid of that Grub error. But I still get the kernel panic..
Top
Hu
Administrator
Administrator
Posts: 24385
Joined: Tue Mar 06, 2007 5:38 am

  • Quote

Post by Hu » Tue Jan 23, 2024 3:25 am

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.
Top
arvamircea
Tux's lil' helper
Tux's lil' helper
User avatar
Posts: 109
Joined: Sat May 21, 2022 10:09 am
Location: Swadlincote
Contact:
Contact arvamircea
Website

Re: Super early kernel panic

  • Quote

Post by arvamircea » Tue Jan 23, 2024 3:44 am

arvamircea wrote:When booting I see:

Code: Select all

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.
Top
NeddySeagoon
Administrator
Administrator
User avatar
Posts: 56077
Joined: Sat Jul 05, 2003 9:37 am
Location: 56N 3W

  • Quote

Post by NeddySeagoon » Tue Jan 23, 2024 10:39 am

arvamircea,

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

Code: Select all

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.
Top
arvamircea
Tux's lil' helper
Tux's lil' helper
User avatar
Posts: 109
Joined: Sat May 21, 2022 10:09 am
Location: Swadlincote
Contact:
Contact arvamircea
Website

  • Quote

Post by arvamircea » Tue Jan 23, 2024 11:21 am

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: Select all

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

                                                                                                                                    E
FI stub: Loaded initrd from LINUX_EFI_INITRD_MEDIA_GUID device path
Top
pietinger
Moderator
Moderator
Posts: 6617
Joined: Tue Oct 17, 2006 5:11 pm
Location: Bavaria

  • Quote

Post by pietinger » Tue Jan 23, 2024 2:37 pm

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: Select all

# 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:A ... FI_systems you must do as last command instead:

Code: Select all

# mount /dev/sdXZ /efi
(see more here: viewtopic-t-1165115-highlight-.html)
(If you want check your UEFI settings: https://wiki.gentoo.org/wiki/User:Pieti ... _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):
viewtopic-p-8759603.html#8759603
https://wiki.gentoo.org/wiki/User:Pietinger --> https://wiki.gentoo.org/wiki/User:Pieti ... _at_Gentoo
Top
arvamircea
Tux's lil' helper
Tux's lil' helper
User avatar
Posts: 109
Joined: Sat May 21, 2022 10:09 am
Location: Swadlincote
Contact:
Contact arvamircea
Website

  • Quote

Post by arvamircea » Tue Jan 23, 2024 3:52 pm

Code: Select all

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

Code: Select all

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: Select all

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: Select all

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

Code: Select all

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: Select all

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

Code: Select all

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.
Top
GDH-gentoo
Advocate
Advocate
User avatar
Posts: 2111
Joined: Sat Jul 20, 2019 7:02 pm
Location: South America

  • Quote

Post by GDH-gentoo » Tue Jan 23, 2024 5:20 pm

arvamircea wrote:

Code: Select all

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

Code: Select all

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

Code: Select all

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?
Ionen wrote:As a packager I just don't want things to get messier with weird build systems and multiple toolchains requirements though :)
Top
arvamircea
Tux's lil' helper
Tux's lil' helper
User avatar
Posts: 109
Joined: Sat May 21, 2022 10:09 am
Location: Swadlincote
Contact:
Contact arvamircea
Website

  • Quote

Post by arvamircea » Tue Jan 23, 2024 5:36 pm

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: Select all

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.
Top
arvamircea
Tux's lil' helper
Tux's lil' helper
User avatar
Posts: 109
Joined: Sat May 21, 2022 10:09 am
Location: Swadlincote
Contact:
Contact arvamircea
Website

  • Quote

Post by arvamircea » Tue Jan 23, 2024 6:33 pm

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. ;--;
Top
sokrovenno
Tux's lil' helper
Tux's lil' helper
User avatar
Posts: 76
Joined: Wed Aug 23, 2023 12:32 pm

  • Quote

Post by sokrovenno » Tue Jan 23, 2024 7:56 pm

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
Top
arvamircea
Tux's lil' helper
Tux's lil' helper
User avatar
Posts: 109
Joined: Sat May 21, 2022 10:09 am
Location: Swadlincote
Contact:
Contact arvamircea
Website

  • Quote

Post by arvamircea » Tue Jan 23, 2024 8:19 pm

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...
Top
GDH-gentoo
Advocate
Advocate
User avatar
Posts: 2111
Joined: Sat Jul 20, 2019 7:02 pm
Location: South America

  • Quote

Post by GDH-gentoo » Tue Jan 23, 2024 10:00 pm

Maybe it's just the rescue medium that booted in BIOS mode as a fallback.
arvamircea wrote:In the past

Code: Select all

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: Select all

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?
Ionen wrote:As a packager I just don't want things to get messier with weird build systems and multiple toolchains requirements though :)
Top
arvamircea
Tux's lil' helper
Tux's lil' helper
User avatar
Posts: 109
Joined: Sat May 21, 2022 10:09 am
Location: Swadlincote
Contact:
Contact arvamircea
Website

  • Quote

Post by arvamircea » Tue Jan 23, 2024 10:19 pm

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.
Top
arvamircea
Tux's lil' helper
Tux's lil' helper
User avatar
Posts: 109
Joined: Sat May 21, 2022 10:09 am
Location: Swadlincote
Contact:
Contact arvamircea
Website

  • Quote

Post by arvamircea » Wed Jan 24, 2024 1:16 am

[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
Top
sipingal
n00b
n00b
User avatar
Posts: 63
Joined: Mon May 12, 2008 11:36 am
Location: China

  • Quote

Post by sipingal » Sun Jun 16, 2024 8:51 pm

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.
Top
Ramast
n00b
n00b
Posts: 11
Joined: Thu Oct 12, 2023 3:08 am

  • Quote

Post by Ramast » Sun Oct 27, 2024 5:09 am

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: Select all

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]
Top
Post Reply

18 posts • Page 1 of 1

Return to “Kernel & Hardware”

Jump to
  • Assistance
  • ↳   News & Announcements
  • ↳   Frequently Asked Questions
  • ↳   Installing Gentoo
  • ↳   Multimedia
  • ↳   Desktop Environments
  • ↳   Networking & Security
  • ↳   Kernel & Hardware
  • ↳   Portage & Programming
  • ↳   Gamers & Players
  • ↳   Other Things Gentoo
  • ↳   Unsupported Software
  • Discussion & Documentation
  • ↳   Documentation, Tips & Tricks
  • ↳   Gentoo Chat
  • ↳   Gentoo Forums Feedback
  • ↳   Duplicate Threads
  • International Gentoo Users
  • ↳   中文 (Chinese)
  • ↳   Dutch
  • ↳   Finnish
  • ↳   French
  • ↳   Deutsches Forum (German)
  • ↳   Diskussionsforum
  • ↳   Deutsche Dokumentation
  • ↳   Greek
  • ↳   Forum italiano (Italian)
  • ↳   Forum di discussione italiano
  • ↳   Risorse italiane (documentazione e tools)
  • ↳   Polskie forum (Polish)
  • ↳   Instalacja i sprzęt
  • ↳   Polish OTW
  • ↳   Portuguese
  • ↳   Documentação, Ferramentas e Dicas
  • ↳   Russian
  • ↳   Scandinavian
  • ↳   Spanish
  • ↳   Other Languages
  • Architectures & Platforms
  • ↳   Gentoo on ARM
  • ↳   Gentoo on PPC
  • ↳   Gentoo on Sparc
  • ↳   Gentoo on Alternative Architectures
  • ↳   Gentoo on AMD64
  • ↳   Gentoo for Mac OS X (Portage for Mac OS X)
  • Board index
  • All times are UTC
  • Delete cookies

© 2001–2026 Gentoo Foundation, Inc.

Powered by phpBB® Forum Software © phpBB Limited

Privacy Policy

 

 

magic