Forums

Skip to content

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

dracut fails to generate initrd

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
5 posts • Page 1 of 1
Author
Message
pablo_supertux
Advocate
Advocate
User avatar
Posts: 2976
Joined: Sun Jan 25, 2004 1:58 pm
Location: Somewhere between reality and Middle-Earth and in Freiburg (Germany)

dracut fails to generate initrd

  • Quote

Post by pablo_supertux » Sun Dec 04, 2022 9:19 pm

Hi

after my world update, I compiled the new gentoo-sources-5.15.80 as always and wanted to generate the initrd file with dracut. I always do it like this:

Code: Select all

dracut -i /lib/firmware/nvidia /lib/firmware/nvidia -i /lib/firmware/i915 /lib/firmware/i915 --kver <version> --force
that usually works very well, but now I get this error:

Code: Select all

# dracut -i /lib/firmware/nvidia /lib/firmware/nvidia -i /lib/firmware/i915 /lib/firmware/i915 --kver 5.15.80-gentoo --force
dracut: Executing: /usr/bin/dracut -i /lib/firmware/nvidia /lib/firmware/nvidia -i /lib/firmware/i915 /lib/firmware/i915 --kver 5.15.80-gentoo --force
dracut: Can't write to /boot/efi/c7c70f062effe5e005eb418852699b9b/5.15.80-gentoo: Directory /boot/efi/c7c70f062effe5e005eb418852699b9b/5.15.80-gentoo does not exist or is not accessible.
Why is it trying to write stuff on /boot/efi? My /boot/efi is mounted with ro, I've always mounted it read-only. It seems to me, that dracut is trying to use /boot/efi as temporal directory instead of /tmp. Currently sys-kernel/dracut-057-r2 is installed. Even if I pass the --no-uefi or --tmpdir /tmp dracut keep wanting to write on the /boot/efi. What is going on?
A! Elbereth Gilthoniel!
silivren penna míriel
o menel aglar elenath,
Gilthoniel, A! Elbereth!
Top
pablo_supertux
Advocate
Advocate
User avatar
Posts: 2976
Joined: Sun Jan 25, 2004 1:58 pm
Location: Somewhere between reality and Middle-Earth and in Freiburg (Germany)

  • Quote

Post by pablo_supertux » Sun Dec 04, 2022 9:25 pm

I ended up umounting /boot/efi, dracut was able to work.

I checked whether dracut wrote something in /boot/efi but it's empty. So my guess that dracut is using /boot/efi as some kind of temporal directory is correct. But why didn't the --tmpdir work? (dracut --help shows that the default value of --tmpdir is /var/tmp).

I'm confused :?
A! Elbereth Gilthoniel!
silivren penna míriel
o menel aglar elenath,
Gilthoniel, A! Elbereth!
Top
g10h4ck
n00b
n00b
Posts: 3
Joined: Thu Aug 31, 2023 6:32 pm

  • Quote

Post by g10h4ck » Thu Aug 31, 2023 6:34 pm

Got same identical problem, the explained workaround worked, but I am confused too
Top
g10h4ck
n00b
n00b
Posts: 3
Joined: Thu Aug 31, 2023 6:32 pm

  • Quote

Post by g10h4ck » Mon Sep 04, 2023 10:25 am

UPDATE

As per dracut manual it is normal it probes for a few directories like /efi

Code: Select all

       Create an initramfs <image> for the kernel with the version
       <kernel version>. If <kernel version> is omitted, then the
       version of the actual running kernel is used. If <image> is
       omitted or empty, depending on bootloader specification, the
       default location can be
       /efi/<machine-id>/<kernel-version>/initrd,
       /boot/<machine-id>/<kernel-version>/initrd,
       /boot/efi/<machine-id>/<kernel-version>/initrd,
       /lib/modules/<kernel-version>/initrd or
       /boot/initramfs-<kernel-version>.img
Probably because it detects my firmware boots via UEFI it end up attempting writing there and thus failing. In my case I finally managed to work around it without fiddling with mount anymore by specifying the image path on dracut command line.

Code: Select all

dracut --force /boot/initramfs-6.1.46-gentoo.img --kver 6.1.46-gentoo
force option was needed because the image was already existing


P.S. This topic seems to be in the wrong section of the forum, could OP move in the proper one?
Top
pietinger
Administrator
Administrator
Posts: 6640
Joined: Tue Oct 17, 2006 5:11 pm
Location: Bavaria

  • Quote

Post by pietinger » Mon Sep 04, 2023 10:59 am

Moved from Portage & Programming to Kernel & Hardware.
Top
Post Reply

5 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