The Linux Kernel Mailing List
 help / color / mirror / Atom feed
* [PATCH] docs: clarify rdinit precedence and correct ramdisk to initramfs
@ 2025-01-30  8:59 Nir Lichtman
  2025-01-30  9:52 ` Greg KH
  0 siblings, 1 reply; 3+ messages in thread
From: Nir Lichtman @ 2025-01-30  8:59 UTC (permalink / raw)
  To: corbet, paulmck, akpm, rostedt, Neeraj.Upadhyay, mcanal, thuth,
	ardb, gregkh, bp, linux-doc, linux-kernel
  Cc: rob

Problem: Current documentation regarding the init and rdinit params is
confusing,
The description of rdinit claims that it is related to ramdisks, even though
in practice
It only controls the init executable of the initramfs
(the deprecated ramdisk mechanism is initialized only after attempting to
load rdinit
or its default "/init")
Rob Landley's document from 2005 "Ramfs, rootfs and initramfs"
clarifies the distinction between initramfs and ramdisk.
Another confusing point is that the init param is ignored, in case rdinit or
"/init"
exist and are executable in the initramfs; the source code gives priority to
rdinit.

Solution: Add more clarification to the kernel params documentation, and fix
From ramdisk to initramfs in the rdinit doc.

Signed-off-by: Nir Lichtman <nir@lichtman.org>
---
 Documentation/admin-guide/kernel-parameters.txt | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/Documentation/admin-guide/kernel-parameters.txt
b/Documentation/admin-guide/kernel-parameters.txt
index fb8752b42ec8..246cb73f71a8 100644
--- a/Documentation/admin-guide/kernel-parameters.txt
+++ b/Documentation/admin-guide/kernel-parameters.txt
@@ -2182,6 +2182,8 @@
 			Format: <full_path>
 			Run specified binary instead of /sbin/init as init
 			process.
+			Note that rdinit= or /init if rdinit= is not set
will take
+			precedence in case they are found in the initramfs.
 
 	initcall_debug	[KNL] Trace initcalls as they are executed.  Useful
 			for working out where the kernel is dying during
@@ -5933,8 +5935,8 @@
 
 	rdinit=		[KNL]
 			Format: <full_path>
-			Run specified binary instead of /init from the
ramdisk,
-			used for early userspace startup. See initrd.
+			Run specified binary instead of /init from the
initramfs,
+			used for early userspace startup.
 
 	rdrand=		[X86,EARLY]
 			force - Override the decision by the kernel to hide
the
-- 
2.39.5



^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH] docs: clarify rdinit precedence and correct ramdisk to initramfs
  2025-01-30  8:59 [PATCH] docs: clarify rdinit precedence and correct ramdisk to initramfs Nir Lichtman
@ 2025-01-30  9:52 ` Greg KH
  2025-01-30 10:04   ` Nir Lichtman
  0 siblings, 1 reply; 3+ messages in thread
From: Greg KH @ 2025-01-30  9:52 UTC (permalink / raw)
  To: Nir Lichtman
  Cc: corbet, paulmck, akpm, rostedt, Neeraj.Upadhyay, mcanal, thuth,
	ardb, bp, linux-doc, linux-kernel, rob

On Thu, Jan 30, 2025 at 10:59:33AM +0200, Nir Lichtman wrote:
> Problem: Current documentation regarding the init and rdinit params is
> confusing,
> The description of rdinit claims that it is related to ramdisks, even though
> in practice
> It only controls the init executable of the initramfs
> (the deprecated ramdisk mechanism is initialized only after attempting to
> load rdinit
> or its default "/init")
> Rob Landley's document from 2005 "Ramfs, rootfs and initramfs"
> clarifies the distinction between initramfs and ramdisk.
> Another confusing point is that the init param is ignored, in case rdinit or
> "/init"
> exist and are executable in the initramfs; the source code gives priority to
> rdinit.
> 

Odd line-wrapping, please fix :(

> Solution: Add more clarification to the kernel params documentation, and fix
> >From ramdisk to initramfs in the rdinit doc.
> 
> Signed-off-by: Nir Lichtman <nir@lichtman.org>
> ---
>  Documentation/admin-guide/kernel-parameters.txt | 6 ++++--
>  1 file changed, 4 insertions(+), 2 deletions(-)
> 
> diff --git a/Documentation/admin-guide/kernel-parameters.txt
> b/Documentation/admin-guide/kernel-parameters.txt
> index fb8752b42ec8..246cb73f71a8 100644
> --- a/Documentation/admin-guide/kernel-parameters.txt
> +++ b/Documentation/admin-guide/kernel-parameters.txt
> @@ -2182,6 +2182,8 @@
>  			Format: <full_path>
>  			Run specified binary instead of /sbin/init as init
>  			process.
> +			Note that rdinit= or /init if rdinit= is not set
> will take
> +			precedence in case they are found in the initramfs.

Your patch is also line-wrapped and will not apply at all :(

thanks,

greg k-h

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] docs: clarify rdinit precedence and correct ramdisk to initramfs
  2025-01-30  9:52 ` Greg KH
@ 2025-01-30 10:04   ` Nir Lichtman
  0 siblings, 0 replies; 3+ messages in thread
From: Nir Lichtman @ 2025-01-30 10:04 UTC (permalink / raw)
  To: Greg KH
  Cc: corbet, paulmck, akpm, rostedt, Neeraj.Upadhyay, mcanal, thuth,
	ardb, bp, linux-doc, linux-kernel, rob

On Thu, Jan 30, 2025 at 10:52:02AM +0100, Greg KH wrote:
> On Thu, Jan 30, 2025 at 10:59:33AM +0200, Nir Lichtman wrote:
> > Problem: Current documentation regarding the init and rdinit params is
> > confusing,
> > The description of rdinit claims that it is related to ramdisks, even though
> > in practice
> > It only controls the init executable of the initramfs
> > (the deprecated ramdisk mechanism is initialized only after attempting to
> > load rdinit
> > or its default "/init")
> > Rob Landley's document from 2005 "Ramfs, rootfs and initramfs"
> > clarifies the distinction between initramfs and ramdisk.
> > Another confusing point is that the init param is ignored, in case rdinit or
> > "/init"
> > exist and are executable in the initramfs; the source code gives priority to
> > rdinit.
> > 
> 
> Odd line-wrapping, please fix :(
> 
[..]
> 
> Your patch is also line-wrapped and will not apply at all :(

Oops mistake, sorry about that, sending a fixed v2.

> 
> thanks,
> 
> greg k-h

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2025-01-30 10:04 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-01-30  8:59 [PATCH] docs: clarify rdinit precedence and correct ramdisk to initramfs Nir Lichtman
2025-01-30  9:52 ` Greg KH
2025-01-30 10:04   ` Nir Lichtman

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox