Why switch to dracut?
dracut creates an initial image used by the kernel for preloading the block device modules (such as IDE, SCSI or RAID) which are needed to access the root filesystem. Arch and Liya use mkinitcpio by default.
Quoting from Dracut's website.
Unlike existing initramfs's, dracut attempts at having as little as possible hard-coded into the initramfs as possible.
The initramfs has (basically) one purpose in life -- getting the rootfs mounted so that we can transition to the real rootfs.
This is all driven off of device availability.
Therefore, instead of scripts hard-coded to do various things, dracut's initramfs depends on udev to create symbolic links to device nodes and then when the rootfs's device node appears, it is mounted and root is switched to it.
This helps to keep the time required in the initramfs as little as possible so that things like a 5 second boot aren't made impossible as a result of the very existence of an initramfs.
Most of the initramfs generation functionality in dracut is provided by a bunch of generator modules that are sourced by the main dracut tool to install specific functionality into the initramfs.
And from tests done by me
INITRAMFS
Startup finished in 2.435s (kernel) + 7.050s (userspace) = 9.485s
graphical.target reached after 7.048s in userspace.
DRACUT
Startup finished in 737ms (kernel) + 3.068s (initrd) + 4.572s (userspace) = 8.378s
graphical.target reached after 4.571s in userspace.
~ a second difference
Why did not Liya adapt it yet?
Many Arch based distributions such as Garuda and EndeavourOS use dracut by default, but for existing arch users, who use initramfs, they might find it a bit confusing, so inorder to maintain backward compatibility and for easy configuration, Liya will continue to use mkinitcpio until Arch Linux switches to dracut.
How do i switch to dracut?
Installing dracut
sudo pacman -Sy dracut
Configuring dracut
sudo nano /etc/dracut.conf.d/liya.conf
Add the following into the conf file
hostonly="yes"
compress="zstd"
add_drivers+=" i915 " {only if you have intel graphics}
Generate dracut
sudo dracut --force /boot/initramfs-<kernel_name>.img
sudo dracut --force /boot/initramfs-<kernel_name>-fallback.img
TPM 2 Support
To make use of systemd 's unlocking of luks2 encrypted volumes using TPM2 through systemd-cryptenroll, install tpm2-tools package and enable the tpm2-tss dracut module.
Conclusion
Though its recommended to switch to dracut, you can keep on using mkinitcpio, mkinitcpio is default and it will be in Liya.
Mkinitcpio is simple to use and configure.
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)