Mkinitcpio update and changes may need some manual intervention

Morten Linderud wrote there:

mkinitcpio hook migration and early microcode

With the release of mkinitcpio v38, several hooks previously provided by Arch packages have been moved to the mkinitcpio upstream project. The hooks are: systemd, udev, encrypt, sd-encrypt, lvm2 and mdadm_udev.

To ensure no breakage of users’ setup occurs, temporary conflicts have been introduced into the respective packages to prevent installing packages that are no longer compatible.

The following packages needs to be upgraded together:

  • mkinitcpio 38-3
  • systemd 255.4-2
  • lvm2 2.03.23-3
  • mdadm 4.3-2
  • cryptsetup 2.7.0-3

Please note that the mkinitcpio flag --microcode, and the microcode option in the preset files, has been deprecated in favour of a new microcode hook. This also allows you to drop the microcode initrd lines from your boot configuration as they are now packed together with the main initramfs image.

So if you are still using mkinitcpio (running older installs before Cassini) or you switched to it from our default dracut, you may need to make sure to install/update the mentioned packages all together. and you may need to check hooks used.

This only applies if you are using mkinitcpio, if you are using default dracut nothing to do for you.


This is good, I guess, for those multi-boot situations where the Grub from other distributions won’t create the correct microcode initrd line for Arch.

That’s the first time i’ve actually appreciated dracut :rofl:


I just did update the system with pacman -Syu, can I ask how to check hooks or what would be the problem not doing anything?

I think I’m needing a fresh install anyways :smiling_face_with_tear:

1 Like
[ricklinux@plasma-kde ~]$ pacman -Qi mkinitcpio
error: package 'mkinitcpio' was not found
[ricklinux@plasma-kde ~]$ 


$ pacman -Q mkinitcpio
mkinitcpio 38-4

All good. :wink:

1 Like

What? You don’t use dracut? :wink:

No, this is my install from year 2019 … :wink:


My system uses dracut and I do not have mkinitcpio installed. Are both programs doing the same job and was replaced by dracut?

Good to know, I’m using Dracut too, hopefully I don’t have to deal with this, it’s been installed like 2 weeks ago

Correct. We switched to dracut a while back.

Yes, nothing to do for you.



I just edit this post to add an extra step that needs to be done in case someone just stops reading here and not the whole thread.

This is from a post further down in the thread :arrow_right: here

So this is what needed to be done in may case:

  1. edit /etc/mkinitcpio.conf and add microcode to HOOKS line:

    HOOKS=(systemd autodetect microcode modconf kms keyboard keymap consolefont block filesystems fsck)

  2. edit preset files for my kernels in /etc/mkinitcpio.d and comment out (or delete) the following line:


  3. regenerate initramfs:

    sudo mkinitcpio -P

Compare the line that begins with HOOKS in following two files:


For my part, I just needed to add microcode in the HOOKS line of my mkinitcpio.conf as is shown below:

HOOKS=(systemd autodetect microcode modconf keyboard keymap consolefont block filesystems resume fsck)

and then rebuild the initramfs:

sudo mkinitcpio -P

for the microcode to be build into the initramfs.

Edit: correcting typo


There’s a typo here, missing the “t” in mkinitcpio.


Thanks, fixed it.

1 Like

To be clear, I just need to make sure that the HOOKS in the mkinitcpio.conf file are the same as that in the mkinitcpio.conf.pacnew file, and then rebuild the initramfs?

In my case I just added microcode as shown in my post above.

Here below you could see the relevant part of those files and lines.
The left one is my “old” file. The right one the .pacnew file.

I see that there is a new kms (kernel mode setting) in the HOOKS line in the .pacnew file but I didn’t care for that. I may look into it further later on. If you want you could have a look in ArchWiki: mkinitcpio and Kernel Mode Setting.

After making the change(s), then yes, rebuild the initramfs.

how big is your initramfs? :wink:

Ah … you spotted



Screenshot from 2024-03-04 23-44-29


COMPRESSION=“dog” :rofl: