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.

  • d3Xt3r@lemmy.nzOP
    link
    fedilink
    English
    arrow-up
    0
    ·
    8 months ago

    So basically:

    1. Update your system, don’t reboot yet
    2. mkinitcpio.conf --> make sure you have microcode after the autodetect in the HOOKS line
    3. /etc/mkinitcpio.d/<kernel>.preset --> remove the line ALL_microcode=(/boot/*-ucode.img)
    4. systemd-boot users: arch.conf --> remove or comment out the initrd /amd-ucode.img (or intel-ucode.img) line
    5. Run sudo mkinitcpio -p <kernel> to generate your new initrd, and then reboot

    Optional: run grep microcode /proc/cpuinfo before and after the reboot to verify that your microcode version hasn’t changed after the reboot - which means that the new microcode loading method is working correctly.

    On a tangential note, the above is a perfect example of why I don’t recommend Arch (and so-called “easy” derivatives like EndeavourOS) for newbies (ie people who don’t RTFM / keep up with Arch news / inspect their .pacnew files etc). Feel free to link this post in your future internet arguments. :)

    • promitheas@iusearchlinux.fyi
      link
      fedilink
      arrow-up
      0
      ·
      8 months ago

      Could you please elaborate on the full path for the arch.conf file? I looked at /usr/share/systemd/bootctl/arch.conf and there was no initrd /amd-ucode.img (or intel-ucode.img) line, instead all I had was initrd /initramfs-linux.img

      Furthermore, for step 3 I didnt have any entry starting with ALL_microcode=

      I have yet to do step 5 fyi. Thank you

      • d3Xt3r@lemmy.nzOP
        link
        fedilink
        arrow-up
        0
        ·
        8 months ago

        Could you please elaborate on the full path for the arch.conf file?

        Could be called something else, but it should be in /boot/loader/entries/. But if you don’t have the initrd /amd-ucode.img line then that’s fine, you don’t need to do anything. Same with step 3, if you don’t have the ALL_microcode line you can ignore that step.

    • TootSweet@lemmy.world
      link
      fedilink
      English
      arrow-up
      0
      ·
      8 months ago

      On a tangential note, the above is a perfect example of why I don’t recommend Arch

      😡

      …for newbies

      Oh, right. Carry on.

    • smileyhead@discuss.tchncs.de
      link
      fedilink
      arrow-up
      0
      ·
      8 months ago

      Other reason is that a newbie (or even advanced user, but someone digging in more) won’t even benefit from Arch.

      I personally cannot imagine using anything other than Arch, but no way I am going to recommend it for someone who don’t know what a bootloader is. But recommending to install it in VM is good tho, teaches a lot.

    • frozen@lemmy.frozeninferno.xyz
      link
      fedilink
      arrow-up
      0
      ·
      8 months ago

      Step 3 is optional. mkinitcpio will just issue a warning, and any kernel packages you have installed should eventually update their presets.

    • Strit@lemmy.linuxuserspace.show
      link
      fedilink
      arrow-up
      0
      ·
      8 months ago

      As I read the announcement it sounds like you only need to do changes if you setup early-microcode stuff. So if you have a completely standard install, no changes would be needed other than updating packages.

      Am I wrong in this?

      • d3Xt3r@lemmy.nzOP
        link
        fedilink
        arrow-up
        0
        ·
        8 months ago

        It’s the other way round. Early-loading is the default and in fact late-loading doesn’t even work on stock Arch kernels, because it requires the kernel to be built with that config option enabled. So any “standard” install would be taking about early-loading microcode, so this should be applicable to you as well.

        • Strit@lemmy.linuxuserspace.show
          link
          fedilink
          arrow-up
          0
          ·
          8 months ago

          Okay. But they do state in the announcement, that to ensure that no breaking occurs, they introduced some conflicts. So even if I just update packages, I should get my system up and running and be able to make any changes when they are required?

          They don’t mention anywhere that manual intervention is required for this update.

          • d3Xt3r@lemmy.nzOP
            link
            fedilink
            arrow-up
            0
            ·
            8 months ago

            So there’s two parts to this announcement. The first one deals with the upstreaming of modules and the resultant conflicts with the Arch packaged versions - this was solved by Arch upstream by introducing conflicts. In this case, you don’t need to do anything.

            The second part is about the microcode loading, where the old method of loading the microcode is deprecated, in favor of the new method (ie making it part of your main initrd). Now it’s just deprecated, so you don’t have to take any action either, but if you don’t, you’ll see annoying warning messages from mkinitcpio, whenever your kernel/initrd gets updated. But eventually, the legacy option will go away, and you’ll be forced to take action. So might as well do it now, because Arch ain’t going to do it for you in the future.

            • Strit@lemmy.linuxuserspace.show
              link
              fedilink
              arrow-up
              0
              ·
              8 months ago

              Ah, that’s good to hear. So my system will come back up, it will just complain until I do these microcode changes.

              So your post/comment was just being preemptive of future changes. :)

    • Malix@sopuli.xyz
      link
      fedilink
      arrow-up
      0
      ·
      edit-2
      8 months ago

      I might have missed something VERY obvious - I did skim through check the mkinitcpio, grub and microcode wikipages - but just merging .pacnew to current config (mkinitcpio, grub defaults), mkinitcpio -p linux and grub-mkconfig -o /boot/grub/grub.cfg, newly created grub.conf still had intel-ucode on the initrd -line. This happened on both machines I have atm.

      Arch forums had the magic words here: https://bbs.archlinux.org/viewtopic.php?pid=2154769#p2154769

      Add this line to /etc/default/grub then regenerate grub.cfg:

      GRUB_EARLY_INITRD_LINUX_STOCK=''

      and then my grub.cfg generated fine without the intel-ucode, and after rebooting dmesg seems to indicate the new method works fine

      [    0.314430] microcode: Current revision: 0x0000002f
      [    0.314433] microcode: Updated early from: 0x00000014
      

      Always something :P

    • F04118F@feddit.nl
      link
      fedilink
      arrow-up
      0
      ·
      8 months ago

      I was trying to do this, didn’t find the directory, figured out that mkinitcpio wasn’t installed. Turns out EndeavourOS set up dracut which means I don’t even have to do this. (Hides behind purple SDDM theme)