From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp2.migadu.com ([2001:41d0:700:3204::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms8.migadu.com with LMTPS id yN3sCMLWnWUjBgEAkFu2QA (envelope-from ) for ; Wed, 10 Jan 2024 00:29:06 +0100 Received: from aspmx1.migadu.com ([2001:41d0:303:e224::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp2.migadu.com with LMTPS id 6IxvAsLWnWV9ggAAe85BDQ (envelope-from ) for ; Wed, 10 Jan 2024 00:29:06 +0100 X-Envelope-To: larch@yhetil.org Authentication-Results: aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=gnu.org header.s=fencepost-gnu-org header.b=NNLuOif4; spf=pass (aspmx1.migadu.com: domain of "guix-patches-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="guix-patches-bounces+larch=yhetil.org@gnu.org"; dmarc=pass (policy=none) header.from=gnu.org ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1704842945; 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=kaG3Vv3GTDnfnWb7+XcunQTEYnJh5Vb91PJvEFrxFno=; b=PpJiUkGHiiu6mG74x4M+G9WJHiNVNKWMjcgvqdVAf1mucsRu0gVLYkg/7cFurA3JmJ4vZj Rphqt5qD0IYrsTVoXRWeotSYL28DNSbQ5ez5mXG09TxDp0r1lsBC4GTZ6iEr8GfzzOnlk4 qEaQTn6qBw/1yvMIg5bnNtZPkRd28P6WGOT/pRFuOlEGoa2wzlSYgHHAbHy0lYeBrhLDSz Ddl8ZiOklY9SIxKpUQTJnlWyUIfbObgJzdwuZw30j58RQsoRtOc5WsI/Q0/6WOYCYqLeUs /t11ZDOMm4R3bp2rxBGbJ2FS6OvCz+oLBXTXW50vecmy/uhYgWwUtqtahQP+wQ== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1704842945; a=rsa-sha256; cv=none; b=fqf74VM/FaW5H3O1c42QZkADIb/jlxPRIZyBrUhAb8d5rl0qFonSw5d3i3Ix+8KC3Zat8I B42+yX+P1WzNLXmTve2FpQ7/JeV7BihZ6zgD+jWdZ07R0T2EPed6XMiXtmkK4FdLp8Yaof roYDPXt0I7jmjUKsmsSjemoKOqtrgx6+vEEgcMbArA7MaSB+MqHyjDefdDYgemJ85SmSCZ Nx+MN9U5oVadHlRf71cgvqRII+tXTKm5LOx6ze9Kci0Y8UlKYEz20yDNBJxEVOZCFTxYnf 1cZbUbeGea4URmav5yLgVI96Upz2G4iezYiPRxbJcJLHfGP2AysV1dii3ee9qg== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=gnu.org header.s=fencepost-gnu-org header.b=NNLuOif4; spf=pass (aspmx1.migadu.com: domain of "guix-patches-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="guix-patches-bounces+larch=yhetil.org@gnu.org"; dmarc=pass (policy=none) header.from=gnu.org 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 D198535AEF for ; Wed, 10 Jan 2024 00:29:05 +0100 (CET) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1rNLWi-0006DC-ND; Tue, 09 Jan 2024 18:28:56 -0500 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 1rNLWh-0006BT-Ip for guix-patches@gnu.org; Tue, 09 Jan 2024 18:28:55 -0500 Received: from debbugs.gnu.org ([2001:470:142:5::43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1rNLWh-00088J-9g for guix-patches@gnu.org; Tue, 09 Jan 2024 18:28:55 -0500 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1rNLWn-0001A7-RE for guix-patches@gnu.org; Tue, 09 Jan 2024 18:29:01 -0500 X-Loop: help-debbugs@gnu.org Subject: [bug#65002] [PATCH v2 2/2] gnu: bootloader: grub: Add support for loading an additional initrd Resent-From: Ludovic =?UTF-8?Q?Court=C3=A8s?= Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Tue, 09 Jan 2024 23:29:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 65002 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: Tomas Volf Cc: 65002@debbugs.gnu.org Received: via spool by 65002-submit@debbugs.gnu.org id=B65002.17048429194436 (code B ref 65002); Tue, 09 Jan 2024 23:29:01 +0000 Received: (at 65002) by debbugs.gnu.org; 9 Jan 2024 23:28:39 +0000 Received: from localhost ([127.0.0.1]:41322 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rNLWR-00019U-85 for submit@debbugs.gnu.org; Tue, 09 Jan 2024 18:28:39 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:38746) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rNLWP-00019H-1w for 65002@debbugs.gnu.org; Tue, 09 Jan 2024 18:28:38 -0500 Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1rNLWB-0007yt-No; Tue, 09 Jan 2024 18:28:23 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=MIME-Version:Date:References:In-Reply-To:Subject:To: From; bh=kaG3Vv3GTDnfnWb7+XcunQTEYnJh5Vb91PJvEFrxFno=; b=NNLuOif4LQINI9UmpMrP NzfvHVTw4xRoTzL3s8KCfHU2jWe2UZT07VdDGpbpMmF4JyiD6hr6PnCknK8ZaldULOlRzUi5lyHA0 ONz5r3PfIUNDHcDV7//7Agoem4HPD59nxzc8VeNM+qhKwhpho+kjVAngavHQL4O45OHxcutmBmGtQ rvAKiMxv5i2uDsELsdIT7M+AU5AB6KTnOHXo8Lx+eCqHJTS1Yl4q7Wv658SdQpHI2B2px0gLFnYiP frHvD+A6v7YYGSvB+6eJDykZr1MzbzyGDdJ/63l2xK0a4WzAKi9H3bcSVMCtFdZEldXom4DJVETxu EpH5vjVI9Hmv7A==; From: Ludovic =?UTF-8?Q?Court=C3=A8s?= In-Reply-To: (Tomas Volf's message of "Wed, 2 Aug 2023 15:02:45 +0200") References: <058b41c5060e1811048fe44c20278c64fdfc3ece.1690981365.git.wolf@wolfsden.cz> Date: Wed, 10 Jan 2024 00:28:18 +0100 Message-ID: <87edeqw0h9.fsf@gnu.org> User-Agent: Gnus/5.13 (Gnus v5.13) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: guix-patches@gnu.org List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-patches-bounces+larch=yhetil.org@gnu.org Sender: guix-patches-bounces+larch=yhetil.org@gnu.org X-Migadu-Flow: FLOW_IN X-Migadu-Country: US X-Migadu-Spam-Score: -5.51 X-Spam-Score: -5.51 X-Migadu-Queue-Id: D198535AEF X-Migadu-Scanner: mx12.migadu.com X-TUID: 9INfnIcIc1lz Tomas Volf skribis: > In order to be able to provide decryption keys for the LUKS device, they = need > to be available in the initial ram disk. However they cannot be stored i= nside > the usual initrd, since it is stored in the store and being a > world-readable (as files in the store are) is not a desired property for a > initrd containing decryption keys. This explanation should go in the manual IMO (it=E2=80=99s already partly t= here). > This commit adds an option to load additional initrd during the boot, > one that is not stored inside the store and therefore can contain > secrets. > > Since only grub supports encrypted /boot, only grub is modified to use the > extra-initrd. There is no use case for the other bootloaders. > > * doc/guix.texi (Bootloader Configuration): Describe the new extra-initrd > field. > * gnu/bootloader.scm: Add extra-initrd field to bootloader-configuration > * gnu/bootloader/grub.scm: Use the new extra-initrd field It=E2=80=99d be great if you could specify the entities changes in each file (which variable/procedure is changed, what is added/removed). A committer can do it on your behalf later if you=E2=80=99re unsure. > +@item @code{extra-initrd} (default: @code{#f}) > +Path to an additional initrd to load. Should not point to a file in the s/Path/File name/ (by convention) Please make full sentences. =E2=80=9CShould not=E2=80=9D is probably too s= trong; perhaps: =E2=80=9CIt may or may not point to a file in the store, but the m= ain use case is for out-of-store files containing secrets.=E2=80=9D > +store. Typical use case is making keys to unlock LUKS device available Add a line break after =E2=80=9Cstore.=E2=80=9D to distinguish the referenc= e from the discussion of one possible use case. > +during the boot process. For any use case not involving secrets, you > +should use regular initrd (@pxref{operating-system Reference, > +@code{initrd}}) instead. > + > +Suitable image can be created for example like this: > + > +@example > +echo /key-file.bin | cpio -oH newc >/key-file.cpio > +chmod 0000 /key-file.cpio > +@end example > + > +Be careful when using this option, since pointing to a file that is not > +readable by the grub while booting will cause the boot to fail and > +require a manual edit of the initrd line in the grub menu. > + > +Currently only supported by grub. s/grub/GRUB/ Would be great if you could include also a short config example here, or add a cross-reference to the example for =E2=80=98luks-device-mapping-with-options=E2=80=99 if that covers both. > + (extra-initrd bootloader-configuration-extra-initrd > + (default #f)) ;string | #f > + ) No lonely paren please. :-) Otherwise LGTM. Could you send updated patches with these minor changes? Thanks! Ludo=E2=80=99.