From: Oskari Pirhonen <xxc3ncoredxx@gmail.com>
To: grub-devel@gnu.org
Subject: [PATCH v3] util/grub.d/linux: Improve initramfs detection
Date: Mon, 2 May 2022 23:12:56 -0500 [thread overview]
Message-ID: <YnCryLGrCVYFZt1v@dj3ntoo> (raw)
Add detection for initramfs of the form *.img.old. For example, Gentoo's
sys-kernel/genkernel installs it as initramfs-*.img and moves any
existing one to initramfs-*.img.old.
Apply the same scheme to initrd-*.img and initrd-*.gz files for
consistency.
Signed-off-by: Oskari Pirhonen <xxc3ncoredxx@gmail.com>
---
v2 -> v3:
- include initrd-* files in the commit message
- fix indentation to follow existing
- leave initramfs-genkernel-* on their own line
v1 -> v2:
- don't reorder the checks
- include 20_linux_xen.in
util/grub.d/10_linux.in | 6 ++++--
util/grub.d/20_linux_xen.in | 6 ++++--
2 files changed, 8 insertions(+), 4 deletions(-)
diff --git a/util/grub.d/10_linux.in b/util/grub.d/10_linux.in
index ca068038e..b4a4d6900 100644
--- a/util/grub.d/10_linux.in
+++ b/util/grub.d/10_linux.in
@@ -215,8 +215,10 @@ while [ "x$list" != "x" ] ; do
done
initrd_real=
- for i in "initrd.img-${version}" "initrd-${version}.img" "initrd-${version}.gz" \
- "initrd-${version}" "initramfs-${version}.img" \
+ for i in "initrd.img-${version}" "initrd-${version}.img" \
+ "initrd-${alt_version}.img.old" "initrd-${version}.gz" \
+ "initrd-${alt_version}.gz.old" "initrd-${version}" \
+ "initramfs-${version}.img" "initramfs-${alt_version}.img.old" \
"initrd.img-${alt_version}" "initrd-${alt_version}.img" \
"initrd-${alt_version}" "initramfs-${alt_version}.img" \
"initramfs-genkernel-${version}" \
diff --git a/util/grub.d/20_linux_xen.in b/util/grub.d/20_linux_xen.in
index f45559ff8..51a983926 100644
--- a/util/grub.d/20_linux_xen.in
+++ b/util/grub.d/20_linux_xen.in
@@ -284,8 +284,10 @@ while [ "x${xen_list}" != "x" ] ; do
linux_root_device_thisversion="${LINUX_ROOT_DEVICE}"
initrd_real=
- for i in "initrd.img-${version}" "initrd-${version}.img" "initrd-${version}.gz" \
- "initrd-${version}" "initramfs-${version}.img" \
+ for i in "initrd.img-${version}" "initrd-${version}.img" \
+ "initrd-${alt_version}.img.old" "initrd-${version}.gz" \
+ "initrd-${alt_version}.gz.old" "initrd-${version}" \
+ "initramfs-${version}.img" "initramfs-${alt_version}.img.old" \
"initrd.img-${alt_version}" "initrd-${alt_version}.img" \
"initrd-${alt_version}" "initramfs-${alt_version}.img" \
"initramfs-genkernel-${version}" \
--
2.35.1
next reply other threads:[~2022-05-03 4:13 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-05-03 4:12 Oskari Pirhonen [this message]
2022-05-17 15:30 ` [PATCH v3] util/grub.d/linux: Improve initramfs detection Daniel Kiper
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=YnCryLGrCVYFZt1v@dj3ntoo \
--to=xxc3ncoredxx@gmail.com \
--cc=grub-devel@gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.