--- 10_linux.in 2017-04-24 11:15:50.000000000 +0200 +++ 10_linux.in.new 2017-05-11 14:35:36.737981775 +0200 @@ -67,6 +67,12 @@ ;; esac +intel_ucode= +if test -e "/boot/early-ucode.cpio"; then + gettext_printf "Found Intel microcode image\n" >&2 + intel_ucode="$(make_system_path_relative_to_its_root /boot/early-ucode.cpio)" +fi + title_correction_code= linux_entry () @@ -95,7 +101,7 @@ echo "menuentry '$(echo "$title" | grub_quote)' ${CLASS} \$menuentry_id_option 'gnulinux-$version-$type-$boot_device_id' {" | sed "s/^/$submenu_indentation/" else echo "menuentry '$(echo "$os" | grub_quote)' ${CLASS} \$menuentry_id_option 'gnulinux-simple-$boot_device_id' {" | sed "s/^/$submenu_indentation/" - fi + fi if [ x$type != xrecovery ] ; then save_default_entry | grub_add_tab fi @@ -138,7 +144,15 @@ message="$(gettext_printf "Loading initial ramdisk ...")" sed "s/^/$submenu_indentation/" << EOF echo '$(echo "$message" | grub_quote)' - initrd ${rel_dirname}/${initrd} + initrd ${intel_ucode} ${rel_dirname}/${initrd} +EOF + fi + + if test -n "${intel_ucode}" ; then + message="$(gettext_printf "Loading Intel microcode image ...")" + sed "s/^/$submenu_indentation/" << EOF + echo '$message' + initrd ${intel_ucode} EOF fi sed "s/^/$submenu_indentation/" << EOF @@ -153,7 +167,7 @@ for i in /boot/vmlinuz-* /vmlinuz-* /boot/kernel-* ; do if grub_file_is_not_garbage "$i" ; then list="$list $i" ; fi done ;; - *) + *) list= for i in /boot/vmlinuz-* /boot/vmlinux-* /vmlinuz-* /vmlinux-* /boot/kernel-* ; do if grub_file_is_not_garbage "$i" ; then list="$list $i" ; fi @@ -229,7 +243,7 @@ "${GRUB_CMDLINE_LINUX} ${GRUB_CMDLINE_LINUX_DEFAULT}" submenu_indentation="$grub_tab" - + if [ -z "$boot_device_id" ]; then boot_device_id="$(grub_get_device_id "${GRUB_DEVICE}")" fi