Dracut (generating initramfs)

Dear EndeavourOS team,

At first I would like to thank you all for the tremendous work you have been doing and moving forward the Linux community. It is very exciting!

So, my question is related to Dracut. For the sake of understanding how it works, I tried manual installing of Arch Linux specifying Dracut as an initramfs and systemd-boot as a bootloader. When it comes to run “# dracut --hostonly --no-hostonly-cmdline /boot/initramfs-linux.img” to generate an initramfs - nothing would happen even though i am appending --kver to the command line.

Therefore, I cannot boot the system because of no initramfs has been generated. I suppose the solution should be very easy, but I has failed to fing it out.

I would be grateful if you could give me a hint.

Hello Antony,

how did you install Arch?
Did you use this installation guide: https://wiki.archlinux.org/title/installation_guide?

And which ISO did you use?


I’m always following archwiki when installing Arch and so did I in that case, but I’ve never chosen dracut as an initramfs generator. Mkinitcpio would generate inintramfs automatically (including fallback) and everything go on as intended. Dracut needs running manual command to generate it, so I tried doing it in accordance with archwiki, but it wouldn’t work. When chrooted I ran “dracut --hostonly --no-hostonly-cmdline /boot/initramfs-linux.img” as written above. The latest available ISO was used.

In that case you should have an initramfs as Arch is using mkinitcpio by default and I don’t think you can opt it out during the installation process.
From the Arch installation guide:

3.6 Initramfs

Creating a new initramfs is usually not required, because mkinitcpio was run on installation of the kernel package with pacstrap.

For LVM, system encryption or RAID, modify mkinitcpio.conf(5) and recreate the initramfs image:

# mkinitcpio -P

I think if you want to switch to dracut with a pure arch you have to switch after the installation.

1 Like

You probably didn’t get me right. I meant a fresh install with dracut, when “dracut” was appended to pacstrap command. In that case mkinitcpio never gets installed, so there are no initramfs generated due to dracut being installed.

Ah okay, I see. And your dracut command didn’t produce any errors but also didn’t create an initramfs in /boot/?

Did you try it with --force?

1 Like

Silly question, but… how did you check for the expected image? (ls /boot/?)

Have you done any configuration at all for dracut?
What is in:



Is it possible there is a setting that requires a non-existing module/program? (compression?).

Disclaimer: I have zero experience with dracut. I prefer to learn from others’ mistakes :rofl: , and, of course RTFM and Archwiki. :crown:

I happened to make a mistake when typing a command. It should have been as follows:

dracut --hostonly --no-hostonly-cmdline –kver 6.1.12-zen1-1-zen /boot/initramfs-linux-zen.img

I need have appended the current kernel version installed.

Thank you for your answers!

1 Like

Yep, I checked it with ls /boot., but as I wrote above I just mistyped.

1 Like

Overcautious?.. :smile:
--kver is only supposed for non-running kernels.

To generate an initramfs for the running kernel:

# dracut --hostonly --no-hostonly-cmdline /boot/initramfs-linux.img

This is how I learn! :wink:

Sure, the kernel version I appended to –kver was not running.

1 Like

This topic was automatically closed 2 days after the last reply. New replies are no longer allowed.