From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp12.migadu.com ([2001:41d0:8:6d80::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms0.migadu.com with LMTPS id YCpUIUznG2KyBAAAgWs5BA (envelope-from ) for ; Sun, 27 Feb 2022 22:04:12 +0100 Received: from aspmx1.migadu.com ([2001:41d0:8:6d80::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp12.migadu.com with LMTPS id oB4FHkznG2LM0wAAauVa8A (envelope-from ) for ; Sun, 27 Feb 2022 22:04:12 +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 4EA323F40A for ; Sun, 27 Feb 2022 22:04:12 +0100 (CET) Received: from localhost ([::1]:53590 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1nOQiA-0003Of-Um for larch@yhetil.org; Sun, 27 Feb 2022 16:04:10 -0500 Received: from eggs.gnu.org ([209.51.188.92]:35606) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nOQi3-0003OU-31 for bug-guix@gnu.org; Sun, 27 Feb 2022 16:04:03 -0500 Received: from debbugs.gnu.org ([209.51.188.43]:37158) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1nOQi2-00036i-Qf for bug-guix@gnu.org; Sun, 27 Feb 2022 16:04:02 -0500 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1nOQi2-0007WL-JE for bug-guix@gnu.org; Sun, 27 Feb 2022 16:04:02 -0500 X-Loop: help-debbugs@gnu.org Subject: bug#40998: Guix System's initrd doesn't honor rootflags Resent-From: Ludovic =?UTF-8?Q?Court=C3=A8s?= Original-Sender: "Debbugs-submit" Resent-CC: bug-guix@gnu.org Resent-Date: Sun, 27 Feb 2022 21:04: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: patch To: Maxim Cournoyer Received: via spool by 40998-submit@debbugs.gnu.org id=B40998.164599583628897 (code B ref 40998); Sun, 27 Feb 2022 21:04:02 +0000 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: Ludovic =?UTF-8?Q?Court=C3=A8s?= 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: / 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-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: 40998@debbugs.gnu.org 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=1645995852; 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; bh=83z4GwnYGPGGfllucmFd+lqwKXGBz5dUpWlUvoGSm94=; b=Ulw51wBU2hWjOsO8P95gVAqf74h4JPuEbfTpWOoqeadcXN08oxPH6XsnWDlhbt4PLfko4x yUniCn1fWJ9E9PzDnP0urN0EVprqkUT117qQD6CDtmGGaOc0OQx3C0/UH8CwVFpQ2Vo33N 4fMF4tPY5us7sXAWSJPjCW5KHgzuRu7AsZaSnkD8ncXUPqhTaXm34Zjx+wH1rybZ1MFD24 RhfUuP6R+pV+7l4o3zfzbWf2a9JeSJDQGL/VQ00FT8SR65V0RNoW6dC7tL1xnUQsky7lnU pmH7Ak8lvMQjKqczVMpVd2nIQlY4kqDy6AlGADbygjzQfk+9fbJ1D6KUzFPH0g== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1645995852; a=rsa-sha256; cv=none; b=Wx/9Vfn5OpJqwxNaURClOYNNP6vGGfqKmtgZdABcGA4ud7vZzrHVn/rfdXnIZMvMZqxGaB +ohz6lX/plOL13bPHNLsldFZADNo4Eq6ndAgWakaRAwZPBFRFZuodcjToBYo9KwCBSYr9B iIJ+5oAtyjIyNPj0mGAZYZyy/uGGXBwPsYKnfyo+JhRGoiv401WcUTC29hpmIneSJDge74 CO2WMa5tWxpwbyg2Ed5ZoGAMSHOoKEK3AvxnJWITeMXfpE+4xLExPQ0edQbIFa+15aGXVZ 9ebxf9Tv8aObMv4uqLQ6mvT9Int6eMsDcs7tC+qqS+g3YkXjGRq3oYOGt12+WA== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=none; dmarc=pass (policy=none) header.from=gnu.org; 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: -5.10 Authentication-Results: aspmx1.migadu.com; dkim=none; dmarc=pass (policy=none) header.from=gnu.org; 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: 4EA323F40A X-Spam-Score: -5.10 X-Migadu-Scanner: scn0.migadu.com X-TUID: uGwRa4QMOZ8c 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.