diff options
author | Franz Pletz <fpletz@fnordicwalking.de> | 2017-02-27 17:12:33 +0100 |
---|---|---|
committer | Franz Pletz <fpletz@fnordicwalking.de> | 2017-02-27 17:12:33 +0100 |
commit | bccac381b27592bdc22d151c744814716eb4f7ec (patch) | |
tree | ed057748269a05003870801b67015990ef8a9e28 /nixos | |
parent | 2edb8ffa14e04e77ee5041cccd82e0b083353572 (diff) |
microcode updates: prepend first in initrd
Prevents crashing the kernel on boot if other blobs are prepended before the microkernel update image. Fixes #22674.
Diffstat (limited to 'nixos')
-rw-r--r-- | nixos/modules/hardware/cpu/amd-microcode.nix | 3 | ||||
-rw-r--r-- | nixos/modules/hardware/cpu/intel-microcode.nix | 3 |
2 files changed, 4 insertions, 2 deletions
diff --git a/nixos/modules/hardware/cpu/amd-microcode.nix b/nixos/modules/hardware/cpu/amd-microcode.nix index d44f01a495900..621c7066bfe1b 100644 --- a/nixos/modules/hardware/cpu/amd-microcode.nix +++ b/nixos/modules/hardware/cpu/amd-microcode.nix @@ -22,7 +22,8 @@ with lib; ###### implementation config = mkIf config.hardware.cpu.amd.updateMicrocode { - boot.initrd.prepend = [ "${pkgs.microcodeAmd}/amd-ucode.img" ]; + # Microcode updates must be the first item prepended in the initrd + boot.initrd.prepend = mkOrder 1 [ "${pkgs.microcodeAmd}/amd-ucode.img" ]; }; } diff --git a/nixos/modules/hardware/cpu/intel-microcode.nix b/nixos/modules/hardware/cpu/intel-microcode.nix index 89ae4f45806cb..acce565fd808b 100644 --- a/nixos/modules/hardware/cpu/intel-microcode.nix +++ b/nixos/modules/hardware/cpu/intel-microcode.nix @@ -22,7 +22,8 @@ with lib; ###### implementation config = mkIf config.hardware.cpu.intel.updateMicrocode { - boot.initrd.prepend = [ "${pkgs.microcodeIntel}/intel-ucode.img" ]; + # Microcode updates must be the first item prepended in the initrd + boot.initrd.prepend = mkOrder 1 [ "${pkgs.microcodeIntel}/intel-ucode.img" ]; }; } |