Fedora 39 Looks To Ship mkosi-initrd As A Modern Alternative To Dracut

Written by Michael Larabel in Fedora on 8 May 2023 at 06:22 AM EDT. 17 Comments
FEDORA
One of the recent change proposals for the in-development Fedora 39 is to ship systemd's mkosi-initrd as a modern and superior alternative to Dracut for constructing initrds.

Initially mkosi-initrd is set to be treated as an alternative builder to Dracot for building initrds, but its initial scope may be limited. The intent with mkosi-initrd is to clean-up the complicated and inefficient build process currently used by Dracut. The feature proposal explains:
mkosi-initrd is an alternative builder for initrds. It will be packaged in Fedora, so that users can use it to build initrds locally. A kernel-install plugin will be provided to build the initrd when a kernel package is installed. As a stretch goal, initrds will be build in koji and delivered via rpm packages. As a further stretch goal, pre-built initrds will be used in Unified Kernel Images that can be delivered via rpm packages.
...
The process by which we create initrds is complicated and inefficient. Initrds contain duplicate functionality and require a lot of maintainer effort. The aim of this proposal is to introduce a vastly simplified mechanism of initrd creation and simplified initrd contents.

The mkosi-initrd project is a set of config files for mkosi. mkosi is a program to build operating system images from system packages. An initrd is built by invoking mkosi with the config provided by mkosi-initrd.

Instead of building initrds by scraping the file system and figuring out dependencies again, existing packages and normal package installation via dnf/rpm is used to populate the initrd. This also means that the package manager is responsible for satisfying dependencies. At runtime, systemd is responsible for setting up the execution environment and invoking programs.

Currently, initrds built in this way are bigger than initrds built by dracut. They also have limited functionality: many common types of systems work just fine, but more exotic configurations are not supported.
...
The goal of this change is to provide an alternative mechanism. If the feedback is positive, we may consider using initrds built with mkosi-initrd as default in certain scenarios. There are no plans to remove dracut in the foreseeable future. This means that for any case not supported or not working well, dracut remains a natural fallback. In this way this change is similar to Changes/Unified_Kernel_Support_Phase_1, as it provides a preview of a new technology as an alternative to the current established approach.

More details on this proposed change for Fedora 39 in the fall can be found via the Fedora Project Wiki.

mkosi-initrd


The mkosi-initrd is hosted under the systemd project and can be found on GitHub.
Related News
About The Author
Michael Larabel

Michael Larabel is the principal author of Phoronix.com and founded the site in 2004 with a focus on enriching the Linux hardware experience. Michael has written more than 20,000 articles covering the state of Linux hardware support, Linux performance, graphics drivers, and other topics. Michael is also the lead developer of the Phoronix Test Suite, Phoromatic, and OpenBenchmarking.org automated benchmarking software. He can be followed via Twitter, LinkedIn, or contacted via MichaelLarabel.com.

Popular News This Week