Package: dracut
Version: 045+132-1
Severity: important
X-Debbugs-Cc: [email protected]

dracut supports early loading of microcode but makes assumptions about
paths that do not match the packaging in Debian. Hence the microcode
updates are skipped altogether on platforms where the intel-microcode
package requests early loading (e.g. the Haswell machine I'm typing this
on).

I'd suggest the following three changes, which make it work on my machine:

1) Add the microcode paths to fw_dir. Given that Debian does not version
its firmware by kernel and given that we don't seem to ship anything in
/lib/firmware/updates either archive-wide, this would mean this in
10-debian.conf:

fw_dir=/lib/firmware:/lib/firmware/intel-ucode:/lib/firmware/amd-ucode

This adds the subdirectories to dracut's search path for microcode, as
it expects the Intel fragments and AMD's .bin files in the base of the
firmware directory.

2) Activate early loading by configuration. early_microcode defaults to
"no" so we need to set this in 10-debian.conf:

early_microcode=yes

3) Add a patch to dracut.sh (/usr/bin/dracut) because intel-microcode
uses the .initramfs suffix for the ucode files where it requests early
loading. Given that hostonly is the default for dracut, only including
microcode for the machine it is currently running on, we need to add a
star to the pattern it looks for:

Index: dracut-045+132/dracut.sh
===================================================================
--- dracut-045+132.orig/dracut.sh
+++ dracut-045+132/dracut.sh
@@ -1649,7 +1649,7 @@ if [[ $early_microcode = yes ]]; then
                 _src="*"
                 dinfo "*** Constructing ${ucode_dest[$idx]} ****"
                 if [[ $hostonly ]]; then
-                    _src=$(get_ucode_file)
+                    _src="$(get_ucode_file)*"
                     [[ $_src ]] || break
                     [[ -r $_fwdir/$_fw/$_src ]] || break
                 fi

Kind regards and thanks
Philipp Kern

Attachment: signature.asc
Description: OpenPGP digital signature

Reply via email to