From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp12.migadu.com ([2001:41d0:2:bcc0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms0.migadu.com with LMTPS id mD/KNYa8D2Jn/QAAgWs5BA (envelope-from ) for ; Fri, 18 Feb 2022 16:34:30 +0100 Received: from aspmx1.migadu.com ([2001:41d0:2:bcc0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp12.migadu.com with LMTPS id cFlAMoa8D2LzwgAAauVa8A (envelope-from ) for ; Fri, 18 Feb 2022 16:34:30 +0100 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by aspmx1.migadu.com (Postfix) with ESMTPS id 6AD03351FD for ; Fri, 18 Feb 2022 16:34:30 +0100 (CET) Received: from localhost ([::1]:51092 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1nL5HB-0007zn-1v for larch@yhetil.org; Fri, 18 Feb 2022 10:34:29 -0500 Received: from eggs.gnu.org ([209.51.188.92]:55558) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nL5Gk-0007yj-QP for bug-guix@gnu.org; Fri, 18 Feb 2022 10:34:02 -0500 Received: from debbugs.gnu.org ([209.51.188.43]:34105) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1nL5Gk-0005F1-HB for bug-guix@gnu.org; Fri, 18 Feb 2022 10:34:02 -0500 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1nL5Gk-00025K-AC for bug-guix@gnu.org; Fri, 18 Feb 2022 10:34:02 -0500 X-Loop: help-debbugs@gnu.org Subject: bug#40998: [PATCH 1/3] initrd: Rename the '--root' initrd option to just 'root'. References: <87r1w3kbi0.fsf@hurd.i-did-not-set--mail-host-address--so-tickle-me> In-Reply-To: <87r1w3kbi0.fsf@hurd.i-did-not-set--mail-host-address--so-tickle-me> Resent-From: Maxim Cournoyer Original-Sender: "Debbugs-submit" Resent-CC: bug-guix@gnu.org Resent-Date: Fri, 18 Feb 2022 15:34:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 40998 X-GNU-PR-Package: guix X-GNU-PR-Keywords: To: 40998@debbugs.gnu.org Received: via spool by 40998-submit@debbugs.gnu.org id=B40998.16451984167942 (code B ref 40998); Fri, 18 Feb 2022 15:34:02 +0000 Received: (at 40998) by debbugs.gnu.org; 18 Feb 2022 15:33:36 +0000 Received: from localhost ([127.0.0.1]:56226 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nL5GJ-000242-HL for submit@debbugs.gnu.org; Fri, 18 Feb 2022 10:33:36 -0500 Received: from mail-qv1-f49.google.com ([209.85.219.49]:45623) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nL5GI-00023n-3L for 40998@debbugs.gnu.org; Fri, 18 Feb 2022 10:33:34 -0500 Received: by mail-qv1-f49.google.com with SMTP id c14so15370323qvl.12 for <40998@debbugs.gnu.org>; Fri, 18 Feb 2022 07:33:34 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=nxoMe9CKrZQVeDXHj7Flr5en22PY7mQ90Kfdv9QLTDg=; b=Sn9NfWJivb5bzxdbgT7Z5zDe0WPR2PIHbGn9irlKZb0vxKwdEL42wZd+h1pewt6w/j KT/vDVrSrTu0Hwq1Fbb6mMa4PrsUBHck2b2hnK1tZG16PZVnGEIAKgmt2n07Fp6iUiX9 YX8sgsDDm1vxjZUiCzD09/yl64TQ1sk06doWHf+Na3tYJ+CBkQ1wWEQPiyhtMsf5FxN5 lJkm1WB4EUSAp+Z5VQiKFlkBHbipTU7Qm39r4AzszuuxZ7nxNfdBtJszVgjn+q9D8VVh 3ZddiqOC9yttVxj6mIh2J/rFrF0BPrwKujRED4OYVrGFcJmAkWoo05izsQx08M4kbWQq iQMQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=nxoMe9CKrZQVeDXHj7Flr5en22PY7mQ90Kfdv9QLTDg=; b=PczgydR4ByDex+ltxtG6CYcvQJg5mYH+9h5IPhx/1H1JFKuyxI6wvXY4bL19MN27yo hvslUIXGpesB6gpaNefr7jX6/vF/G13nkjjHknuQzjc2qwqAzCtYKXwWPKp2E5+O0JCs v4g8YW3eXUTy46B3ZbwqEPbCi0imcWH6ER6nXX+Xsv+fE6qxYtbgwEGbE/oYxfFZap+3 rNybzujl2znHqk5L3t8uF94vItYe5DkH9T96dlDgk5h4yqK4TP2og9g6lzwySMtrSFZD wd7UReytW7Tf+nKp9s3I+67JtN/ZVsYzz4Cs6gAlqEEa4jbUK7cJr1WXsiqKv0n9PnxZ v48Q== X-Gm-Message-State: AOAM533kMnAM1bLlCOxk9JGU+pSeAD1HIQ8n8BnP8irOndK2r9AQzTsb SjsHPdgdBWtpYOg5PNbC4mvfYBGDpCo= X-Google-Smtp-Source: ABdhPJycEr14orumG7Y27ReKO17Ci6IZpsQ46n2+8Y9HaHS2HGvIISnW09M0+ueMR/LFwjksk4paiw== X-Received: by 2002:a05:6214:1183:b0:42c:1a57:2ee5 with SMTP id t3-20020a056214118300b0042c1a572ee5mr6194190qvv.59.1645198407851; Fri, 18 Feb 2022 07:33:27 -0800 (PST) Received: from localhost.localdomain (dsl-149-79.b2b2c.ca. [66.158.149.79]) by smtp.gmail.com with ESMTPSA id y21sm3726781qtn.62.2022.02.18.07.33.26 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 18 Feb 2022 07:33:27 -0800 (PST) From: Maxim Cournoyer Date: Fri, 18 Feb 2022 10:33:21 -0500 Message-Id: <20220218153323.29393-1-maxim.cournoyer@gmail.com> X-Mailer: git-send-email 2.34.0 MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-guix@gnu.org List-Id: Bug reports for GNU Guix List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Maxim Cournoyer Errors-To: bug-guix-bounces+larch=yhetil.org@gnu.org Sender: "bug-Guix" X-Migadu-Flow: FLOW_IN X-Migadu-Country: US ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1645198470; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding:resent-cc: resent-from:resent-sender:resent-message-id:in-reply-to:in-reply-to: references:references:list-id:list-help:list-unsubscribe: list-subscribe:list-post:dkim-signature; bh=nxoMe9CKrZQVeDXHj7Flr5en22PY7mQ90Kfdv9QLTDg=; b=B9o164b56P2+5dRCVLb3doPgFec1iZhA0LJwXy7QjF9rvgEBVQF1fkq4gC/n3J4hst9DDt 6OsD+J4mZS+LQ/4fBZwf6My/F27UlBuS2HJkJEa9SdK2+6JS71Qgl5H9irLTzYXqE4qndT E8enKPVmVt5oLGdooWHxvCiQaBqJbbHiFtU4hVhxnml7h5uP/26nsf0EhMyN5MG5qAumw3 QEuF99hxKGIv5a/bq+RTLzgkz6+kauwHobPW34EEO9X9pWrnwrft4bkNULvnWQhzcWesYh kpfCalgebD4tT6SxzY/CU/9YlK03Cio9pBsh9PtaezEe11dbUCe+MKVYZ02FAg== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1645198470; a=rsa-sha256; cv=none; b=sNTvdKmrJWoNF7nx5tZezFXcTZFrquY81iWrjxWZJyOSbRlz9G5djbr8zhTpPa7pQ8/V+j ewNJ6BzPZ95Wj8saJNbH1OPi5PRKX2TzHS+uEVe99YcCioEcUWiL14EF29yL3+TeDM2sXX t0RZsPeE8EgprDukYzZqgcTRWwkct4j1ZRFaP2YkUJgiozaVrNkgPIWrvV8C7o7gji4Bmp 4uB/qWt7Kyr0ZyZC/PUZWMQLlvGg9HWKheTLiyZxgzN6qcNuRi8t+wHzPy7wR/kcSFmRpv T/bB2Jfdd7MafhmlM8c3ChBOhK1Wh2Kbhtjj/TWHCfCvZqG2XSFAfeYX85Ckpw== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=gmail.com header.s=20210112 header.b=Sn9NfWJi; dmarc=fail reason="SPF not aligned (relaxed)" header.from=gmail.com (policy=none); spf=pass (aspmx1.migadu.com: domain of "bug-guix-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="bug-guix-bounces+larch=yhetil.org@gnu.org" X-Migadu-Spam-Score: -3.03 Authentication-Results: aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=gmail.com header.s=20210112 header.b=Sn9NfWJi; dmarc=fail reason="SPF not aligned (relaxed)" header.from=gmail.com (policy=none); spf=pass (aspmx1.migadu.com: domain of "bug-guix-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="bug-guix-bounces+larch=yhetil.org@gnu.org" X-Migadu-Queue-Id: 6AD03351FD X-Spam-Score: -3.03 X-Migadu-Scanner: scn0.migadu.com X-TUID: sCuEwrB9Yl5L 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{} 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 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 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 record that describes the boot parameters of OS. When SYSTEM-KERNEL-ARGUMENTS? is true, add kernel arguments -such as '--root' and '--load' to ." +such as 'root' and '--load' to ." (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 record denoting the desired -- 2.34.0