Forums

Skip to content

Advanced search
  • Quick links
    • Unanswered topics
    • Active topics
    • Search
  • FAQ
  • Login
  • Register
  • Board index Assistance Unsupported Software
  • Search

booting problem(stuck at initramfs stage)

This forum covers all Gentoo-related software not officially supported by Gentoo. Ebuilds/software posted here might harm the health and stability of your system(s), and are not supported by Gentoo developers. Bugs/errors caused by ebuilds from overlays.gentoo.org are covered by this forum, too.
Post Reply
Advanced search
11 posts • Page 1 of 1
Author
Message
rabidbo
n00b
n00b
Posts: 5
Joined: Fri Oct 17, 2025 4:25 pm

booting problem(stuck at initramfs stage)

  • Quote

Post by rabidbo » Mon Oct 20, 2025 4:55 pm

Hello, wizards
I'm using crux, but I hope gentoo wizards can help me, anyway my problem seems to be a general linux problem, so and stuck at booting stage with "EFI stub: Loaded initramfs from command line option"

My setup is lvm inside luks container and efi stub, I've used syslinux loader but the problem is still there: loaded initramfs messaeg and freeze

Now I don't know what to looking for or debug, so thinking of making my own initramfs

lsblk -f

Code: Select all

sda                                                                                                          
|-sda1           vfat        FAT32                     7C11-5609                                   2G     2% /boot
`-sda2           crypto_LUKS 2                         e5bbbfd4-3eca-462a-bc1c-8aa3ead946f0                  
  `-crypt        LVM2_member LVM2 001                  IU3tjC-H1bS-YHFu-XCYq-npVe-bdw4-zE5rh7                
    |-crypt-root f2fs        1.16                      12d8b3ec-2f7d-43a8-b87d-3ef818e5a190     29.5G     2% /
    |-crypt-var  f2fs        1.16                      5f5805ea-f6a9-45b2-a292-d759f8a17d84      3.9G     3% /var
    |-crypt-usr  f2fs        1.16                      cbff82e5-34d6-4632-971e-efd48e60f96c     45.6G     9% /usr
    |-crypt-opt  f2fs        1.16                      bade6991-d123-43f2-9ac8-3cea60e4d8d4      9.8G     2% /opt
    |-crypt-swap swap        1                         8acfb87a-f96f-47ef-8558-e5497197f1c3                  
    `-crypt-home f2fs        1.16                      c66607b0-75e5-4fe0-9b0d-35039d547cc0    117.6G     1% /home
For building initramfs I've used dracut(There are no other tools)

dracut.conf

add_dracutmodules+=" base resume crypt lvm "
filesystem+=" f2fs "
compress="gzip"


!!!! In addition cmd option like debug rd.debug break seem to doesn't work and I don't know where should I find logs of booting kernel or initramfs.

lsinitrd -v /boot/syslinux/initramfs-gen-6.12.23.img :
https://pastebin.com/ESJLvpRF

kernel conf:
https://pastebin.com/9XWdYQD3

I have intel 620 uhd graphics if it may help, not amd like in posts below

Some similar issues, but I didn't got anything from
https://forums.gentoo.org/viewtopic-t-1162843.html
https://forums.gentoo.org/viewtopic-p-8697683.html

Thanks in advance.
Top
pietinger
Administrator
Administrator
Posts: 6630
Joined: Tue Oct 17, 2006 5:11 pm
Location: Bavaria

  • Quote

Post by pietinger » Mon Oct 20, 2025 5:47 pm

Moved from Kernel & Hardware to Unsupported Software.
https://wiki.gentoo.org/wiki/User:Pietinger --> New at Gentoo
Top
pietinger
Administrator
Administrator
Posts: 6630
Joined: Tue Oct 17, 2006 5:11 pm
Location: Bavaria

  • Quote

Post by pietinger » Mon Oct 20, 2025 5:51 pm

I dont know which Intel machine you have ... but if it is a modern one, then you miss the most important options in your kernel .config:

Code: Select all

# CONFIG_X86_X2APIC is not set
# CONFIG_X86_INTEL_LPSS is not set
(see also in this thread: https://forums.gentoo.org/viewtopic-t-1174380.html )

I would enable also:

Code: Select all

# Check with "lspci -nnk" if you have it:
# CONFIG_VMD is not set
# i2c needs PINCTRL
# CONFIG_PINCTRL is not set
# To be on a safe side:
# CONFIG_FB_VESA is not set
# Maybe you need it
# CONFIG_INTEL_IDMA64 is not set
# Strongly recommended
# CONFIG_INTEL_IOMMU_SVM is not set
# CONFIG_INTEL_IOMMU_DEFAULT_ON is not set
# CONFIG_IRQ_REMAP is not set
(See also in this wiki article: https://wiki.gentoo.org/wiki/User:Pieti ... rsion_6.12 )
https://wiki.gentoo.org/wiki/User:Pietinger --> New at Gentoo
Top
zen_desu
Guru
Guru
Posts: 501
Joined: Fri Oct 25, 2024 3:14 pm
Location: your area

Re: booting problem(stuck at initramfs stage)

  • Quote

Post by zen_desu » Mon Oct 20, 2025 6:47 pm

rabidbo wrote: For building initramfs I've used dracut(There are no other tools)
there is ugrd :P (should support your setup with no config as well)

I'm guessing this is a kernel config issue though, so the initramfs system in particular isn't a huge factor.

pietinger's suggestions are a good place to start. Personally, I try to use dist-kernel (gentoo-kernel and gentoo-kernel-bin) whenever possible because they tend to work with less required user config.
µgRD dev
Wiki writer
Top
NeddySeagoon
Administrator
Administrator
User avatar
Posts: 56094
Joined: Sat Jul 05, 2003 9:37 am
Location: 56N 3W

  • Quote

Post by NeddySeagoon » Mon Oct 20, 2025 7:19 pm

rabidbo,

Welcome to the Gentoo forums.
Unsupported Software does not mean that you will not get support here. It's a warning to gentoo users that the solutions here may not work for them.

You have I915=y in your kernel. Install linux-firmware if you don't have it and change that option to be a loadable module.
With missing firmware many DRM GPU drivers don't work at all but with built in, the kernel will switch to the (broken) built in driver before the EFI_FB prints anything to the console.
This change is not a fix, just an attempt to get more data for debugging.

Oh, you don't need a tool to build the initramfs for you.
The kernel comes with a tool to assemble the initrd if you tell it what to do.
The hard bit of that is writing the init script.
Regards,

NeddySeagoon

Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail.
Top
pietinger
Administrator
Administrator
Posts: 6630
Joined: Tue Oct 17, 2006 5:11 pm
Location: Bavaria

  • Quote

Post by pietinger » Mon Oct 20, 2025 9:21 pm

rabidbo wrote:[...] I'm using crux
-> https://en.wikipedia.org/wiki/CRUX

<==>
zen_desu wrote:there is ugrd [...]
NeddySeagoon wrote:Oh, you don't need a tool to build the initramfs for you.
The kernel comes with a tool to assemble the initrd if you tell it what to do.
Maybe difficult to install in a ports system. :P


rabidbo,

why not using the best distribution? ... 8O ... with Gentoo you can do everything ... 8) ... and our kernels are always up to date and not hopelessly outdated:

LTS 6.12.53 (instead 6.12.23) and of course 6.17.4 :P
https://wiki.gentoo.org/wiki/User:Pietinger --> New at Gentoo
Top
yaogen
n00b
n00b
Posts: 5
Joined: Thu Apr 07, 2022 5:56 pm

  • Quote

Post by yaogen » Tue Oct 21, 2025 5:57 pm

Got your private message @rabidbo requesting how I solved this ..

It was some years ago .. totally I forgot this post https://forums.gentoo.org/viewtopic-p-8697683.html :)

I created my small build script for updating the kernel, here's the relevant excerpts...

Code: Select all

cd /usr/src/linux
make && make modules_install install
emerge --oneshot sys-fs/zfs-kmod # if you're using ZFS kmod, of course
genkernel initramfs --zfs --compress-initramfs --microcode-initramfs --kernel-config=/usr/src/linux/.config
I don't use LVM.

FWIW, "EFI stub: Loaded initramfs from command line option", is not an error message. It shows it's loaded the initramfs and continue booting. Have you checked that the GPU initialized properly? Directly after this point the graphics should initialize and often set a new screen resolution.
Top
rabidbo
n00b
n00b
Posts: 5
Joined: Fri Oct 17, 2025 4:25 pm

  • Quote

Post by rabidbo » Wed Oct 22, 2025 8:32 pm

pietinger wrote:I dont know which Intel machine you have ... but if it is a modern one, then you miss the most important options in your kernel .config:

Code: Select all

# CONFIG_X86_X2APIC is not set
# CONFIG_X86_INTEL_LPSS is not set
(see also in this thread: https://forums.gentoo.org/viewtopic-t-1174380.html )
ok, I've enabled these options

and I did this too:
NeddySeagoon wrote: You have I915=y in your kernel. Install linux-firmware if you don't have it and change that option to be a loadable module.
With missing firmware many DRM GPU drivers don't work at all but with built in, the kernel will switch to the (broken) built in driver before the EFI_FB prints anything to the console.
This change is not a fix, just an attempt to get more data for debugging.
So now kernel boots!!!! Thank you all! but... dracut log shows infinite cycle: with

Code: Select all

udevadm settle --timeout=0
sleep 0.5
Before this I've got to decrypt my root partition
But there's no idea what to do next, can you help?
NeddySeagoon wrote: Oh, you don't need a tool to build the initramfs for you.
The kernel comes with a tool to assemble the initrd if you tell it what to do.
The hard bit of that is writing the init script.
Is this like in this article?
https://wiki.gentoo.org/wiki/Custom_Initramfs

but, what exactly tool comes with kernel to assemble initrd?

So, I definitely want do try make my own init script
Top
zen_desu
Guru
Guru
Posts: 501
Joined: Fri Oct 25, 2024 3:14 pm
Location: your area

  • Quote

Post by zen_desu » Thu Oct 23, 2025 12:46 am

rabidbo wrote:
pietinger wrote:I dont know which Intel machine you have ... but if it is a modern one, then you miss the most important options in your kernel .config:

Code: Select all

# CONFIG_X86_X2APIC is not set
# CONFIG_X86_INTEL_LPSS is not set
(see also in this thread: https://forums.gentoo.org/viewtopic-t-1174380.html )
ok, I've enabled these options

and I did this too:
NeddySeagoon wrote: You have I915=y in your kernel. Install linux-firmware if you don't have it and change that option to be a loadable module.
With missing firmware many DRM GPU drivers don't work at all but with built in, the kernel will switch to the (broken) built in driver before the EFI_FB prints anything to the console.
This change is not a fix, just an attempt to get more data for debugging.
So now kernel boots!!!! Thank you all! but... dracut log shows infinite cycle: with

Code: Select all

udevadm settle --timeout=0
sleep 0.5
Before this I've got to decrypt my root partition
But there's no idea what to do next, can you help?
NeddySeagoon wrote: Oh, you don't need a tool to build the initramfs for you.
The kernel comes with a tool to assemble the initrd if you tell it what to do.
The hard bit of that is writing the init script.
Is this like in this article?
https://wiki.gentoo.org/wiki/Custom_Initramfs

but, what exactly tool comes with kernel to assemble initrd?

So, I definitely want do try make my own init script
The kernel comes with this tool to "assemble" the initramfs contents from a dir into a cpio which is embedded into the kernel (it's up to you to make it) https://github.com/torvalds/linux/blob/ ... nit_cpio.c

I think you can also just manually pack it using the `cpio` utility, or can use `pycpio --recursive /initramfsdir --relative /initramfsdir -o initramfs.cpio` (pycpio is the backend for ugrd and also has a cmdline util)

the main thing to consider when making it is that you have libraries for the binaries you're including as well as necessary kmods. ugrd does all of this for you and is designed specifically to make an image that a user can then edit and maintain themselves.
µgRD dev
Wiki writer
Top
pietinger
Administrator
Administrator
Posts: 6630
Joined: Tue Oct 17, 2006 5:11 pm
Location: Bavaria

  • Quote

Post by pietinger » Thu Oct 23, 2025 12:53 am

rabidbo wrote:[...] But there's no idea what to do next, can you help? [1]

but, what exactly tool comes with kernel to assemble initrd? [2]

So, I definitely want do try make my own init script [3]
1) I am unsure because I dont know CRUX ... so, maybe we can give you only very general recommendations
2) The Linux Kernel can build only an embedded initramfs (with own tools in /usr/src) ... if you want an external initramfs as CPIO archive (== all bootCD have and also our Gentoo distribution kernel) you need external tools (e.g. "cpio" command)
3) Maybe start here: https://wiki.gentoo.org/wiki/User:Pieti ... s_Overview

I suggest (for the beginning) to configure all kernel modules your kernel needs to access the root partition as built-in (and not as <M>odule). Then there is no need "to insmod" these modules in your init. Maybe you only need some commands for decrypting your root partition.

Gentoo has two tools for an automatic initramfs generation: dracut and ugrd. As far as I had read from CRUX it uses also dracut. Maybe it is easier for you to go this way?
https://wiki.gentoo.org/wiki/User:Pietinger --> New at Gentoo
Top
NeddySeagoon
Administrator
Administrator
User avatar
Posts: 56094
Joined: Sat Jul 05, 2003 9:37 am
Location: 56N 3W

  • Quote

Post by NeddySeagoon » Thu Oct 23, 2025 11:29 am

rabidbo,

https://wiki.gentoo.org/wiki/Initramfs_-_make_your_own is the page I had in mind.

Before you get 'stuck in' you need to understand what you are trying to achieve. See PC Boot Process
Regards,

NeddySeagoon

Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail.
Top
Post Reply

11 posts • Page 1 of 1

Return to “Unsupported Software”

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