Skip to content

Commit bccac38

Browse files
committedFeb 27, 2017
microcode updates: prepend first in initrd
Prevents crashing the kernel on boot if other blobs are prepended before the microkernel update image. Fixes #22674.
1 parent 2edb8ff commit bccac38

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed
 

Diff for: ‎nixos/modules/hardware/cpu/amd-microcode.nix

+2-1
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,8 @@ with lib;
2222
###### implementation
2323

2424
config = mkIf config.hardware.cpu.amd.updateMicrocode {
25-
boot.initrd.prepend = [ "${pkgs.microcodeAmd}/amd-ucode.img" ];
25+
# Microcode updates must be the first item prepended in the initrd
26+
boot.initrd.prepend = mkOrder 1 [ "${pkgs.microcodeAmd}/amd-ucode.img" ];
2627
};
2728

2829
}

Diff for: ‎nixos/modules/hardware/cpu/intel-microcode.nix

+2-1
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,8 @@ with lib;
2222
###### implementation
2323

2424
config = mkIf config.hardware.cpu.intel.updateMicrocode {
25-
boot.initrd.prepend = [ "${pkgs.microcodeIntel}/intel-ucode.img" ];
25+
# Microcode updates must be the first item prepended in the initrd
26+
boot.initrd.prepend = mkOrder 1 [ "${pkgs.microcodeIntel}/intel-ucode.img" ];
2627
};
2728

2829
}

0 commit comments

Comments
 (0)
Please sign in to comment.