From bccac381b27592bdc22d151c744814716eb4f7ec Mon Sep 17 00:00:00 2001 From: Franz Pletz Date: Mon, 27 Feb 2017 17:12:33 +0100 Subject: microcode updates: prepend first in initrd Prevents crashing the kernel on boot if other blobs are prepended before the microkernel update image. Fixes #22674. --- nixos/modules/hardware/cpu/amd-microcode.nix | 3 ++- nixos/modules/hardware/cpu/intel-microcode.nix | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) (limited to 'nixos') 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" ]; }; } -- cgit 1.4.1