# Early load of microcode with only one copy in /boot

**URL:** https://discourse.nixos.org/t/early-load-of-microcode-with-only-one-copy-in-boot/80481
**Category:** Help
**Created:** [October 8, 2026, 10:50am UTC](https://discourse.nixos.org/t/early-load-of-microcode-with-only-one-copy-in-boot/80481 "2026-10-08T10:50:00Z")
**Posts on this page:** 4
**Page:** 1

<div class="post-metadata">

### Author: ![pmakholm](https://discourse.nixos.org/user_avatar/discourse.nixos.org/pmakholm/32/38974_2.png) [@pmakholm](https://discourse.nixos.org/u/pmakholm)
#### Post date: [October 8, 2026, 10:50am UTC](https://discourse.nixos.org/t/early-load-of-microcode-with-only-one-copy-in-boot/80481/1 "2026-10-08T10:50:00Z")

</div>

I have enabled `hardware.cpu.intel.updateMicrocode`.

This prepends the microcode image to the `initrd`file, which enabled the kernel microcode loader as described in [23. The Linux Microcode Loader — The Linux Kernel documentation](https://www.kernel.org/doc/html/next/x86/microcode.html)

For most bootloaders it is possible to add multiple initrd files but the microcode image have to be the first. Using `system.boot.extraInitrd`it should be possible to add extra initrd files to the boot command but this seems to be appended and thus not useful for the microcode update.

Is there a way to get boot loaders configured to update microcode without having to add the same 15 MB of Intel microcode to each and every initrd image?

(Yeah, I made my /boot too small)

---

<div class="post-metadata">

### Author: ![pmakholm](https://discourse.nixos.org/user_avatar/discourse.nixos.org/pmakholm/32/38974_2.png) [@pmakholm](https://discourse.nixos.org/u/pmakholm)
#### Post date: [October 8, 2026, 11:09am UTC](https://discourse.nixos.org/t/early-load-of-microcode-with-only-one-copy-in-boot/80481/2 "2026-10-08T11:09:59Z")

</div>

I just notice that `system.boot.extraInitrd`is a recent innovation.

> <https://github.com/NixOS/nixpkgs/commit/5f267f4ddab4e1e461cdb00cf1f41c8041afa2d7>
>
> This is for instance useful on Asahi where an additional initrd archive
> containi…ng firmware blobs and per-device calibration files is placed
> on the ESP and updated by the Asahi Linux Installer.
> These need to be loaded alongside the NixOS initrd.
> 
> Implemented for systemd-boot and Limine. Grub is left out since its
> install script does not use bootspec yet.
> 
> Co-authored-by: Florian Klink \<flokli@flokli.de\>

---

<div class="post-metadata">

### Author: ![zwol](https://discourse.nixos.org/user_avatar/discourse.nixos.org/zwol/32/31829_2.png) [@zwol](https://discourse.nixos.org/u/zwol)
#### Post date: [October 8, 2026, 12:51pm UTC](https://discourse.nixos.org/t/early-load-of-microcode-with-only-one-copy-in-boot/80481/3 "2026-10-08T12:51:28Z")

</div>

On a related note, if you’re using a monolithic kernel or a kernel that embeds all the modules needed to mount the real root filesystem, it should be possible to reuse a single initrd for all the kernels (as long as nothing _else_ that needs to be copied into the initrd changes between generations), saving substantial space in /boot.

---

<div class="post-metadata">

### Author: ![pmakholm](https://discourse.nixos.org/user_avatar/discourse.nixos.org/pmakholm/32/38974_2.png) [@pmakholm](https://discourse.nixos.org/u/pmakholm)
#### Post date: [October 9, 2026, 6:57am UTC](https://discourse.nixos.org/t/early-load-of-microcode-with-only-one-copy-in-boot/80481/4 "2026-10-09T06:57:30Z")

</div>

I have looked into it and it does not seem to be possible.

I can kind of see a way through adding an entry to bootspec and patching `systemd-boot-installer.py` and `limine-installer.py` just as the above patch to add extraInitrd. A minimal solution would just be adding a `microcode` attribute.

Not being able to add multiple initrd files is already mentioned in RFC-0125 as a weakness of the currect bootspec version. A better, but more involved, solution would be to fix this weakness.

But this seems to be a bit above a candidate for my first contribution to nixpkgs.
