From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp0.migadu.com ([2001:41d0:303:e16b::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms8.migadu.com with LMTPS id sJ8TLg7i3mW7XwEAqHPOHw:P1 (envelope-from ) for ; Wed, 28 Feb 2024 08:34:38 +0100 Received: from aspmx1.migadu.com ([2001:41d0:303:e16b::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp0.migadu.com with LMTPS id sJ8TLg7i3mW7XwEAqHPOHw (envelope-from ) for ; Wed, 28 Feb 2024 08:34:38 +0100 X-Envelope-To: larch@yhetil.org Authentication-Results: aspmx1.migadu.com; dkim=none; dmarc=none; spf=pass (aspmx1.migadu.com: domain of "help-guix-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="help-guix-bounces+larch=yhetil.org@gnu.org" ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1709105678; 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:in-reply-to:in-reply-to: references:references:list-id:list-help:list-unsubscribe: list-subscribe:list-post; bh=eOPqtxLm0HZp8fWsJA4ZJT5jBfizv+nkH0g9FjlSPiw=; b=lGaP9N+qhL1lrKkpNm9qAHQLLHXD1xjaiRR477VyBqtIvpZtv4ZFPrKO1urgJzCawuoOZu XYIhP2TSTOjkZnMnMRzSipv0kROiE42BqeHIqXPbmURytLCZUG2cKEG9NZiSpjHsAgzdfL WVuxUNnZ7gsLj1bcjBUex365XDi1y2cQfHNaJIe35s7Skn1m9q9ClNHR5+leYN60kBakd5 yAaRZZ02UvhC7MpyA4YKxNZzpjNiuUmVCD8ILAf95bwdlDfmUXTnhNuUGVPUtZNqqPkv87 BFcZDQsyunBK8vzmTyRVCMzu8Qc6U5uKOGCeZ4gAbABMRMOsGUGyC2ACVh/wEw== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=none; dmarc=none; spf=pass (aspmx1.migadu.com: domain of "help-guix-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="help-guix-bounces+larch=yhetil.org@gnu.org" ARC-Seal: i=1; s=key1; d=yhetil.org; t=1709105678; a=rsa-sha256; cv=none; b=NQ5QxiQSZpOWn/SXuKrzmJhQER+n1eQ18ieGmHe66Jpxj+uhZccPLninpldcxJ2NHcoMR8 bANEQLGaZMy4cRaMa8uz4ijCj/yQ8nDlV5z558Kl1r1IjoSNKaS74JBTQLdmelKnAvxyyg DfRfzQwCsbeveugn2aUseaic5GBchLi9lvw7BDPxs0OnTyiIDGV5uvQRP70GUI9C+POVE3 EZG5QnHzH55sBoXweqlx7l0X5nXU2ryaM6WBuPxZkwP4ETGreBDvaN5GfiwmitTrLILaKm mR2595RSoOw1ugVrksRwgE/aO5TlBI2PDTcZET40X2K8RpE3YrxAnRU15PtGqg== 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 68BDC123A2 for ; Wed, 28 Feb 2024 08:34:38 +0100 (CET) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1rfERz-0006F4-4S; Wed, 28 Feb 2024 02:33:59 -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 1rfERt-0006EJ-VC; Wed, 28 Feb 2024 02:33:54 -0500 Received: from ns13.heimat.it ([46.4.214.66]) by eggs.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1rfERs-0001RX-4Q; Wed, 28 Feb 2024 02:33:53 -0500 Received: from localhost (ip6-localhost [127.0.0.1]) by ns13.heimat.it (Postfix) with ESMTP id CE14E30081F; Wed, 28 Feb 2024 07:33:47 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at ns13.heimat.it Received: from ns13.heimat.it ([127.0.0.1]) by localhost (ns13.heimat.it [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id THmDmmtcdvW1; Wed, 28 Feb 2024 07:33:45 +0000 (UTC) Received: from bourrache.mug.xelera.it (unknown [93.56.171.217]) (using TLSv1.2 with cipher ECDHE-ECDSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by ns13.heimat.it (Postfix) with ESMTPSA id 29C6D30081A; Wed, 28 Feb 2024 07:33:45 +0000 (UTC) Received: from roquette.mug.biscuolo.net (roquette [10.38.2.14]) by bourrache.mug.xelera.it (Postfix) with SMTP id 3B6692F07616; Wed, 28 Feb 2024 08:33:44 +0100 (CET) Received: (nullmailer pid 10248 invoked by uid 1000); Wed, 28 Feb 2024 07:33:43 -0000 From: Giovanni Biscuolo To: Ian Eure Cc: help-guix@gnu.org, guix-devel@gnu.org Subject: declarative partition and format with Guix (was Re: Guix System automated installation) In-Reply-To: <87v869bob5.fsf@meson> Organization: Xelera.eu References: <87o7e3ff61.fsf@meson> <86mstnf599.fsf@riseup.net> <87cysj5pdl.fsf@xelera.eu> <87v869bob5.fsf@meson> Date: Wed, 28 Feb 2024 08:33:43 +0100 Message-ID: <87v8693uw8.fsf@xelera.eu> MIME-Version: 1.0 Content-Type: multipart/signed; boundary="=-=-="; micalg=pgp-sha512; protocol="application/pgp-signature" Received-SPF: pass client-ip=46.4.214.66; envelope-from=g@xelera.eu; helo=ns13.heimat.it X-Spam_score_int: -18 X-Spam_score: -1.9 X-Spam_bar: - X-Spam_report: (-1.9 / 5.0 requ) BAYES_00=-1.9, SPF_HELO_NONE=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: help-guix@gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: help-guix-bounces+larch=yhetil.org@gnu.org Sender: help-guix-bounces+larch=yhetil.org@gnu.org X-Migadu-Flow: FLOW_IN X-Migadu-Country: US X-Migadu-Spam-Score: -6.87 X-Spam-Score: -6.87 X-Migadu-Queue-Id: 68BDC123A2 X-Migadu-Scanner: mx13.migadu.com X-TUID: w5g+epxYviws --=-=-= Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Hello Ian, Ian Eure writes: > Giovanni Biscuolo writes: [...] >> 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. Yes you are right, I completely misrepresented the functionality of the Debian preseed utility, sorry! (...and I used that in a remote past) [...] > installed packages. Right now, Debian=E2=80=99s system allows you to do= =20 > things which Guix does not. [...] > 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 Yes, this is what is missing from the Guix installer system > With Debian, I can create a custom installer image with a preseed > file, boot it, and without touching a single other thing, it=E2=80=99ll > install and configure the target machine, and reboot into it. That > boot-and-it-just-works experience is what I want from Guix. I understand that it's just a workaround but you can achieve this boot-and-it-just-works (if there isn't bugs in the script/preseed) experience with a simple bash script to automate "manual installation" I wrote it in bash because I'm not able to write it in Guile and/or extend the "guix system" command to be able to manage the missing bits, but that is a solution (more a workaround now) [...] > 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. Yes: those facilities are missing, we (still?) cannot do that declaratively... let's do that imperatively, automatically :-) [...] >> 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, an= d I=E2=80=99m not=20 > sure what would be in that, preseed.scm is "just" the part of "operating-system" declaration without the (bootloader [...]), (file-systems [...]) and (swap-devices [...]) declaration, that is automatically generated by "guix system prepare" based on disk-layout.scm > but I think this is close to the right track. Either operating-system > should be extended to support things like disk partitioning, and > effect those changes at reconfigure time (with suitable safeguards to > avoid wrecking existing installs), I would prefer not, such "reconfigurations" should be done "out of band" and not "in band", IMHO > 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 Root (/) partition resizing must be done with root unmounted, no? Also, since the resize (shrink?) of filesystem is a very sensitive operation, I'd exclude that from "normal" operations done via "guix system reconfigure"... it's more "guix system prepare..." with one or more disk partitions (i.e. /home) resized/shrinked or kept as is, _without_ file system (re)formatting. One interesting thing that could be done at "guix system prepare" time is to restore one or more filesystem content from a (possibly remote) backup, useful in a disaster recovery scenario. > / create new ones for you. [...] Meanwhile: WDYT to work togheter on a simple _configurable_ bash script to help users automate the very first installation of a Guix System and try to upstream it? Thanks! Gio' =2D-=20 Giovanni Biscuolo Xelera IT Infrastructures --=-=-= Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQJABAEBCgAqFiEERcxjuFJYydVfNLI5030Op87MORIFAmXe4dcMHGdAeGVsZXJh LmV1AAoJENN9DqfOzDkSjAAP/RpHOrj2x/PwsHXaUQ892d+aYhuinGkrgpEd3BKo yMT5d/mQq3x5LgnKU2ZJmIwQ5tKfpxcA1YS8EvdQqu6OFEcYNmuDv0OTLtlvsj7s PbJJxqqVpMMAcvp3syBTyXufys52qgqahwHmd4sNdu4zF1yCXrH89qz4v2LLvGxW eX+RMRXnLtY7yJXckhtJlX8pDQZjx/AGUKDe7pkaI7hb1yxA7yz0V28rTpkR5iNs oE0q7O2PZEuKHtJjEvXbrcDMBjbZ9hlSutVIrugaQKEd0RwIypY1hJYZDndpcCvk 0LnkeZvBzdNRK1SzOBKfro5mVSilkn/YxBMyWDI6OybY/+mhRRCXNYwIBuibY8W2 Wf8EejbwEg6mQ1e5bHblE0S5PLubOtCf8kqhnMHhSHojUYzod/qd5OEWT/nw3KlX DltkBD6meXCiqjo1QOvQN5GVvDgZrSoGKQLvfNm8OsV+vjFpjYq4EbwYPXPaV/Z5 Me8lsTKE1+4ypY/hPAoe3dNhkeMHqVHLvmSzi+4iI0mVscKo/pjiEJfSStfE5SsS rpNEBLlZMXwbPI5yfcnAU7S2qs8WnpFCdT1YG7Jjp/8Wp/jN5OLhoHWuwBa/UElh GgEgjfjE2Hcju65O+Rdh2Qwe9Gn0xzYeKHvHLwZ5eHpzVN8YCI0KMrvalJdcH3M9 1hLh =HyxW -----END PGP SIGNATURE----- --=-=-=--