diff options
Diffstat (limited to '20_linux_xen-detect-archlinux-initramfs.patch')
-rw-r--r-- | 20_linux_xen-detect-archlinux-initramfs.patch | 41 |
1 files changed, 41 insertions, 0 deletions
diff --git a/20_linux_xen-detect-archlinux-initramfs.patch b/20_linux_xen-detect-archlinux-initramfs.patch new file mode 100644 index 000000000000..93c0f54adf1f --- /dev/null +++ b/20_linux_xen-detect-archlinux-initramfs.patch @@ -0,0 +1,41 @@ +diff --git a/util/grub.d/20_linux_xen.in b/util/grub.d/20_linux_xen.in +index 3b1f47049..7f1c8526a 100644 +--- a/util/grub.d/20_linux_xen.in ++++ b/util/grub.d/20_linux_xen.in +@@ -118,6 +118,8 @@ linux_entry_xsm () + if [ x$type != xsimple ] ; then + if [ x$type = xrecovery ] ; then + title="$(gettext_printf "%s, with Xen %s and Linux %s (recovery mode)" "${os}" "${xen_version}" "${version}")" ++ elif [ x$type = xfallback ] ; then ++ title="$(gettext_printf "%s, with Xen %s and Linux %s (fallback initramfs)" "${os}" "${xen_version}" "${version}")" + else + title="$(gettext_printf "%s, with Xen %s and Linux %s" "${os}" "${xen_version}" "${version}")" + fi +@@ -275,7 +277,7 @@ while [ "x${xen_list}" != "x" ] ; do + basename=`basename $linux` + dirname=`dirname $linux` + rel_dirname=`make_system_path_relative_to_its_root $dirname` +- version=`echo $basename | sed -e "s,^[^0-9]*-,,g"` ++ version=`echo $basename | sed -e "s,vmlinuz-,,g"` + alt_version=`echo $version | sed -e "s,\.old$,,g"` + linux_root_device_thisversion="${LINUX_ROOT_DEVICE}" + +@@ -341,6 +343,18 @@ while [ "x${xen_list}" != "x" ] ; do + + linux_entry "${OS}" "${version}" "${xen_version}" advanced \ + "${GRUB_CMDLINE_LINUX} ${GRUB_CMDLINE_LINUX_DEFAULT}" "${GRUB_CMDLINE_XEN} ${GRUB_CMDLINE_XEN_DEFAULT}" ++ ++ if test -e "${dirname}/initramfs-${version}-fallback.img" ; then ++ initrd_real="initramfs-${version}-fallback.img" ++ ++ if test -n "${initrd_real}" ; then ++ gettext_printf "Found fallback initrd image(s) in %s:%s\n" "${dirname}" "${initrd_extra} ${initrd_real}" >&2 ++ fi ++ ++ linux_entry "${OS}" "${version}" "${xen_version}" fallback \ ++ "${GRUB_CMDLINE_LINUX} ${GRUB_CMDLINE_LINUX_DEFAULT}" "${GRUB_CMDLINE_XEN} ${GRUB_CMDLINE_XEN_DEFAULT}" ++ fi ++ + if [ "x${GRUB_DISABLE_RECOVERY}" != "xtrue" ]; then + linux_entry "${OS}" "${version}" "${xen_version}" recovery \ + "single ${GRUB_CMDLINE_LINUX}" "${GRUB_CMDLINE_XEN}" |