diff --git a/man/kernel-install.xml b/man/kernel-install.xml
index b3aed1b8df0..613f01b85c3 100644
--- a/man/kernel-install.xml
+++ b/man/kernel-install.xml
@@ -112,7 +112,7 @@
$BOOT/ENTRY-TOKEN/KERNEL-VERSION/linux.
If INITRD-FILEs are provided, it also copies them to
$BOOT/ENTRY-TOKEN/KERNEL_VERSION/INITRD-FILE.
- It also creates a boot loader entry according to the Boot Loader Specification (Type #1) in
$BOOT/loader/entries/ENTRY-TOKEN-KERNEL-VERSION.conf.
The title of the entry is the PRETTY_NAME parameter specified in
@@ -351,7 +351,9 @@
$KERNEL_INSTALL_STAGING_AREA is set for plugins to a path to a directory.
Plugins may drop files in that directory, and they will be installed as part of the loader entry, based
- on the file name and extension.
+ on the file name and extension: Files named initrd* will be installed as INITRD-FILEs,
+ and files named microcode* will be prepended before INITRD-FILEs.
+
diff --git a/src/kernel-install/90-loaderentry.install.in b/src/kernel-install/90-loaderentry.install.in
index f4ba4708bac..800bb05d02b 100755
--- a/src/kernel-install/90-loaderentry.install.in
+++ b/src/kernel-install/90-loaderentry.install.in
@@ -117,10 +117,13 @@ chown root:root "$KERNEL_DEST" || :
shift "$INITRD_OPTIONS_SHIFT"
# All files listed as arguments, and staged files starting with "initrd" are installed as initrds.
-for initrd in "$@" "${KERNEL_INSTALL_STAGING_AREA}"/initrd*; do
+for initrd in "${KERNEL_INSTALL_STAGING_AREA}/microcode*" "${@}" "${KERNEL_INSTALL_STAGING_AREA}/initrd*"; do
[ -f "$initrd" ] || {
- [ "$initrd" = "${KERNEL_INSTALL_STAGING_AREA}/initrd*" ] && continue
- echo "Error: initrd '$initrd' not a file." >&2
+ case "$initrd" in
+ "${KERNEL_INSTALL_STAGING_AREA}/initrd*" | "${KERNEL_INSTALL_STAGING_AREA}/microcode*")
+ continue ;;
+ esac
+ echo "Error: '$initrd' is not a file." >&2
exit 1
}
@@ -153,7 +156,7 @@ mkdir -p "${LOADER_ENTRY%/*}" || {
echo "linux $KERNEL_ENTRY"
have_initrd=
- for initrd in "${@}" "${KERNEL_INSTALL_STAGING_AREA}"/initrd*; do
+ for initrd in "${KERNEL_INSTALL_STAGING_AREA}/microcode*" "${@}" "${KERNEL_INSTALL_STAGING_AREA}/initrd*"; do
[ -f "$initrd" ] || continue
echo "initrd $ENTRY_DIR/${initrd##*/}"
have_initrd=yes