Arch’s mkinitcpio Get Boost to v39, Here’s What’s New

mkinitcpio 39 enhances boot speed with uncompressed cpio adjustments, ARM zImage support, a new ACPI hook, and more.

For those coming from the Arch ecosystem, mkinitcpio is a familiar tool. For others, let us clarify that it generates initial ramdisk environments (similar to Dracut or Booster) used during the boot process.

Essentially, it’s a Bash script that creates a compressed file system image that includes everything necessary to support the boot process before the main root filesystem is mounted.

The recent mkinitcpio 39 release brings several important updates and new features to enhance functionality and improve user experience. Here’s what it’s all about.

mkinitcpio 39 Highlights

mkinitcpio 39
mkinitcpio 39

This update highlights the deprecation of global variables for accessing command-line parameters. Previously, scripts (known as hooks) that modify the boot process could use global variables to obtain these parameters.

Moving forward, mkinitcpio encourages developers to use the getarg function instead. What necessitates this change? In short, it is part of a broader effort to modernize the tool and improve its robustness and security.

Moreover, the latest release introduces support for ARM zImage, expanding mkinitcpio’s compatibility with different architectures—a welcome addition for developers working on ARM-based systems. Additionally, mkinitcpio 39 debuts a new hook, “install/acpi_override,” which facilitates ACPI table upgrades and overrides, further extending the tool’s customization capabilities.

Regarding changes to mkinitcpio itself, the placement of compressed files has been adjusted. They are now included in the early, uncompressed cpio instead of the compressed cpio. This modification avoids the inefficiency of double-compressing files, which can enhance boot speed, particularly on systems with less powerful CPUs.

Furthermore, the tool now defaults to decompressing module and firmware files during the boot process, which was previously a manual setting.

Other improvements include changes to file handling commands like add_file and add_dir_early, which enhance the tool’s flexibility and functionality. For example, add_file now supports copying from file descriptors, allowing for more dynamic file operations during the boot process.

mkinitcpio 39 also updates lsinitcpio, a companion tool that lists, analyzes, and extracts from the initramfs images. It now supports new formats and provides more detailed output, which can be crucial for debugging and development.

Continuing with the changes, the packaging of mkinitcpio has also seen refinements, such as the integration of “mkinitcpio-generate-shutdown-ramfs.service” with various system targets to ensure smoother transitions during system power states like rebooting or shutting down.

Lastly, developers have also focused on refining the usability of mkinitcpio with various enhancements and bug fixes. These include improvements to how modules and files are included in the ramdisk, adjustments to default file permissions to enhance security, and more.

Check out the changelog for more details and the complete list of novelties in mkinitcpio 39. 

Bobby Borisov

Bobby Borisov

Bobby, an editor-in-chief at Linuxiac, is a Linux professional with over 20 years of experience. With a strong focus on Linux and open-source software, he has worked as a Senior Linux System Administrator, Software Developer, and DevOps Engineer for small and large multinational companies.

Think You're an Ubuntu Expert? Let's Find Out!

Put your knowledge to the test in our lightning-fast Ubuntu quiz!
Ten questions to challenge yourself to see if you're a Linux legend or just a penguin in the making.

1 / 10

Ubuntu is an ancient African word that means:

2 / 10

Who is the Ubuntu's founder?

3 / 10

What year was the first official Ubuntu release?

4 / 10

What does the Ubuntu logo symbolize?

5 / 10

What package format does Ubuntu use for installing software?

6 / 10

When are Ubuntu's LTS versions released?

7 / 10

What is Unity?

8 / 10

What are Ubuntu versions named after?

9 / 10

What's Ubuntu Core?

10 / 10

Which Ubuntu version is Snap introduced?

The average score is 68%