2021-03-10 19:01:54 +01:00
|
|
|
From 058d08a025f9a6ec77d5ddd1fc62c7bd6abe1a52 Mon Sep 17 00:00:00 2001
|
|
|
|
From: Christian Hesse <mail@eworm.de>
|
|
|
|
Date: Wed, 10 Mar 2021 18:40:00 +0100
|
|
|
|
Subject: [PATCH] 10_linux: detect archlinux initramfs
|
|
|
|
---
|
|
|
|
util/grub.d/10_linux.in | 16 +++++++++++++++-
|
|
|
|
1 file changed, 15 insertions(+), 1 deletion(-)
|
|
|
|
|
2014-04-07 13:01:47 +02:00
|
|
|
diff --git a/util/grub.d/10_linux.in b/util/grub.d/10_linux.in
|
2021-03-10 19:01:54 +01:00
|
|
|
index e8b01c0d0..e703dcdb0 100644
|
2014-04-07 13:01:47 +02:00
|
|
|
--- a/util/grub.d/10_linux.in
|
|
|
|
+++ b/util/grub.d/10_linux.in
|
2021-03-10 19:01:54 +01:00
|
|
|
@@ -93,6 +93,8 @@ linux_entry ()
|
2014-04-07 13:01:47 +02:00
|
|
|
case $type in
|
|
|
|
recovery)
|
|
|
|
title="$(gettext_printf "%s, with Linux %s (recovery mode)" "${os}" "${version}")" ;;
|
|
|
|
+ fallback)
|
|
|
|
+ title="$(gettext_printf "%s, with Linux %s (fallback initramfs)" "${os}" "${version}")" ;;
|
|
|
|
*)
|
|
|
|
title="$(gettext_printf "%s, with Linux %s" "${os}" "${version}")" ;;
|
|
|
|
esac
|
2021-03-10 19:01:54 +01:00
|
|
|
@@ -198,7 +200,7 @@ while [ "x$list" != "x" ] ; do
|
2014-04-07 13:01:47 +02:00
|
|
|
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}"
|
|
|
|
|
2021-03-10 19:01:54 +01:00
|
|
|
@@ -285,6 +287,18 @@ while [ "x$list" != "x" ] ; do
|
2014-04-07 13:01:47 +02:00
|
|
|
|
|
|
|
linux_entry "${OS}" "${version}" advanced \
|
|
|
|
"${GRUB_CMDLINE_LINUX} ${GRUB_CMDLINE_LINUX_DEFAULT}"
|
2016-08-03 09:43:02 +02:00
|
|
|
+
|
2014-04-07 13:01:47 +02:00
|
|
|
+ if test -e "${dirname}/initramfs-${version}-fallback.img" ; then
|
2021-04-20 16:05:48 +02:00
|
|
|
+ initrd="${initrd_early} initramfs-${version}-fallback.img"
|
2016-08-03 09:43:02 +02:00
|
|
|
+
|
2014-04-07 13:01:47 +02:00
|
|
|
+ if test -n "${initrd}" ; then
|
2016-08-03 09:43:02 +02:00
|
|
|
+ gettext_printf "Found fallback initrd image(s) in %s:%s\n" "${dirname}" "${initrd_extra} ${initrd}" >&2
|
2014-04-07 13:01:47 +02:00
|
|
|
+ fi
|
2016-08-03 09:43:02 +02:00
|
|
|
+
|
2014-04-07 13:01:47 +02:00
|
|
|
+ linux_entry "${OS}" "${version}" fallback \
|
2016-08-03 09:43:02 +02:00
|
|
|
+ "${GRUB_CMDLINE_LINUX} ${GRUB_CMDLINE_LINUX_DEFAULT}"
|
2014-04-07 13:01:47 +02:00
|
|
|
+ fi
|
2016-08-03 09:43:02 +02:00
|
|
|
+
|
2014-04-07 13:01:47 +02:00
|
|
|
if [ "x${GRUB_DISABLE_RECOVERY}" != "xtrue" ]; then
|
|
|
|
linux_entry "${OS}" "${version}" recovery \
|
|
|
|
"single ${GRUB_CMDLINE_LINUX}"
|