Forums

Skip to content

Advanced search
  • Quick links
    • Unanswered topics
    • Active topics
    • Search
  • FAQ
  • Login
  • Register
  • Board index Assistance Installing Gentoo
  • Search

[SOLVED] Boot stuck on EFI stub

Having problems with the Gentoo Handbook? If you're still working your way through it, or just need some info before you start your install, this is the place. All other questions go elsewhere.
Post Reply
Advanced search
7 posts • Page 1 of 1
Author
Message
nomad
n00b
n00b
Posts: 11
Joined: Mon Feb 12, 2018 9:55 am
Location: Pardubice, Czechia

[SOLVED] Boot stuck on EFI stub

  • Quote

Post by nomad » Wed Nov 19, 2025 12:02 pm

Hello,
once again I'm stuck trying to boot Gentoo on a new machine. I can get to grub boot menu just fine and I can start a Ubuntu side-installed instance from there without any problem. But when I try to boot Gentoo, the following appears:

Code: Select all

Loading Linux 6.12.41-gentoo
Loading initial ramdisk...
and on the right side of the screen, the following:

Code: Select all

EFI stub: Loaded initrd from LINUX_EFI_INITRD_MEDIA_GUID device path
EFI stub: Measured initrd data into PCR 9
and hangs forever.

I've found and followed numerous solved threads, consulting similar symptoms, mainly focusing on FB support. Although I've tried a lot of hints from these, the problem persists.

I'm chrooting to Gentoo from a Ubuntu instance on the same machine, which i also used for the initial installation. Building the kernel prints no errors, its config is available at https://0x0.st/Kfk9.txt .
The lspci output is available at https://bpa.st/4SMQ .
The grub default config is available at https://bpa.st/NHRA and the generated config file at https://bpa.st/2BAA .
The blkid output is available at https://bpa.st/3BZA and the lsblk output at https://bpa.st/6PLA .
It may be important to note that all these outputs were generated while chrooted from Ubuntu. The kernel is built from sources and installed by installkernel.

Both the /efi partition and the root partition resides on nvme0n1 (nvme0n1p3 resp. nvme0n1p1). Other drives are not important right now. A thing to note is, that althought I tried to follow the Handbook as always, I ended up having different locations of efi files (/efi) and kernel files (/boot on the root partition) - unlike other machines, where everything is grouped together. However, as I can see entries of both Gentoo and Ubuntu in Grub menu and I can - well, at least, attempt to - boot them, I guess it is alright. I've tried to change the CMDLINE in nconfig to the root partition instead of EFI partition, but with no luck. Please see the layout if this is of question: https://bpa.st/53VA , https://bpa.st/IPMQ .

Another thing to note is that I have two GPUs, the Intel integrated one and an nVidia. I didn't make any attempt to support the nVidia so far, sticking up to Intel i915 with intel-ucode and linux-firmware for a running instance before tweaking the rest. Please see my USE variable: https://bpa.st/IX2Q . Even after setting */* VIDEO_CARDS: intel nouveau virgl in package.use, The VIDEO_CARDS variable keeps all the values. Did change it to */* VIDEO_CARDS: -* intel nouveau virgl for a while, which worked, changed it then back while trying to solve the boot problem. It would be nice to know where the other options origin, if it is the expected behaviour and what (if) should I do about it. However for now, I guess it is not the cause of hanging on initram loading.

I would appreciate some help with the boot problem, thanks in advance!
Last edited by nomad on Wed Nov 19, 2025 9:45 pm, edited 1 time in total.
Top
pingtoo
Advocate
Advocate
User avatar
Posts: 2180
Joined: Fri Sep 10, 2021 8:37 pm
Location: Richmond Hill, Canada

  • Quote

Post by pingtoo » Wed Nov 19, 2025 3:19 pm

nomad,

This issue is purely Linux kernel. It is not Grub issue. It is not EFI firmware issue.

I don't know much about kernel graphic configuration, so I will leave that to other experts.

FYI,

Code: Select all

Loading Linux 6.12.41-gentoo
Loading initial ramdisk...
It is Grub output, which mean gurb successfully started by EFI and grub is able to use primary graphical card.

Code: Select all

EFI stub: Loaded initrd from LINUX_EFI_INITRD_MEDIA_GUID device path
EFI stub: Measured initrd data into PCR 9
It is from Linux kernel. And more specifically it is from the kernel stub code. which mean grub successfully load your kernel and at kernel early boot stage the kernel was able to use primary graphical card. However at later initial stage kernel switch graphic driver that lead to blank screen.
Top
pietinger
Administrator
Administrator
Posts: 6620
Joined: Tue Oct 17, 2006 5:11 pm
Location: Bavaria

Re: Boot stuck on EFI stub

  • Quote

Post by pietinger » Wed Nov 19, 2025 4:17 pm

nomad wrote:[1] I've found and followed numerous solved threads, consulting similar symptoms, mainly focusing on FB support. Although I've tried a lot of hints from these, the problem persists.
[...]
[2] Another thing to note is that I have two GPUs, the Intel integrated one and an nVidia. I didn't make any attempt to support the nVidia so far, sticking up to Intel i915 with intel-ucode and linux-firmware for a running instance before tweaking the rest.

[3] Please see my USE variable: [...]
Hello nomad,

1) I confirm that the most common cause is a lack of support for framebuffer and console (we have a lot of threads about this in our forum). But you have enabled these:
https://wiki.gentoo.org/wiki/User:Pieti ... nd_Console

2) This raises the question of WHERE you have connected your monitor: to the motherboard or to the nvidia card?

3) We don't need this because the problem lies either with the kernel or with initramfs. That's why I have these questions:
a) HOW did you create the initramfs (dracut or ugrd; which options?)?
b) Is your root partition encrypted? Because if not, then you don't actually need initramfs because you have configured everything the kernel needs to access the root partition statically (as built-in):

Code: Select all

CONFIG_NVME_CORE=y
CONFIG_SATA_AHCI=y
CONFIG_EXT4_FS=y
CONFIG_XFS_FS=y
CONFIG_BTRFS_FS=y
If your problem is indeed the kernel configuration, I can only see two (three; but usually only one of them is used; enabling both does not hurt) missing options:

Code: Select all

# CONFIG_MFD_INTEL_LPSS_ACPI is not set
# CONFIG_MFD_INTEL_LPSS_PCI is not set

# CONFIG_IRQ_REMAP is not set
However, it could also be due to this option:

Code: Select all

CONFIG_CMDLINE="root=PARTUUID=c86f2b48-e3e5-40d2-9cd0-aa83fefe9cdf ro"
Please read this: https://wiki.gentoo.org/wiki/User:Pieti ... %3DUUID%3D

Note: This is my introductory article on manual kernel configuration:
https://wiki.gentoo.org/wiki/User:Pieti ... figuration

I can say more if you boot Ubuntu again and give us the output of "dmesg".

BTW: You have enabled i2c but no PINCTRL ... If you have a notebook with an i2c touchpad, this will not work; see this chapter:
https://wiki.gentoo.org/wiki/User:Pieti ... C_Touchpad
https://wiki.gentoo.org/wiki/User:Pietinger --> https://wiki.gentoo.org/wiki/User:Pieti ... _at_Gentoo
Top
nomad
n00b
n00b
Posts: 11
Joined: Mon Feb 12, 2018 9:55 am
Location: Pardubice, Czechia

Re: Boot stuck on EFI stub

  • Quote

Post by nomad » Wed Nov 19, 2025 9:44 pm

Wow, you guys really made my day better!

pingtoo:
Thank you for your explanation, I'm pretty sure this is not the last time I'm solving such an issue. It's always good to know the background.

pietinger:
Thank you for all those suggestions. In the end, it was enough to enable the kernel options you mentioned. Now I can boot Gentoo, running into a whole new paradise of errors.

I'll write the requested info down anyway, to describe the situation. For the sake of someone else running into this thread, looking for help. And also because I would like to elaborate on some of the suggestions.
pietinger wrote:2) This raises the question of WHERE you have connected your monitor: to the motherboard or to the nvidia card?
In fact, my monitors are connected to a dock (Dell WD19), which in turn is connected by USB-C to the computer. It is just a temporary setup, the computer is meant to be used remotely. Provided I did literally nothing to get the dock working in the first place, I had felt a bit dumb that I hadn't tried to connect one by DP or HDMI directly. Now even more surprisingly, it actually booted with the dock setup without any further effort.
pietinger wrote:a) HOW did you create the initramfs (dracut or ugrd; which options?)?
As I was following the Handbook, I came to belief that nowadays, using installkernel with dracut generates the initramfs automagically. I really hope it does, as I'm probably going to need it again. I tried to build an initram manually when I was installing Gentoo on a laptop like a year ago, without any luck, and it drove me to the very edge of sanity. Therefore, I believe I use dracut with no options here. And it works. It has to.
pietinger wrote:b) Is your root partition encrypted? Because if not, then you don't actually need initramfs because you have configured everything the kernel needs to access the root partition statically (as built-in):
No, it isn't encrypted. This particular computer is going to reside on a safe place. It is meant to become a home server. By the way, great to know that - I would be really happy to avoid the whole initram thing. However, I'm afraid I can vaguely recall some occassions, where it was necessary to compile some kernel features as modules and load them early. And I'm nearly sure I'm going to run into such situation with these GPUs, for example.
pietinger wrote:If your problem is indeed the kernel configuration, I can only see two (three; but usually only one of them is used; enabling both does not hurt) missing options:

Code: Select all

# CONFIG_MFD_INTEL_LPSS_ACPI is not set
# CONFIG_MFD_INTEL_LPSS_PCI is not set
# CONFIG_IRQ_REMAP is not set
Again, thank you. I remember I was even going through these LPSS options previously, but in the end I picked another pair, according to the thread I was following at the time. Pity.
pietinger wrote:However, it could also be due to this option:

Code: Select all

CONFIG_CMDLINE="root=PARTUUID=c86f2b48-e3e5-40d2-9cd0-aa83fefe9cdf ro"
Please read this: https://wiki.gentoo.org/wiki/User:Pieti ... %3DUUID%3D
Note: This is my introductory article on manual kernel configuration:
https://wiki.gentoo.org/wiki/User:Pieti ... figuration
I've read it and bookmarked it. Seems really tricky. Another thing that's definitely good to know.
pietinger wrote:I can say more if you boot Ubuntu again and give us the output of "dmesg".
Of course: https://bpa.st/CYRQ . There are more errors than I'd expect. However, the Ubuntu instance is just temporary, anyway.
pietinger wrote:BTW: You have enabled i2c but no PINCTRL ... If you have a notebook with an i2c touchpad, this will not work; see this chapter:
https://wiki.gentoo.org/wiki/User:Pieti ... C_Touchpad
No, it's a desktop without a touchpad. I can recall setting i2c while following yet another thread - I guess I was so desperate at the time I was just enabling everything I saw. Thank you for pointing it out, I will disable the option.
Top
pietinger
Administrator
Administrator
Posts: 6620
Joined: Tue Oct 17, 2006 5:11 pm
Location: Bavaria

Re: Boot stuck on EFI stub

  • Quote

Post by pietinger » Wed Nov 19, 2025 10:47 pm

nomad wrote:Wow, you guys really made my day better!
[...]
Thank you for all those suggestions. In the end, it was enough to enable the kernel options you mentioned. Now I can boot Gentoo, running into a whole new paradise of errors.
Happy to hear that! :D ... but I am confused ... does it boot? ... and which errors you have now?


Internal note (Because the pastebin service deletes data after a certain period of time. In case we still need this data.):

Code: Select all

[    0.000000] Linux version 6.17.0-6-generic (buildd@lcy02-amd64-018) (x86_64-linux-gnu-gcc (Ubuntu 15.2.0-4ubuntu4) 15.2.0, GNU ld (GNU Binutils for Ubuntu) 2.45) #6-Ubuntu SMP PREEMPT_DYNAMIC Tue Oct  7 13:34:17 UTC 2025 (Ubuntu 6.17.0-6.6-generic 6.17.1)

[    0.000000] DMI: Micro-Star International Co., Ltd. MS-7E32/MAG Z890 TOMAHAWK WIFI (MS-7E32), BIOS 1.A40 09/26/2024

[    0.000000] secureboot: Secure boot disabled

[    0.187268] smpboot: CPU0: Intel(R) Core(TM) Ultra 9 285K (family: 0x6, model: 0xc6, stepping: 0x2)

[    0.196096] smpboot: Total of 24 processors activated (176947.20 BogoMIPS)
[    0.197181] Memory: 63708456K/66448944K available (22760K kernel code, 4660K rwdata, 16316K rodata, 5140K init, 4328K bss, 2702816K reserved, 0K cma-reserved)

[    0.452993] microcode: Current revision: 0x00000119
[    0.452993] microcode: Updated early from: 0x00000110

[    2.871884] input: DELL Alienware 510K as /devices/pci0000:80/0000:80:14.0/usb3/3-2/3-2.1/3-2.1.4/3-2.1.4:1.1/0003:04F2:1830.0002/input/input3

[    3.895629] EXT4-fs (nvme0n1p2): mounted filesystem 79f92139-796e-4573-bfbc-f20af92b0816 ro with ordered data mode. Quota mode: none.

[    4.487141] intel_vpu 0000:00:0b.0: enabling device (0000 -> 0002)

[    4.802479] i915 0000:00:02.0: [drm] Found meteorlake (device ID 7d67) integrated display version 14.00 stepping D0
[    4.803569] i915 0000:00:02.0: [drm] VT-d active for gfx access

[    5.121344] snd_hda_codec_alc882 hdaudioC2D0: ALC1220: picked fixup  for PCI SSID 1462:0000
  
[   11.030742] r8169 0000:81:00.0 enp129s0: Link is Up - 1Gbps/Full - flow control rx/tx
Hmm ... Z890, Ultra 9 285K, 64 GB RAM, ALC1220, 2 x 4 TB + a M2 SSD ... It seems to be a pretty nice machine. :lol:
https://wiki.gentoo.org/wiki/User:Pietinger --> https://wiki.gentoo.org/wiki/User:Pieti ... _at_Gentoo
Top
nomad
n00b
n00b
Posts: 11
Joined: Mon Feb 12, 2018 9:55 am
Location: Pardubice, Czechia

Re: Boot stuck on EFI stub

  • Quote

Post by nomad » Thu Nov 20, 2025 9:32 am

pietinger wrote:Happy to hear that! :D ... but I am confused ... does it boot? ... and which errors you have now?
Yes, it does, sorry about the confusion. I can now log in directly to the Gentoo instance and solve the rest. The errors are obviously caused by my misconfigurations or omissions - different interface names, lack of networking support etc.
pietinger wrote:Hmm ... Z890, Ultra 9 285K, 64 GB RAM, ALC1220, 2 x 4 TB + a M2 SSD ... It seems to be a pretty nice machine. :lol:
Hopefully. I got somehow tired of buying yet another laptops, so I'd like to make this machine a first step of a central storage and a computation node for our household. Of course, at some point in future, I'm going to seperate these two roles to at least two rack machines - however, for now, one desktop box instead of a rack means it is less probable to get accidentally ran over by mi wife's car. :D

When I get everything to work under Gentoo, the first part is to share the sata raid. That should be easy, at least I did it previously.
The next step will be virtualization. I'd like to build an API, which will start VMs on demand, and connect to these from laptops. I have multiple Dell XPS's at home, which I used previously. Each of them is all suitable to run spice or RDP. My idea is to tweak VMs to near-physical performance (did some experiments previously, but only locally) and have other machines boot a minimal image, start a VM by API and connect to the VM. To turn them into terminals/thin-clients, basically.
Also, as we sometimes play games as well, I'd like to have some VMs as nodes for Steam remote play. I will probably need more GPUs for this, but one A1000 seemed like a good start to me. At least it should be good enough for my work, meanwhile. And of course, I have some older GeForces in other boxes, which are going to be taken apart.
And finally, I'd like to develop an app for iOS and Android and another API, so we could backup photos from our phones to the raid storage over the internet on vacation. (Yes, had a personal tragedy with some dugong footage sunk in the sea. Not a minority loss for a guy from central Europe.)

Yet, I still have a job and a family, too, so it's gonna take a lot of time. At least I can start now, and that's great. :D
Top
pietinger
Administrator
Administrator
Posts: 6620
Joined: Tue Oct 17, 2006 5:11 pm
Location: Bavaria

Re: Boot stuck on EFI stub

  • Quote

Post by pietinger » Thu Nov 20, 2025 12:11 pm

nomad wrote:Yet, I still have a job and a family, too, so it's gonna take a lot of time. At least I can start now, and that's great. :D
I am always pleased when someone not only talks about the “bare” problem, but also tells a little about their plans and situation. Thanks for that! I myself only have much more time than before (=for the forum) because I am already retired. I wish you much success and fun with Gentoo! 8)
nomad wrote:Again, thank you.
You are very Welcome! :D
https://wiki.gentoo.org/wiki/User:Pietinger --> https://wiki.gentoo.org/wiki/User:Pieti ... _at_Gentoo
Top
Post Reply

7 posts • Page 1 of 1

Return to “Installing Gentoo”

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