From debbugs-submit-bounces@debbugs.gnu.org Sun Feb 27 16:03:56 2022 Received: (at 40998) by debbugs.gnu.org; 27 Feb 2022 21:03:56 +0000 Received: from localhost ([127.0.0.1]:59288 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nOQhw-0007W1-9v for submit@debbugs.gnu.org; Sun, 27 Feb 2022 16:03:56 -0500 Received: from hera.aquilenet.fr ([185.233.100.1]:55154) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nOQhv-0007Vo-38 for 40998@debbugs.gnu.org; Sun, 27 Feb 2022 16:03:55 -0500 Received: from localhost (localhost [127.0.0.1]) by hera.aquilenet.fr (Postfix) with ESMTP id 0CC54399; Sun, 27 Feb 2022 22:03:49 +0100 (CET) X-Virus-Scanned: Debian amavisd-new at aquilenet.fr Received: from hera.aquilenet.fr ([127.0.0.1]) by localhost (hera.aquilenet.fr [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id meyeWeM3lcF7; Sun, 27 Feb 2022 22:03:47 +0100 (CET) Received: from ribbon (91-160-117-201.subs.proxad.net [91.160.117.201]) by hera.aquilenet.fr (Postfix) with ESMTPSA id 6C7E322F; Sun, 27 Feb 2022 22:03:47 +0100 (CET) From: =?utf-8?Q?Ludovic_Court=C3=A8s?= To: Maxim Cournoyer Subject: Re: bug#40998: Guix System's initrd doesn't honor rootflags References: <20220219070155.1924-1-maxim.cournoyer@gmail.com> <20220219070155.1924-2-maxim.cournoyer@gmail.com> Date: Sun, 27 Feb 2022 22:03:47 +0100 In-Reply-To: <20220219070155.1924-2-maxim.cournoyer@gmail.com> (Maxim Cournoyer's message of "Sat, 19 Feb 2022 02:01:53 -0500") Message-ID: <87bkysuimk.fsf_-_@gnu.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.2 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Spamd-Bar: / Authentication-Results: hera.aquilenet.fr; none X-Rspamd-Server: hera X-Rspamd-Queue-Id: 0CC54399 X-Spamd-Result: default: False [-0.10 / 15.00]; ARC_NA(0.00)[]; RCVD_VIA_SMTP_AUTH(0.00)[]; FROM_HAS_DN(0.00)[]; TO_DN_SOME(0.00)[]; FREEMAIL_ENVRCPT(0.00)[gmail.com]; TO_MATCH_ENVRCPT_ALL(0.00)[]; TAGGED_RCPT(0.00)[]; MIME_GOOD(-0.10)[text/plain]; RCPT_COUNT_TWO(0.00)[2]; FREEMAIL_TO(0.00)[gmail.com]; FROM_EQ_ENVFROM(0.00)[]; MIME_TRACE(0.00)[0:+]; RCVD_COUNT_TWO(0.00)[2]; RCVD_TLS_ALL(0.00)[]; MID_RHS_MATCH_FROM(0.00)[] X-Spam-Score: 1.0 (+) X-Debbugs-Envelope-To: 40998 Cc: 40998@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.0 (/) Hi, Maxim Cournoyer skribis: > -(define (bootable-kernel-arguments system root-device) > - "Return a list of kernel arguments (gexps) to boot SYSTEM from ROOT-DE= VICE." > - (list (string-append "--root=3D" > +(define* (bootable-kernel-arguments system root-device version) > + "Return a list of kernel arguments (gexps) to boot SYSTEM from ROOT-DE= VICE. > +VERSION is the target version of the boot-parameters record." > + ;; If the version is newer than 0, we use the new style initrd paramet= er > + ;; names, otherwise we use the legacy ones. This is to maintain backw= ard > + ;; compatibility when producing bootloader configurations for older > + ;; generations. > + (define version>0? (> version 0)) > + (list (string-append (if version>0? "root=3D" "--root=3D") > ;; 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)) > - #~(string-append "--system=3D" #$system) > - #~(string-append "--load=3D" #$system "/boot"))) > + #~(string-append (if #$version>0? "gnu.system=3D" "--system=3D")= #$system) > + #~(string-append (if #$version>0? "gnu.load=3D" "--load=3D") > + #$system "/boot"))) This is the logic I was suggesting to move to =E2=80=98read-boot-parameters= =E2=80=99. To do that, =E2=80=98read-boot-parameters=E2=80=99 would have to fill the =E2=80=98kernel-arguments=E2=80=99 field of such that it = already contains --system/gnu.system and --load/gnu.load. And then =E2=80=98read-boot-parameters-file=E2=80=99 would become: (call-with-input-file (string-append system "/parameters") read-boot-parameters) without the post-processing step it=E2=80=99s currently doing. (And the version number doesn=E2=80=99t need to flow beyond =E2=80=98read-boot-parameters=E2=80=99.) WDYT? Ludo=E2=80=99.