unofficial mirror of bug-guix@gnu.org 
 help / color / mirror / code / Atom feed
From: Maxim Cournoyer <maxim.cournoyer@gmail.com>
To: 40998@debbugs.gnu.org
Cc: Maxim Cournoyer <maxim.cournoyer@gmail.com>
Subject: bug#40998: [PATCH 1/3] initrd: Rename the '--root' initrd option to just 'root'.
Date: Fri, 18 Feb 2022 10:33:21 -0500	[thread overview]
Message-ID: <20220218153323.29393-1-maxim.cournoyer@gmail.com> (raw)
In-Reply-To: <87r1w3kbi0.fsf@hurd.i-did-not-set--mail-host-address--so-tickle-me>

This is to make it less surprising, given the common convention sets forth by
the kernel Linux command-line parameters.

* gnu/build/linux-boot.scm (boot-system): Rename the '--root' option to
'root'.  Adjust doc.
* gnu/installer/parted.scm (installer-root-partition-path): Use 'root' instead
of '--root'.
* gnu/system.scm (bootable-kernel-arguments): Likewise.
(operating-system-boot-parameters): Adjust doc.
(operating-system-boot-parameters-file): Likewise.
* gnu/system/linux-initrd.scm (base-initrd): Likewise.
* doc/guix.texi: Adjust doc.
---
 doc/guix.texi               |  6 +++---
 gnu/build/linux-boot.scm    | 20 ++++++++++----------
 gnu/installer/parted.scm    |  2 +-
 gnu/system.scm              |  8 ++++----
 gnu/system/linux-initrd.scm |  4 ++--
 5 files changed, 20 insertions(+), 20 deletions(-)

diff --git a/doc/guix.texi b/doc/guix.texi
index a4145af7fd..ba613ea31f 100644
--- a/doc/guix.texi
+++ b/doc/guix.texi
@@ -34909,7 +34909,7 @@ Guix uses this option to yield control to a boot program that runs the
 service activation programs and then spawns the GNU@tie{}Shepherd, the
 initialization system.
 
-@item --root=@var{root}
+@item root=@var{root}
 Mount @var{root} as the root file system.  @var{root} can be a device
 name like @code{/dev/sda1}, a file system label, or a file system UUID.
 When unspecified, the device name from the root file system of the
@@ -34967,7 +34967,7 @@ here is how to use it and customize it further.
        [#:helper-packages '()] [#:qemu-networking? #f] [#:volatile-root? #f]
 Return a derivation that builds a raw initrd.  @var{file-systems} is
 a list of file systems to be mounted by the initrd, possibly in addition to
-the root file system specified on the kernel command line via @option{--root}.
+the root file system specified on the kernel command line via @option{root}.
 @var{linux-modules} is a list of kernel modules to be loaded at boot time.
 @var{mapped-devices} is a list of device mappings to realize before
 @var{file-systems} are mounted (@pxref{Mapped Devices}).
@@ -34997,7 +34997,7 @@ to it are lost.
 Return as a file-like object a generic initrd, with kernel
 modules taken from @var{linux}.  @var{file-systems} is a list of file-systems to be
 mounted by the initrd, possibly in addition to the root file system specified
-on the kernel command line via @option{--root}.  @var{mapped-devices} is a list of device
+on the kernel command line via @option{root}.  @var{mapped-devices} is a list of device
 mappings to realize before @var{file-systems} are mounted.
 
 When true, @var{keyboard-layout} is a @code{<keyboard-layout>} record denoting
diff --git a/gnu/build/linux-boot.scm b/gnu/build/linux-boot.scm
index 0ae316849e..d36601d824 100644
--- a/gnu/build/linux-boot.scm
+++ b/gnu/build/linux-boot.scm
@@ -499,12 +499,12 @@ (define* (boot-system #:key
 KEYMAP-FILE is true), then setting up QEMU guest networking if
 QEMU-GUEST-NETWORKING? is true, calling PRE-MOUNT, mounting the file systems
 specified in MOUNTS, and finally booting into the new root if any.  The initrd
-supports kernel command-line options '--load', '--root', and '--repl'.  It
-also honors a subset of the documented Linux kernel command-line parameters
-such as 'fsck.mode', 'resume' and 'rootdelay'.
+supports kernel command-line options '--load' and '--repl'.  It also honors a
+subset of the Linux kernel command-line parameters such as 'fsck.mode',
+'resume', 'root' and 'rootdelay'.
 
-Mount the root file system, specified by the '--root' command-line argument,
-if any.
+Mount the root file system, specified by the 'root' command-line argument, if
+any.
 
 MOUNTS must be a list of <file-system> objects.
 
@@ -517,9 +517,9 @@ (define (root-mount-point? fs)
     (string=? (file-system-mount-point fs) "/"))
 
   (define (device-string->file-system-device device-string)
-    ;; The "--root=SPEC" kernel command-line option always provides a
-    ;; string, but the string can represent a device, an nfs-root, a UUID, or a
-    ;; label.  So check for all four.
+    ;; The "root=SPEC" kernel command-line option always provides a string,
+    ;; but the string can represent a device, an nfs-root, a UUID, or a label.
+    ;; So check for all four.
     (cond ((string-prefix? "/" device-string) device-string)
           ((string-contains device-string ":/") device-string) ; nfs-root
           ((uuid device-string) => identity)
@@ -533,9 +533,9 @@ (define (device-string->file-system-device device-string)
       (mount-essential-file-systems)
       (let* ((args    (linux-command-line))
              (to-load (find-long-option "--load" args))
-             ;; If present, ‘--root’ on the kernel command line takes precedence
+             ;; If present, ‘root’ on the kernel command line takes precedence
              ;; over the ‘device’ field of the root <file-system> record.
-             (root-device (and=> (find-long-option "--root" args)
+             (root-device (and=> (find-long-option "root" args)
                                  device-string->file-system-device))
              (root-fs (or (find root-mount-point? mounts)
                           ;; Fall back to fictitious defaults.
diff --git a/gnu/installer/parted.scm b/gnu/installer/parted.scm
index e33ef5f8fd..94ef9b42bc 100644
--- a/gnu/installer/parted.scm
+++ b/gnu/installer/parted.scm
@@ -348,7 +348,7 @@ (define (remove-logical-devices)
 (define (installer-root-partition-path)
   "Return the root partition path, or #f if it could not be detected."
   (let* ((cmdline (linux-command-line))
-         (root (find-long-option "--root" cmdline)))
+         (root (find-long-option "root" cmdline)))
     (and root
          (or (and (access? root F_OK) root)
              (find-partition-by-label root)
diff --git a/gnu/system.scm b/gnu/system.scm
index cc925de16f..f14186a64f 100644
--- a/gnu/system.scm
+++ b/gnu/system.scm
@@ -187,9 +187,9 @@ (define-module (gnu system)
 
 (define (bootable-kernel-arguments system root-device)
   "Return a list of kernel arguments (gexps) to boot SYSTEM from ROOT-DEVICE."
-  (list (string-append "--root="
+  (list (string-append "root="
                        ;; Note: Always use the DCE format because that's what
-                       ;; (gnu build linux-boot) expects for the '--root'
+                       ;; (gnu build linux-boot) expects for the 'root'
                        ;; kernel command-line option.
                        (file-system-device->string root-device
                                                    #:uuid-type 'dce))
@@ -1441,7 +1441,7 @@ (define* (operating-system-boot-parameters os root-device
                                            #:key system-kernel-arguments?)
   "Return a monadic <boot-parameters> record that describes the boot
 parameters of OS.  When SYSTEM-KERNEL-ARGUMENTS? is true, add kernel arguments
-such as '--root' and '--load' to <boot-parameters>."
+such as 'root' and '--load' to <boot-parameters>."
   (let* ((initrd          (and (not (operating-system-hurd os))
                                (operating-system-initrd-file os)))
          (store           (operating-system-store-file-system os))
@@ -1487,7 +1487,7 @@ (define* (operating-system-boot-parameters-file os
    "Return a file that describes the boot parameters of OS.  The primary use of
 this file is the reconstruction of GRUB menu entries for old configurations.
 
-When SYSTEM-KERNEL-ARGUMENTS? is true, add kernel arguments such as '--root'
+When SYSTEM-KERNEL-ARGUMENTS? is true, add kernel arguments such as 'root'
 and '--load' to the returned file (since the returned file is then usually
 stored into the content-addressed \"system\" directory, it's usually not a
 good idea to give it because the content hash would change by the content hash
diff --git a/gnu/system/linux-initrd.scm b/gnu/system/linux-initrd.scm
index 329cd38cd6..4c4c78e444 100644
--- a/gnu/system/linux-initrd.scm
+++ b/gnu/system/linux-initrd.scm
@@ -181,7 +181,7 @@ (define* (raw-initrd file-systems
   "Return as a file-like object a raw initrd, with kernel
 modules taken from LINUX.  FILE-SYSTEMS is a list of file-systems to be
 mounted by the initrd, possibly in addition to the root file system specified
-on the kernel command line via '--root'. LINUX-MODULES is a list of kernel
+on the kernel command line via 'root'.  LINUX-MODULES is a list of kernel
 modules to be loaded at boot time. MAPPED-DEVICES is a list of device
 mappings to realize before FILE-SYSTEMS are mounted.
 HELPER-PACKAGES is a list of packages to be copied in the initrd. It may include
@@ -375,7 +375,7 @@ (define* (base-initrd file-systems
   "Return as a file-like object a generic initrd, with kernel
 modules taken from LINUX.  FILE-SYSTEMS is a list of file-systems to be
 mounted by the initrd, possibly in addition to the root file system specified
-on the kernel command line via '--root'.  MAPPED-DEVICES is a list of device
+on the kernel command line via 'root'.  MAPPED-DEVICES is a list of device
 mappings to realize before FILE-SYSTEMS are mounted.
 
 When true, KEYBOARD-LAYOUT is a <keyboard-layout> record denoting the desired
-- 
2.34.0





  reply	other threads:[~2022-02-18 15:34 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-05-01 13:53 bug#40998: Guix System's initrd doesn't honor rootflags maxim.cournoyer
2022-02-18 15:33 ` Maxim Cournoyer [this message]
2022-02-18 15:33   ` bug#40998: [PATCH 2/3] initrd: Honor rootfstype and rootflags command-line parameters Maxim Cournoyer
2022-02-18 15:33   ` bug#40998: [PATCH 3/3] initrd: Print its " Maxim Cournoyer
2022-02-19  7:01 ` bug#40998: [PATCH v2 1/4] system: Add a version field to the <boot-parameters> record Maxim Cournoyer
2022-02-19  7:01   ` bug#40998: [PATCH v2 2/4] initrd: Use non-hyphenated kernel command-line parameter names Maxim Cournoyer
2022-02-27 21:03     ` bug#40998: Guix System's initrd doesn't honor rootflags Ludovic Courtès
2022-02-28 20:31       ` Maxim Cournoyer
2022-02-19  7:01   ` bug#40998: [PATCH v2 3/4] initrd: Honor rootfstype and rootflags command-line parameters Maxim Cournoyer
2022-02-27 21:06     ` bug#40998: Guix System's initrd doesn't honor rootflags Ludovic Courtès
2022-02-19  7:01   ` bug#40998: [PATCH v2 4/4] initrd: Print its command-line parameters Maxim Cournoyer
2022-02-27 21:08     ` bug#40998: Guix System's initrd doesn't honor rootflags Ludovic Courtès
2022-02-28 20:36       ` Maxim Cournoyer
2022-02-28  3:45     ` bug#40998: [PATCH v2 4/4] initrd: Print its command-line parameters Tobias Geerinckx-Rice via Bug reports for GNU Guix
2022-02-28 15:54       ` Maxim Cournoyer
2022-02-27 20:54   ` bug#40998: Guix System's initrd doesn't honor rootflags Ludovic Courtès
2022-02-28 20:02     ` Maxim Cournoyer
2022-02-28 21:15       ` Ludovic Courtès
2022-02-28 21:45         ` Maxim Cournoyer

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

  List information: https://guix.gnu.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20220218153323.29393-1-maxim.cournoyer@gmail.com \
    --to=maxim.cournoyer@gmail.com \
    --cc=40998@debbugs.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.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/guix.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).