From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp10.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms5.migadu.com with LMTPS id UNyGJDinb2NZNwAAbAwnHQ (envelope-from ) for ; Sat, 12 Nov 2022 15:01:28 +0100 Received: from aspmx1.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp10.migadu.com with LMTPS id 6OWpIzinb2MJKQEAG6o9tA (envelope-from ) for ; Sat, 12 Nov 2022 15:01:28 +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 450A5DFC3 for ; Sat, 12 Nov 2022 15:01:28 +0100 (CET) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1otr4V-0006Zm-HZ; Sat, 12 Nov 2022 09:01:23 -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 1otr4C-0006TD-1I for guix-patches@gnu.org; Sat, 12 Nov 2022 09:01:05 -0500 Received: from debbugs.gnu.org ([209.51.188.43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1otr4A-0007MG-8C for guix-patches@gnu.org; Sat, 12 Nov 2022 09:01:03 -0500 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1otr4A-0002l5-3Z for guix-patches@gnu.org; Sat, 12 Nov 2022 09:01:02 -0500 X-Loop: help-debbugs@gnu.org Subject: [bug#59066] [PATCH v2] linux-initrd: raw-initrd: Add keyword argument #:pre-mount. Resent-From: Hilton Chain Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Sat, 12 Nov 2022 14:01:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 59066 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: Ludovic =?UTF-8?Q?Court=C3=A8s?= Cc: 59066@debbugs.gnu.org Received: via spool by 59066-submit@debbugs.gnu.org id=B59066.166826160610459 (code B ref 59066); Sat, 12 Nov 2022 14:01:02 +0000 Received: (at 59066) by debbugs.gnu.org; 12 Nov 2022 14:00:06 +0000 Received: from localhost ([127.0.0.1]:47588 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1otr3F-0002ib-TX for submit@debbugs.gnu.org; Sat, 12 Nov 2022 09:00:06 -0500 Received: from mail.boiledscript.com ([144.168.59.46]:47346) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1otr3E-0002hW-7K for 59066@debbugs.gnu.org; Sat, 12 Nov 2022 09:00:04 -0500 Date: Sat, 12 Nov 2022 21:59:26 +0800 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ultrarare.space; s=dkim; t=1668261597; h=from:from: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: in-reply-to:in-reply-to:references:references; bh=FY3CIqH8L5jQrs1YCeloacAyRxA+7Hni+ld8pWsKpy8=; b=oYSElN5X4gx40Iux/G8V1NiKgtdnwHoYYYuXZIUumDrWlvqmI28ZQ2S1rM3gmjxrvk61gN Z1XxU8IOiEX6+C2qnuHZwakIOkVvgVTlPRitv3oQ74+ACXbuqNcQPXCv662caEAItIMZiC iniPBjkC6xKVSf/knyz8iXdxgGPOacVoUJgVc0BBdX2dkxeNCTlD/9AMN19w/I+0AYeB7A v9thGp4odpVz96RbIHTziMUxz7vlcEDEFxvYHMrpRM09Azwi5Orx5fu11lFgUJJjxj6/l5 pwTDZykTRFWRKcDiShrsUIIjGzfztBEr0KsFksKu7qgSJD9Hph2J80JQRERnrQ== Message-ID: In-Reply-To: <87wn81dvog.fsf@gnu.org> References: <87wn81dvog.fsf@gnu.org> MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 8bit X-Spamd-Bar: / 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: , Reply-to: Hilton Chain X-ACL-Warn: , Hilton Chain via Guix-patches From: Hilton Chain via Guix-patches via 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 ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1668261688; h=from:from:sender:sender:reply-to: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=FY3CIqH8L5jQrs1YCeloacAyRxA+7Hni+ld8pWsKpy8=; b=gFuoeRIGkKHcMeNkt4Gn4H3qxQ+zf2Gl0adU7yzbd0i6RTl2lcs+FoUNSzEGxtkVdj5tyh 1GwZJYBvD6+TT7nW2C1M3PWeepPdK3FESbHmrIJtyL5oL7KraRG3/BHN4NlUHB1m67u6zp s1KT7+uQNsbdionxuQy9h9YJEeHfT8A8GvJg4w11I91kPzaXf4N8kV7br8qkHCMxe8p56I D2wrj/PflBifH4Ytcu4zxSaxNyP8LYCP5WhDVd8P0zl0sf3dts3bmOR1BBttRIZiYtQXeu UlkUNqDta83h+wy1o1DwIE85epwWk8ClaTJXL05AaNNocXp0r9IKlXxwOjryzw== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1668261688; a=rsa-sha256; cv=none; b=LUiY66ElrbTdIfOL6OprBHgZ0kNjJp4iMlYauU1oistfIgGEFo9eMR3sn8WasVp0f0Q3IR X2ASdLerplm+1Rha41ulLhw+eiv2Y2Q0ywc+WSFbCF0RFaczoRT/9gfskuO9/wR+79SSye FPyEPJ+dKoMbhRQYa7E0UXHB4dkUp7thpq/q3FinXxrgV+LdKod6DFDJtgGeU1WTB01kWB usm4lkenaon6mNolEGd3C7qb86M165Sx/ung2ffthpyeZVdFfClrVL26o7Ord10yytxwR/ XknTtjVRBJldKWNI/deGiwO3SUg9NRmYpD0OTtWSNjwGd4l4JdafeE4wmGz4BQ== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=ultrarare.space header.s=dkim header.b=oYSElN5X; dmarc=pass (policy=none) header.from=gnu.org; 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" X-Migadu-Spam-Score: -3.84 Authentication-Results: aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=ultrarare.space header.s=dkim header.b=oYSElN5X; dmarc=pass (policy=none) header.from=gnu.org; 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" X-Migadu-Queue-Id: 450A5DFC3 X-Spam-Score: -3.84 X-Migadu-Scanner: scn0.migadu.com X-TUID: WX5DyGgSOoVv * gnu/system/linux-initrd.scm (raw-initrd): Add keyword argument #:pre-mount. Document it. * doc/guix.texi (initial RAM disk): Likewise. --- v1 -> v2: 1. Use gexp instead of a list. 2. Documentation. Haven't begun my SSH test yet :P doc/guix.texi | 8 +++++--- gnu/system/linux-initrd.scm | 7 +++++-- 2 files changed, 10 insertions(+), 5 deletions(-) diff --git a/doc/guix.texi b/doc/guix.texi index 3f76184495..35eb128f6e 100644 --- a/doc/guix.texi +++ b/doc/guix.texi @@ -37844,15 +37844,17 @@ here is how to use it and customize it further. @cindex initrd @cindex initial RAM disk @deffn {Scheme Procedure} raw-initrd @var{file-systems} @ - [#:linux-modules '()] [#:mapped-devices '()] @ - [#:keyboard-layout #f] @ - [#:helper-packages '()] [#:qemu-networking? #f] [#:volatile-root? #f] + [#:linux-modules '()] [#:pre-mount #t] [#:mapped-devices '()] @ + [#:keyboard-layout #f] [#: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}. @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}). +@var{pre-mount} is a G-expression to evaluate before realizing +@var{mapped-devices}. @var{helper-packages} is a list of packages to be copied in the initrd. It may include @code{e2fsck/static} or other packages needed by the initrd to check diff --git a/gnu/system/linux-initrd.scm b/gnu/system/linux-initrd.scm index 4c4c78e444..58e95a1312 100644 --- a/gnu/system/linux-initrd.scm +++ b/gnu/system/linux-initrd.scm @@ -172,6 +172,7 @@ (define* (raw-initrd file-systems #:key (linux linux-libre) (linux-modules '()) + (pre-mount #t) (mapped-devices '()) (keyboard-layout #f) (helper-packages '()) @@ -183,7 +184,8 @@ (define* (raw-initrd file-systems 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 modules to be loaded at boot time. MAPPED-DEVICES is a list of device -mappings to realize before FILE-SYSTEMS are mounted. +mappings to realize before FILE-SYSTEMS are mounted. PRE-MOUNT is a +G-expression to evaluate before realizing MAPPED-DEVICES. HELPER-PACKAGES is a list of packages to be copied in the initrd. It may include e2fsck/static or other packages needed by the initrd to check root partition. @@ -255,7 +257,8 @@ (define kodir (map spec->file-system '#$(map file-system->spec file-systems)) #:pre-mount (lambda () - (and #$@device-mapping-commands + (and #$pre-mount + #$@device-mapping-commands #$@file-system-scan-commands)) #:linux-modules '#$linux-modules #:linux-module-directory '#$kodir base-commit: 2757de2e2b271d87f6f72ba4161c2225fbdc9e78 -- 2.38.1