From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from list by lists.gnu.org with archive (Exim 4.90_1) id 1qPpgp-0007iO-0S for mharc-grub-devel@gnu.org; Sat, 29 Jul 2023 15:33:23 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1qPpgn-0007hl-7Z for grub-devel@gnu.org; Sat, 29 Jul 2023 15:33:21 -0400 Received: from mail-ej1-x62a.google.com ([2a00:1450:4864:20::62a]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1qPpgl-0005Po-AD for grub-devel@gnu.org; Sat, 29 Jul 2023 15:33:21 -0400 Received: by mail-ej1-x62a.google.com with SMTP id a640c23a62f3a-99bcf2de59cso489981366b.0 for ; Sat, 29 Jul 2023 12:33:18 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1690659197; x=1691263997; h=in-reply-to:content-disposition:mime-version:references :mail-followup-to:message-id:subject:cc:to:from:date:from:to:cc :subject:date:message-id:reply-to; bh=sgL8IO1bS0ZzvHtBo9bC5NUU7EcNj3PpAyMC4V/PrEQ=; b=EL8MOtN7XjitsvZgNgLDujiFXEgNhrL1pRdWkxkef+Ll9ITPSAqJvprvKX+Vgjb/WZ 8SWihIrUuYaBFab5sKD4M22c/2kfCEqg3SuCkQa86cVLC/r/fz9mquIG+LGEvV9ledra rJdDkmE23lgvSaXl9+Mdr+xNAR4NJyR1jrf0c28ogOAxe0nWpf5pxbx/Gr8jNl8fOosA wlQPS9ahAnrMbgwix+C1Qby1FX9MYzT2L2JwQYyxrBpOr+MnmvFm+ZsJeIR1RzoM5tR0 vAtW5vlvdN5ow3xPg7GgWoN51d5IC+j/+prD0Yjr70j1Y1iAWNtYxiuj/DwVZGdhr8hX vAlA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1690659197; x=1691263997; h=in-reply-to:content-disposition:mime-version:references :mail-followup-to:message-id:subject:cc:to:from:date :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=sgL8IO1bS0ZzvHtBo9bC5NUU7EcNj3PpAyMC4V/PrEQ=; b=ctIF88kY6hAhyhIndXKkNtSWDqywtbfvTFWzZc9BgA8N6+ql22/C37Q4P1d6SJq5SE XAI0cni0XmaWN7rVKnZfbqhKajBdqwFI4xK30tL7rRzbJjacoxMwggck0L9Ycf5TVuZD dohOdA7MWLfjzFU+dWWeoL4zUbzmcZOVUOVj4d/vmRtHH5zAakMtZHL5u26cPdkFDXyG LRzKEAsbDOix06yO+Fh7jCQqR64spogOXeSOFFV9vNejr3Zyegz0ZHz82WJkS2peU544 bwdKTDvmviHOgEEjZ2IAV4K7UYmEDublchd5l2DHnLZN5paDmEz9UzVWOYwjlJUDzuGJ c14w== X-Gm-Message-State: ABy/qLZ5iKXqt7v2uMUpsz+49dzhD0RxI2Jvd9wUOJ5mpfl7V0JLiwzs MRRhP2PAH+lmBBqYqKt2kYs= X-Google-Smtp-Source: APBJJlEJruZdcqs9k9j8dvowTPmfKplUnCMgPFCKFXJZPwDX+DHTKU6sjmH1sT04MkZseg6otQidqg== X-Received: by 2002:a17:907:774d:b0:98e:3cef:68ff with SMTP id kx13-20020a170907774d00b0098e3cef68ffmr2803786ejc.43.1690659196564; Sat, 29 Jul 2023 12:33:16 -0700 (PDT) Received: from dj3ntoo (140.sub-75-226-201.myvzw.com. [75.226.201.140]) by smtp.gmail.com with ESMTPSA id dk8-20020a170906f0c800b00992f2befcbcsm3621378ejb.180.2023.07.29.12.33.14 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 29 Jul 2023 12:33:16 -0700 (PDT) Date: Sat, 29 Jul 2023 14:33:10 -0500 From: Oskari Pirhonen To: Paul Menzel Cc: Glenn Washburn , Daniel Kiper , grub-devel@gnu.org Subject: Re: [PATCH] docs: Improve initrd documentation Message-ID: Mail-Followup-To: Paul Menzel , Glenn Washburn , Daniel Kiper , grub-devel@gnu.org References: <20230628101204.570808-1-development@efficientek.com> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="bEImHlK9mCMTOApJ" Content-Disposition: inline In-Reply-To: Received-SPF: pass client-ip=2a00:1450:4864:20::62a; envelope-from=xxc3ncoredxx@gmail.com; helo=mail-ej1-x62a.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: grub-devel@gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: The development of GNU GRUB List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 29 Jul 2023 19:33:21 -0000 --bEImHlK9mCMTOApJ Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Sat, Jul 29, 2023 at 07:28:40 +0200, Paul Menzel wrote: > Dear Glenn, >=20 >=20 > Thank you for all your work on GRUB. >=20 > Am 28.06.23 um 12:12 schrieb Glenn Washburn: > > Remove reference to "initial ramdisk" and replace with "initrd". This t= hen > > covers the case of ramdisk and ramfs, which is the usual method with ke= rnels > > 2.6 and greater. Add sentence with URL to initrd documentation Linux ke= rnel. > > Also, add a section documenting how to have the initrd command generate= a > > new-style initrd via a specially crafted argument and include an exampl= e. >=20 > (I=E2=80=99d format this as a list.) >=20 > >=20 > > Update initrd16 to refer to the initrd section and make note that initr= d16 > > is only on the pc platform. > >=20 > > Signed-off-by: Glenn Washburn > > --- > > docs/grub.texi | 46 ++++++++++++++++++++++++++++++++++++++++------ > > 1 file changed, 40 insertions(+), 6 deletions(-) > >=20 > > diff --git a/docs/grub.texi b/docs/grub.texi > > index b39b72230c6f..bea86669191b 100644 > > --- a/docs/grub.texi > > +++ b/docs/grub.texi > > @@ -4076,10 +4076,43 @@ load a defective boot loader, such as SCO UnixW= are 7.1. > > @subsection initrd > > =20 > > @deffn Command initrd file [file @dots{}] > > -Load, in order, all initial ramdisks for a Linux kernel image, and set > > -the appropriate parameters in the Linux setup area in memory. This ma= y only > > -be used after the @command{linux} command (@pxref{linux}) has been run= =2E See > > -also @ref{GNU/Linux}. > > +Load, in order, all initrds for a Linux kernel image, and set the > > +appropriate parameters in the Linux setup area in memory. This may on= ly > > +be used after the @command{linux} command (@pxref{linux}) has been run. > > +See @ref{GNU/Linux} for more info on booting GNU/Linux. For more > > +information on initrds see the GNU/Linux kernel > > +@uref{https://docs.kernel.org/filesystems/ramfs-rootfs-initramfs.html, > > +documentation} on them. >=20 > The =E2=80=9Con them=E2=80=9D at the end sounds like a leftover. But I am= no native speaker. >=20 The "on them" is fine IMO because it clarifies what part of the documentation is being referred to. In info(1), the sentence gets rendered as: For more information on initrds see the GNU/Linux kernel documentation ($URL) on them. But, according to the texinfo docs, for HTML it gets rendered without the inline URL. It's just a matter of personal preference I guess. I have no strong opinion in either direction. > > + > > +A new-style initrd (for kernels greater than 2.6) containing one file > > +with leading path components can also be generated at run time. This > > +can be done by prefixing an argument with @code{newc:} followed by the > > +path of the file in the new initrd, a @code{:}, and then the GRUB file > > +path to the file data to be be included. > > + > > +For example: > > +@example > > +initrd newc:/etc/ssh/config:(hd0,2)/home/user/.ssh/config \ > > + newc:/etc/ssh/ssh_host_rsa_key:/etc/ssh/ssh_host_rsa_key \ > > + /boot/initrd.gz \ > > + newc:/init:/home/user/init.fixed > > +@end example > > + > > +This command will generate two new-style initrds on the fly. The first > > +contains the path @samp{/etc/ssh/config} with the contents of > > +@samp{(hd0,2)/home/user/.ssh/config} and the path > > +@samp{/etc/ssh/ssh_host_rsa_key} with the contents of > > +@samp{/etc/ssh/ssh_host_rsa_key} on the @var{root} device. Parent dire= ctory > > +paths will automatically be generated as needed. This first generated = initrd > > +will then have @samp{/boot/initrd.gz} concatenated after it. Next, ano= ther > > +new-style archive will be generated with the contents of @samp{/home/u= ser/init.fixed} > > +in the path @samp{/init} and appended to the previous concatenation. F= inally, > > +the result will be sent to the kernel when booted. > > + > > +Keep in mind that paths that comes later will take precendence. So in = the >=20 > 1. come later > 2. precedence >=20 Good catch. > > +example above, the generated path @samp{/init} will overwrite any @sam= p{/init} > > +in @samp{/boot/initrd.gz}. This can be useful when changing the main i= nitrd > > +is undesirable or difficult. > > @end deffn >=20 > (Today I learned something new. Nice feature.) >=20 > > =20 > > =20 > > @@ -4090,9 +4123,10 @@ also @ref{GNU/Linux}. > > Load, in order, all initial ramdisks for a Linux kernel image to be b= ooted in > > 16-bit mode, and set the appropriate parameters in the Linux setup ar= ea in > > memory. This may only be used after the @command{linux16} command > > -(@pxref{linux16}) has been run. See also @ref{GNU/Linux}. > > +(@pxref{linux16}) has been run. See also @ref{GNU/Linux} and the @com= mand{initrd} > > +(@pxref{initrd}) for more details. > > =20 > > -This command is only available on x86 systems. > > +This command is only available on the pc platform for x86 systems. > > @end deffn >=20 > Reviewed-by: Paul Menzel >=20 A v2 was posted July 3 [1], could you re-comment on there? - Oskari [1]: https://lists.gnu.org/archive/html/grub-devel/2023-07/msg00007.html >=20 > Kind regards, >=20 > Paul --bEImHlK9mCMTOApJ Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iHUEABYIAB0WIQQfOU+JeXjo4uxN6vCp8he9GGIfEQUCZMVpcgAKCRCp8he9GGIf EVQJAP9zIa9eEjoNiidotlLs1x6WPZ93EdMHQ6AzhDE+r+YFOQD/UjNKRUsqx9N4 F1TKYq9AY99M9TD/Vkp3RZiwmRbv9Q4= =e20P -----END PGP SIGNATURE----- --bEImHlK9mCMTOApJ--