Please decouple mkinitcpio

sudo pacman -R mkinitcpio                   
checking dependencies...
error: failed to prepare transaction (could not satisfy dependencies)
:: removing mkinitcpio breaks dependency 'mkinitcpio>=27' required by linux60
:: removing mkinitcpio breaks dependency 'mkinitcpio>=0.12.0-2' required by manjaro-system
:: removing mkinitcpio breaks dependency 'mkinitcpio' required by manjaro-tools-iso-git
:: removing mkinitcpio breaks dependency 'mkinitcpio' required by mkinitcpio-openswap

Since I prefer to use dracut, I hope to decouple the dependencies of these packages.

Are the scripts in these packages hardcoding the mkinitcpio command?

There are mkinitcpio hooks in there. So you could remove manjaro-system and mkinitcpio-openswap i guess, and modify manjaro-tools-iso-git. You’ll have to check content of those packages though, I only looked at manjaro-system and it’s pretty useless. :stuck_out_tongue:

I don’t know why kernel has a direct dependency on mkinitcpio though, unlike arch. When you want to do something custom it’s just easier to do it on arch.

Kernel is not dependent on mkinitcpio. It’s dependent on initramfs which is provided by mkinitcpio and dracut. So to get rid of this warning, you need to install dracut before removing mkinitcpio.

Yes they are. In manjaro at least.

True, on arch.

Perhaps Manjaro team hasn’t figured out (or bothered to figure out) how to patch/adjust dracut to be used with multiple kernels installed.
mkinitcpio is modified and not taken directly from Arch to achieve this.

…no one on the Manjaro Team uses dracut. Therefore, no one ever looked into it.

This is the first I’ve heard of any user attempting to use it.

For now, dracut is not supported by Manjaro. From this point forward, it will no longer be available in the repos due to incompatibility.

After some investigation, the kernel does not explicitly depend on mkinitcpio, but manjaro-system and manjaro-tools-git explicitly depend on mkinitcpio, mkinitcpio-openswap, since I use zram, so it should be removed.

You misunderstood, in fact, dracut can be installed, there are no compatibility issues, the steps to remove mkinitcpio are optional in the guide, just because of mkinitcpio’s pacman hook issue, if you want to use dracut instead of mkinitcpio, it is recommended to remove mkinitcpio.

And I think if the scripts in manjaro-system and manjaro-tools-git are not hard-coded mkinitcpio, then mkinitcpio should be decoupled and packages created using soft dependencies similar to kernels.

And compatibility with dracut is not too difficult, like the dracut-hook package, when using dracut in the command line, specify the generation path of initcpiofs.

Maybe so. I’ve redacted my above statement.

Both mkinitcpio and dracut provide initramfs. However if we changed the dependency to initramfs so either could be installed, during ISO building dracut would automatically be installed instead of mkinitcpio as dracut comes first alphabetically.

EDIT: I stand corrected. See below:

This is indeed an annoying part of the existing PKGBUILD syntax, which does not support explicitly specifying dependent packages in the OR syntax, as well as setting the priority of dependent packages.

But, mkinitcpio is in the Core repo, whille dracut is in Extra, so mkinitcpio would still be chosen first, as it’s the first dependency seen as pacman searches Core → Extra → Community in that order.

We tested this in ARM with some of our kernel packages.


I used it a a year ago but dropped it in favour of mkinitcpio since the latter is able to build systemd-based initramfs’ too. I recall it was a hassle maintaining both tools on the same machine (to me, at least).