Why Switch to Dracut?
Dracut is preferred for its streamlined approach in creating the initial RAM filesystem (initramfs), optimizing boot times and flexibility compared to mkinitcpio, which Arch and Liya currently default to.
According to Dracut's website, Dracut aims to minimize hard-coding in the initramfs, focusing on dynamically configuring the boot environment based on device availability through udev. This approach reduces boot time, making even a 5-second boot achievable.
Comparison:
From personal tests:
- Initramfs: Startup finished in 9.485s.
- Dracut: Startup finished in 8.378s, nearly a second faster.
Why Hasn't Liya Adapted Dracut Yet?
While Arch-based distributions like Garuda and EndeavourOS have embraced Dracut, Liya maintains compatibility with existing Arch setups using mkinitcpio. This ensures seamless transitions and easy configuration for users familiar with mkinitcpio until Arch Linux fully adopts Dracut.
How to Switch to Dracut:
Installing Dracut:
sudo pacman -Sy dracut
Configuring Dracut:
Edit the configuration file:
sudo nano /etc/dracut.conf.d/liya.conf
Add the following lines:
hostonly="yes"
compress="zstd"
add_drivers+=" i915 " # Add only if using Intel graphics
Generating Dracut:
sudo dracut --force /boot/initramfs-<kernel_name>.img
sudo dracut --force /boot/initramfs-<kernel_name>-fallback.img
TPM 2 Support:
To enable systemd's unlocking of luks2 encrypted volumes using TPM2:
- Install
tpm2-tools
package.
- Enable the
tpm2-tss
Dracut module.
Conclusion:
While Dracut is recommended for improved boot performance and flexibility, Liya continues to support mkinitcpio for ease of use and compatibility with existing setups. Mkinitcpio remains the default choice in Liya until Arch Linux transitions to Dracut.
Copyright And Registered Trademark Notices
"Manjaro" and "Manjaro Linux" are copyright of Manjaro GmbH & Co KG, all rights are reserved with them.
Arch Linux is a copyright of Judd Vinet, Aaron Griffin and Levente Polyák.
The Arch Linux name and logo are recognized trademarks. Some rights reserved.
Linux® is the registered trademark of Linus Torvalds in the U.S. and other countries.
NVIDIA® is the registered trademark of NVIDIA® Corporation, all rights are reserved with them.
Base Projects, Credits and Inspirations
Arch Linux (https://archlinux.org)
Manjaro Linux (https://manjaro.org)
Garuda Linux 🇮🇳 (https://garudalinux.org)
XeroLinux (https://xerolinux.xyz)
The Linux Tube (https://www.youtube.com/@thelinuxtube)
Cinnamon (https://github.com/linuxmint/cinnamon)
The GNU Project (https://gnu.org)
The GNOME Project (https://gnome.org)