# [[#Late loading|Late loading]] (Which [https://github.com/torvalds/linux/commit/9407bda845dd19756e276d4f3abc15a20777ba45 may] be [https://docs.kernel.org/arch/x86/microcode.html#why-is-late-loading-dangerous dangerous]) updates the microcode after booting which could be too late since the CPU might have already tried to use a faulty instruction. Even if already using early loading, late loading can still be used to apply a newer microcode update without needing to reboot.
Processor manufacturers release stability and security updates to the processor microcode. These updates provide bug fixes that can be critical to the stability of your system. Without them, you may experience spurious crashes or unexpected system halts that can be difficult to track down.
All users with an AMD or Intel CPU should install the microcode updates to ensure system stability. In virtual machines and containers, the microcode updates belongs on the host, not in the guest system.
Microcode updates are usually shipped with the motherboard's firmware and applied during firmware initialization. Since OEMs might not release firmware updates in a timely fashion and old systems do not get new firmware updates at all, the ability to apply CPU microcode updates during boot was added to the Linux kernel. The Linux microcode loader supports three loading methods:
The kernel's early loader expects microcode update files in or inside an uncompressed CPIO archive (initramfs image).
The early initramfs image can be combined with the main initramfs image into one file and passed as a single initramfs to the kernel (via the kernel command line option by your boot loader or when packed in a unified kernel image) or it can exist as a separate file in which case multiple kernel command line options need to be used. In both cases, the uncompressed CPIO archive with the microcode must be placed before the main initramfs.
Note that because of the wide variability in users' early-boot configuration, microcode updates may not be triggered automatically by Arch's default configuration.
In order for early loading to work in custom kernels, "CPU microcode loading support" needs to be compiled into the kernel, not compiled as a module. This will enable the "Early load microcode" prompt which should be set to .
The uncompressed microcode CPIO can be prepended into the initramfs and used as a single initramfs file. This method is preferred over #Microcode in a separate initramfs file since no additional boot parameter configuration is necessary.
grub-mkconfig will automatically detect the microcode update and configure GRUB appropriately. After installing the microcode package, regenerate the GRUB configuration to activate loading the microcode update by running:
The microcode is required to be the first initramfs declared for the boot options list. For example:
Users employing manual stanzas in to define kernels should add the parameter with the proper path within the boot partition. This parameter is required as part of the options line, and not in the main part of the stanza. E.g.:
Multiple initrd's can be separated by commas in :
LILO and potentially other old boot loaders do not support multiple initrd images. Follow the #Microcode initramfs packed together with the main initramfs in one file method instead.
This allows to apply newer microcode updates without rebooting the system.
Check the kernel messages with journalctl to see if the microcode has been updated:
One should see something similar to the following on every boot, indicating that microcode is updated very early on:
It is entirely possible, particularly with newer hardware, that there is no microcode update for the CPU.
On AMD systems using late loading the output will show the version of the old microcode before reloading the microcode and the new one once it is reloaded.
Users may consult either Intel's repository or Gentoo's wiki on AMD at the following links to see if a particular model is supported:
In case an updated CPU microcode causes issues, you may want to temporary disable the microcode loader to allow successfully booting and downgrading the package. To disable the kernel's microcode loader, specify the kernel parameter.