From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp2.migadu.com ([2001:41d0:403:58f0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms8.migadu.com with LMTPS id yOQ5N0ZR3mWoewAAe85BDQ:P1 (envelope-from ) for ; Tue, 27 Feb 2024 22:16:55 +0100 Received: from aspmx1.migadu.com ([2001:41d0:403:58f0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp2.migadu.com with LMTPS id yOQ5N0ZR3mWoewAAe85BDQ (envelope-from ) for ; Tue, 27 Feb 2024 22:16:55 +0100 X-Envelope-To: larch@yhetil.org Authentication-Results: aspmx1.migadu.com; dkim=pass header.d=retrospec.tv header.s=fm3 header.b=KYv4bbgB; dkim=pass header.d=messagingengine.com header.s=fm1 header.b="c s/9AwV"; spf=pass (aspmx1.migadu.com: domain of "guix-devel-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="guix-devel-bounces+larch=yhetil.org@gnu.org"; dmarc=none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1709068614; 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: in-reply-to:in-reply-to:references:references:list-id:list-help: list-unsubscribe:list-subscribe:list-post:dkim-signature; bh=o05Y/TB+WO8PquUrX73mBv2D01W/kmAubtw8MNxJcEc=; b=ONfCOX95OBRpYgFE4daHMnmfIRVkpGMts90CsI8bSGiWYUjc5f5ucWEVPd8K3YJGg+jsZE TdSObD17S0KI8r3AtzUUpjc9VrXZh5A4l4qs2jE3+XYe9OjVKA/9XBcTu7QIZAzA8AjV+i l21GFyz61cWAXZBX4SqwDRF7pG2t01+sugCyNJIxrKlX05649XLSL4k2AGIHHakLEK6dlB /VVNF8R8tDhN63aw2osiQ5sReCtwj5VA70H7lUQIZU3J29yfZDl42u4iBauXu02ZikBTNq BNfie97Wen7HKXLWZGm4GFEIL/oBBHqqMmunLlQ3A+gaxXwfT3MU8ycjrPBe8g== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=pass header.d=retrospec.tv header.s=fm3 header.b=KYv4bbgB; dkim=pass header.d=messagingengine.com header.s=fm1 header.b="c s/9AwV"; spf=pass (aspmx1.migadu.com: domain of "guix-devel-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="guix-devel-bounces+larch=yhetil.org@gnu.org"; dmarc=none ARC-Seal: i=1; s=key1; d=yhetil.org; t=1709068614; a=rsa-sha256; cv=none; b=q/ogPMNIDHS13/GsLMTyfD/Cd7gqI9EPusfguGKSF4enPdem6Ml/1pR4PEWfmMwXQxmwE8 4n4ZVXT/r6uWnnejRnZUfcCNjmqncInea5LJIfk0bW0HRzSGkAw2nr9Dz0SWYNT+COD9u2 MkkBwXDfFd87Un9+W9w5MAICitaAi6inFmgtITJwwhMl18gSsfIN6BsBw1vBFnE/ELDvhb pAnWL0BdafR0hSmwMLg4le7xb15i589WM5daHssneQIVqzVVv6N0TCuAN0lfv4juUz81z1 RNlzVwuUXaon0nroK1L9nRywIBiOe++9ogcT9Ow2uBkUFfLaXv+4MNMNH1kZGQ== 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 101A86F521 for ; Tue, 27 Feb 2024 22:16:54 +0100 (CET) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1rf4oc-0003Ib-K2; Tue, 27 Feb 2024 16:16:42 -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 1rf4oa-0003Hw-06; Tue, 27 Feb 2024 16:16:40 -0500 Received: from wout4-smtp.messagingengine.com ([64.147.123.20]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1rf4oX-0005Fi-J3; Tue, 27 Feb 2024 16:16:39 -0500 Received: from compute1.internal (compute1.nyi.internal [10.202.2.41]) by mailout.west.internal (Postfix) with ESMTP id A1D9B3200A32; Tue, 27 Feb 2024 16:16:32 -0500 (EST) Received: from mailfrontend1 ([10.202.2.162]) by compute1.internal (MEProxy); Tue, 27 Feb 2024 16:16:33 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=retrospec.tv; h= cc:cc:content-transfer-encoding:content-type:content-type:date :date:from:from:in-reply-to:in-reply-to:message-id:mime-version :references:reply-to:subject:subject:to:to; s=fm3; t=1709068592; x=1709154992; bh=o05Y/TB+WO8PquUrX73mBv2D01W/kmAubtw8MNxJcEc=; b= KYv4bbgBK4CnlH960fLfoClK8lM7v0b4mgzns0Dr+sg+te/8fwD7kOcANgJpyFyJ 8eCQ28j25N/TKlWjEn0N+o6uKWSLDylNnLen07c5iSxiZJP7ZtpS1bX5iACFWVoN wX5MSDEVd8yDG89WKkyuW/do+QZu0Mn5gaKcF5wH9O7rrfH80h+u6ZbgoASnD+tP y8umP7blCDrhhghyAveF6Wp+K+hghlguuyYwU4chAGQ6o04I4T+uKEWqiUM3M+E8 Bc8IPui2Nj7qQearaGkVa3oTRU2Bg224szxv77iMVRRQvby/9sDoCrldgV+Fu1es +GXYRzWwN83cGCX7NS1q0A== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:cc:content-transfer-encoding :content-type:content-type:date:date:feedback-id:feedback-id :from:from:in-reply-to:in-reply-to:message-id:mime-version :references:reply-to:subject:subject:to:to:x-me-proxy:x-me-proxy :x-me-sender:x-me-sender:x-sasl-enc; s=fm1; t=1709068592; x= 1709154992; bh=o05Y/TB+WO8PquUrX73mBv2D01W/kmAubtw8MNxJcEc=; b=c s/9AwV9ObjpWMpX54y2JF4YFA9D7w27SdjCbSRn56XVLHoyrI7JBQDtdziB+/58i BFcrK7iJKqmbmw2Ke2t81+vPOeP62rqkvzplwd8aYx32iMLF5ibZgtAjW1X3TZ+F jdygRgRZG7jdeT+a4uNQogvspFDldB07AQ+lAp01YpdSIGoIqq9lgV3eiYx2uFsj rtTF7saqzHjjDB2xPOSl+tFJtZ84pzSF6A/VPXIjeiwRYbbqkV/4xT95+vscuDtZ gCM8uDw/bOQ0EAWJMo1b7hN7jqVYJUmKdW7zzJ5NMuZGuMaFkLOeVp/+jDc8lPF4 7jZXLnybW8aMQImJrW7eA== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvledrgeehgdduvddvucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucenucfjughrpehffgfhvfevufffjgfkgggtgfesth hqredttderjeenucfhrhhomhepkfgrnhcugfhurhgvuceoihgrnhesrhgvthhrohhsphgv tgdrthhvqeenucggtffrrghtthgvrhhnpefhleevtdeifeffgfegiedvueekudettdevje ffhfelieelfeehgefgudfgieeuhfenucevlhhushhtvghrufhiiigvpedtnecurfgrrhgr mhepmhgrihhlfhhrohhmpehirghnsehrvghtrhhoshhpvggtrdhtvh X-ME-Proxy: Feedback-ID: id9014242:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Tue, 27 Feb 2024 16:16:31 -0500 (EST) References: <87o7e3ff61.fsf@meson> <86mstnf599.fsf@riseup.net> <87cysj5pdl.fsf@xelera.eu> User-agent: mu4e 1.8.13; emacs 28.2 From: Ian Eure To: Giovanni Biscuolo Cc: Csepp , help-guix@gnu.org, guix-devel@gnu.org Subject: Re: Guix System automated installation Date: Tue, 27 Feb 2024 12:37:06 -0800 In-reply-to: <87cysj5pdl.fsf@xelera.eu> Message-ID: <87v869bob5.fsf@meson> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: quoted-printable Received-SPF: pass client-ip=64.147.123.20; envelope-from=ian@retrospec.tv; helo=wout4-smtp.messagingengine.com X-Spam_score_int: -27 X-Spam_score: -2.8 X-Spam_bar: -- X-Spam_report: (-2.8 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_LOW=-0.7, RCVD_IN_MSPIKE_H5=0.001, RCVD_IN_MSPIKE_WL=0.001, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: guix-devel@gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "Development of GNU Guix and the GNU System distribution." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-devel-bounces+larch=yhetil.org@gnu.org Sender: guix-devel-bounces+larch=yhetil.org@gnu.org X-Migadu-Country: US X-Migadu-Flow: FLOW_IN X-Migadu-Spam-Score: -9.45 X-Spam-Score: -9.45 X-Migadu-Queue-Id: 101A86F521 X-Migadu-Scanner: mx11.migadu.com X-TUID: ms2+iuZrtjoE Hi Giovanni, Giovanni Biscuolo writes: > [[PGP Signed Part:Undecided]] > Hello Ian, > > I'm a little late to this discussion, sorry. > > I'm adding guix-devel since it would be nice if some Guix=20 > developer have > something to add on this matter, for this reason I'm leaving all > previous messages intact > > Csepp writes: > >> Ian Eure writes: >> >>> Hello, >>> >>> On Debian, you can create a preseed file containing answers to=20 >>> all the questions >>> you=E2=80=99re prompted for during installation, and build a new=20 >>> install image which >>> includes it. When booted, this installer skips any steps=20 >>> which have been >>> preconfigured, which allows for either fully automated=20 >>> installation, or partly >>> automated (prompt for hostname and root password, but=20 >>> otherwise automatic). >>> >>> Does Guix have a way to do something like this? The=20 >>> declarative config is more >>> or less the equivalent of the Debian preseed file, but I don=E2=80=99t= =20 >>> see anything that >>> lets you build an image that=E2=80=99ll install a configuration. > > When using the guided installation (info "(guix) Guided=20 > Graphical > Installation"), right before the actual installation on target=20 > (guix > system init...) you can edit the operating-system configuration=20 > file: > isn't it something similar to what you are looking for? > > Please consider that a preseed file is very limited compared to=20 > a > full-fledged operating-system declaration since the latter=20 > contains the > declaration for *all* OS configuration, not just the installed=20 > packages. > I appreciate where you=E2=80=99re coming from, I also like the one-file=20 system configuration, but this is inaccurate. Guix=E2=80=99s=20 operating-system doesn=E2=80=99t encompass the full scope of configuration= =20 necessary to install and run an OS; Debian=E2=80=99s preseed has=20 significantly more functionality than just specifying the=20 installed packages. Right now, Debian=E2=80=99s system allows you to do=20 things which Guix does not. Preseed files contain values that get set in debconf, Debian=E2=80=99s=20 system-wide configuration mechanism, so they can both configure=20 the resulting system as well as the install process itself. This=20 means you can use a preseed file to tell the installer to=20 partition disks, set up LUKS-encrypted volumes (and specify one or=20 more passwords for them), format those with filesystems, install=20 the set of packages you want, and configure them -- though=20 debconf=E2=80=99s package configuration is more limited, generally, than=20 Guix provides[1]. With Debian, I can create a custom installer=20 image with a preseed file, boot it, and without touching a single=20 other thing, it=E2=80=99ll install and configure the target machine, and=20 reboot into it. That boot-and-it-just-works experience is what I=20 want from Guix. For things that can=E2=80=99t be declared in operating-system, like disk=20 partitioning and filesystem layout, the installer performs those=20 tasks imperatively, then generates a system config with those=20 device files and/or UUIDs populated, then initializes the system.=20 There=E2=80=99s no facility for specifying disk partitioning or *creating*= =20 filesystems in the system config -- it can only be pointed at ones=20 which have been created already. >> guix system image is maybe closer, but it doesn=E2=80=99t automate=20 >> everything that the >> installer does. >> But the installer can be used as a Scheme library, at least in=20 >> theory. The way >> I would approach the problem is by creating a Shepherd service=20 >> that runs at boot >> from the live booted ISO. > > I would really Love So Much=E2=84=A2 to avoid writing imperative bash=20 > scripts > and just write Scheme code to be able to do a "full automatic"=20 > Guix > System install, using a workflow like this one: > > 1. guix system prepare --include preseed.scm disk-layout.scm=20 > /mnt > > where disk-layout.scm is a declarative gexp used to partition,=20 > format > and mount all needed filesystems > > the resulting config.scm would be an operating-system=20 > declaration with > included the contents of preseed.scm (packages and services > declarations) > > 2. guix system init config.scm /mnt (already working now) > > ...unfortunately I'm (still?!?) not able to contribute such code=20 > :-( > I don=E2=80=99t think there=E2=80=99s any need for a preseed.scm file, and = I=E2=80=99m not=20 sure what would be in that, but I think this is close to the right=20 track. Either operating-system should be extended to support=20 things like disk partitioning, and effect those changes at=20 reconfigure time (with suitable safeguards to avoid wrecking=20 existing installs), or the operating-system config could get=20 embedded in another struct which contains that, similar to the=20 (image ...) config for `guix system image'. I think there are=20 some interesting possibilities here: you could change your=20 partition layout and have Guix resize them / create new ones for=20 you. =E2=80=94 Ian [1]: A workaround for this is to create packages which configure=20 the system how you want, then include them on the installer image=20 / list them in the packages to be installed. Not ideal, but you=20 can.