Mkinitcpio replacement with Dracut

[arch-dev-public] Mkinitcpio replacement with Dracut

Giancarlo Razzolini grazzolini at
Tue May 21 02:41:40 UTC 2019

Hi All, Recently, Dave announced his intention to step down as mkinitcpio maintainer. I have been handling a few things on it, made some small changes to our mkinitcpio-busybox [0], closed a few old bugs, while also made sure some of the other bug reports are still valid. [1] I have been testing a few patches to mkinitcpio for a while to fix those bugs, but last week Dave and I had a discussion on IRC and we agreed that we could spend better time contributing somewhere else than keeping working with mkinitcpio. Currently mkinitcpio cannot boot from NFS properly, mknitcpio-nfs-utils [2] uses very old code. Even though ipconfig works, it has several drawbacks compared to using more modern tools. Not to mention that we have two use cases for mkinitcpio, which are base and systemd enabled initramfs. Even though we use by default our base enabled initramfs, we have to support systemd related issues and we have to keep developing our systemd hooks. I have been looking into dracut for some time now, I copied some stuff from them on a few of my own scripts and they also have an actual test suite, that we currently can’t use on Arch, but I plan to change that. With this in mind, I have packaged dracut for Arch and put it on Extra [3]. I have been using a dracut initramfs for a while now to boot my encrypted partition. Surprisingly, I only had to create a small patch to one of the dm-crypt module scripts [4] In this initial phase I want to ask as many of you to test this as a replacement to mkinitcpio in your setups, as many as possible, and in as many scenarios as possible. We will probably have to keep both packages on our repos for a long time, but once we are confident it’s a good fit, we can replace mkinitcpio on our iso and base, so new installs get dracut by default. Please, drop in your comments as well. Regards, Giancarlo Razzolini [0] [1] [2] [3] [4] -------------- next part -------------- A non-text attachment was scrubbed… Name: not available Type: application/pgp-signature Size: 870 bytes Desc: not available URL:

More information about the arch-dev-public mailing list


Good to know, we need to keep an eye on this and may do testing it too.

1 Like

I did not know about this matter, today I find out and I see that it is the future, since mkinitcpio will not be maintained soon.
From the little I have read it is faster at startups. We will see in time. although there are already people who use it and say that Dracut is doing very well.

pitty i liked mkinitcpio :slight_smile: hope the arch-wiki get fast ready, installed it, what the hell should supposted to do :slight_smile:

I haven’t really gotten Dracut yet, but with the relevant documentation it shouldn’t be that difficult.

I don’t know what i’m doing but i installed it just for fun. Then i ran dracut /boot/initramfs-linux.img --force as root. Then i uninstalled mkinitcpio. It boots…

1 Like

:clap::clap::clap:It makes me happy to read this, it’s just about playing and seeing what happens :wink: and if it started well much better !!!

I’m not sure what happens with a new kernel? I think you have to add hooks to have it automatically update the initramfs. Otherwise a manual update. dracut? Ya I’m just playing too because I don’t care if I destroy it. I’ll just reinstall if I have to. Probably will anyway playing with iso stuff.

Apparently a pacman hook is used → →see thread # 2

installed a new kernel ? like lts zen …?

hooks seems to interesting but if you use linux-zen you have to change or add some stuf to it… hopefully comes also a nice script that makes things less complicated… :slight_smile:

I will try installing the zen kernel and see tonight without the hook just to see what happens. :wink:

I do not have internet since October 24, only from time to time I connect by smartphone from “Wifi access port”, which is very expensive with the data expense.
For this reason I can’t do anything in the forum.

Are you in an under serviced area where it’s impossible to get?

Yes, there is little cell phone signal, but taking 15 MB of download I can do things on the computer. According to the company I hired, they would have solved the problem of the internet cable, by the 14th of the current month.
I hope so. I was already all June and July, most of the month of August without landline and without internet. Here the cables are stolen … unfortunately …

seighs …i will miss mkinitcpio :slight_smile: was making that hook by that side but the script is not that flexible doesnt look the /usr/lib/modules so it doesnt not find the version… and second grub does not recognize…hmmm

Could I help you with the script? If so, can you share some info about it?

was trying this , but in mean time the /usr/lib/modules/ the folder names is the version you must need but what it wrote is not so correct, mean time had tried something but have to see, it also didnt picked up by grub…will see what it is have to read gentoo wiki carefully :lol and fedora…i gues fedora does with dracut keeping the last two kernel version alive is interesting too can be replicated but as everything what new have to learn :stuck_out_tongue: but mayby i have to setup he config properly thats not what i have done, try for now hit or mis… :slight_smile:

Was getting the linux version the problem?
It seems that

linuxver="$(pacman -Q linux | awk '{print $2}' | sed 's/.arch/-arch/')-ARCH"

gets the version right, but is this the format that is needed?
I could change the above into slightly more correct

linuxver="$(pacman -Q linux | awk '{print $2}' | sed 's/\.arch/-arch/')-ARCH"   # added one '\'

but the previous line should work too.

will not over, the dracut implentation is not ready yet even we can sudo pacman -S dracut, stil nit ready i gues :stuck_out_tongue: will do some experiment in vbox further will make a rest i gues… need to red actually…