forked from bottlerocket-os/bottlerocket
-
Notifications
You must be signed in to change notification settings - Fork 0
/
1002-initramfs-unlink-INITRAMFS_FORCE-from-CMDLINE_-EXTEN.patch
50 lines (42 loc) · 1.83 KB
/
1002-initramfs-unlink-INITRAMFS_FORCE-from-CMDLINE_-EXTEN.patch
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
From 4e00f4850eaf84e1e638c467f444b8f4fb8c67f8 Mon Sep 17 00:00:00 2001
From: Ben Cressey <[email protected]>
Date: Tue, 18 Oct 2022 22:24:52 +0000
Subject: [PATCH] initramfs: unlink INITRAMFS_FORCE from CMDLINE_{EXTEND,FORCE}
The motivation given in cff75e0b6fe83 for tying INITRAMFS_FORCE to
either of CMDLINE_{EXTEND,FORCE} was that these options imply an
inflexible bootloader, and that overriding the initramfs image would
also only be necessary for inflexible bootloaders.
However, with the advent of Boot Config support, distributions that do
not normally use an initramfs may still want to allow an "initrd" to be
passed by the bootloader in order to accept boot configuration data. In
such cases, the CMDLINE_{EXTEND,FORCE} options are not desired because
the bootloader is actually expected to control the kernel command line.
Unlinking the INITRAMFS_FORCE config option allows Boot Config data to
be passed by the bootloader while still preventing an unexpected
initramfs from overriding the built-in initramfs (if any).
Signed-off-by: Ben Cressey <[email protected]>
---
usr/Kconfig | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/usr/Kconfig b/usr/Kconfig
index 8bbcf699fe3b..06aac19063ee 100644
--- a/usr/Kconfig
+++ b/usr/Kconfig
@@ -24,7 +24,7 @@ config INITRAMFS_SOURCE
config INITRAMFS_FORCE
bool "Ignore the initramfs passed by the bootloader"
- depends on CMDLINE_EXTEND || CMDLINE_FORCE
+ default n
help
This option causes the kernel to ignore the initramfs image
(or initrd image) passed to it by the bootloader. This is
@@ -32,6 +32,8 @@ config INITRAMFS_FORCE
and is useful if you cannot or don't want to change the image
your bootloader passes to the kernel.
+ If unsure, say N.
+
config INITRAMFS_ROOT_UID
int "User ID to map to 0 (user root)"
depends on INITRAMFS_SOURCE!=""
--
2.37.2