1 From dbc289f59a2b204af19ef7212f3b6b07d3060452 Mon Sep 17 00:00:00 2001
2 From: Christian Hesse <mail@eworm.de>
3 Date: Mon, 26 Apr 2021 11:10:01 +0200
4 Subject: [PATCH 1/1] 10_linux: detect archlinux initramfs
6 util/grub.d/10_linux.in | 29 ++++++++++++++++++++++++++++-
7 1 file changed, 28 insertions(+), 1 deletion(-)
9 diff --git a/util/grub.d/10_linux.in b/util/grub.d/10_linux.in
10 index e8b01c0d0..9b60af944 100644
11 --- a/util/grub.d/10_linux.in
12 +++ b/util/grub.d/10_linux.in
13 @@ -91,6 +91,10 @@ linux_entry ()
15 if [ x$type != xsimple ] ; then
18 + title="$(gettext_printf "%s, with Linux %s (booster initramfs)" "${os}" "${version}")" ;;
20 + title="$(gettext_printf "%s, with Linux %s (fallback initramfs)" "${os}" "${version}")" ;;
22 title="$(gettext_printf "%s, with Linux %s (recovery mode)" "${os}" "${version}")" ;;
24 @@ -198,7 +202,7 @@ while [ "x$list" != "x" ] ; do
25 basename=`basename $linux`
26 dirname=`dirname $linux`
27 rel_dirname=`make_system_path_relative_to_its_root $dirname`
28 - version=`echo $basename | sed -e "s,^[^0-9]*-,,g"`
29 + version=`echo $basename | sed -e "s,vmlinuz-,,g"`
30 alt_version=`echo $version | sed -e "s,\.old$,,g"`
31 linux_root_device_thisversion="${LINUX_ROOT_DEVICE}"
33 @@ -285,6 +289,29 @@ while [ "x$list" != "x" ] ; do
35 linux_entry "${OS}" "${version}" advanced \
36 "${GRUB_CMDLINE_LINUX} ${GRUB_CMDLINE_LINUX_DEFAULT}"
38 + if test -e "${dirname}/initramfs-${version}-fallback.img" ; then
39 + initrd="${initrd_early} initramfs-${version}-fallback.img"
41 + if test -n "${initrd}" ; then
42 + gettext_printf "Found fallback initrd image(s) in %s:%s\n" "${dirname}" "${initrd_extra} ${initrd}" >&2
45 + linux_entry "${OS}" "${version}" fallback \
46 + "${GRUB_CMDLINE_LINUX} ${GRUB_CMDLINE_LINUX_DEFAULT}"
49 + if test -e "${dirname}/booster-${version}.img" ; then
50 + initrd="${initrd_early} booster-${version}.img"
52 + if test -n "${initrd}" ; then
53 + gettext_printf "Found booster initrd image(s) in %s:%s\n" "${dirname}" "${initrd_extra} ${initrd}" >&2
56 + linux_entry "${OS}" "${version}" booster \
57 + "${GRUB_CMDLINE_LINUX} ${GRUB_CMDLINE_LINUX_DEFAULT}"
60 if [ "x${GRUB_DISABLE_RECOVERY}" != "xtrue" ]; then
61 linux_entry "${OS}" "${version}" recovery \
62 "single ${GRUB_CMDLINE_LINUX}"