From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp2.migadu.com ([2001:41d0:403:4876::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms8.migadu.com with LMTPS id mDM5D2eR3GXSrQAAe85BDQ:P1 (envelope-from ) for ; Mon, 26 Feb 2024 14:25:59 +0100 Received: from aspmx1.migadu.com ([2001:41d0:403:4876::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp2.migadu.com with LMTPS id mDM5D2eR3GXSrQAAe85BDQ (envelope-from ) for ; Mon, 26 Feb 2024 14:25:59 +0100 X-Envelope-To: larch@yhetil.org Authentication-Results: aspmx1.migadu.com; dkim=none; 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=1708953959; 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=xLxyDRmkgxJDWsopyvH9qOevLbCvl/NP7cfPMjxP3GI=; b=hM3iLxtyyfdmPiFiIyL7Ckgao59xUDp3CUGRbH4uqMiP74igs24Q3IkLWqVGgC9Yr+WZVn q2qdxNeHn9/gbD4rW/nUN87DmRd79SmsNGggZM0CgZtfht+Zc3RoIbxKMzSG5/7VfZLk8R IudiWF5uimlK1DATzgDEACrSt58Z7qCa2S7LTzNU6JtWdSp5zOiTOS+Im8lM5VM8/lQ+M3 D3ohKru6WbvP02Tfy/izjKbGYJw9dG1XszEFrBF9et3DX7FhXrZkvBP8YxDm/IfwlLVezt Nl3om5LkIqlsPpCjrUKP9E1VBsx4yDfESYp/EY2wfKzLqUBYF4cettbRpMOoaQ== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=none; 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=1708953959; a=rsa-sha256; cv=none; b=Xpo43T7HITnfIogLzkiZto1/S2dZmyPP/uxQGBSw7bS06zZuQEgyTw/gZxP6xF1U95sJmP TakB7aywl7UEYDhVUeRhG5R3sYgREvbx4USIUqEUYp9HiPH7JO5dkCzXND7ShvhHIfYhRz LDUNE+/yjU3iq373C1ES5wGU3InoxWsGL9A6JE6Xdx+3CFblerviFUmhSrupE0FaNlHeSc CmpP5U0iUsRClD/WDFvO1d9XDfDJA9MlO+V1qkjwsLSXXjflyHFCkYDQ9E0IAIFzzI13dl vpj8T5kI5PeFmAoS0mpsd3+gzZHMEvQ0fowzskzETcKm1+8ESMKTZOdaGNr3zA== 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 134846D8A5 for ; Mon, 26 Feb 2024 14:25:59 +0100 (CET) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1reazA-0008Nv-Uc; Mon, 26 Feb 2024 08:25:36 -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 1reaz9-0008Mw-G8; Mon, 26 Feb 2024 08:25:35 -0500 Received: from ns13.heimat.it ([46.4.214.66]) by eggs.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1reaz7-0001mX-L4; Mon, 26 Feb 2024 08:25:35 -0500 Received: from localhost (ip6-localhost [127.0.0.1]) by ns13.heimat.it (Postfix) with ESMTP id 34F0330081F; Mon, 26 Feb 2024 13:25:31 +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 fNPaPXGCD8ll; Mon, 26 Feb 2024 13:25:28 +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 4537830081A; Mon, 26 Feb 2024 13:25:28 +0000 (UTC) Received: from roquette.mug.biscuolo.net (roquette [10.38.2.14]) by bourrache.mug.xelera.it (Postfix) with SMTP id CB6512EF40F1; Mon, 26 Feb 2024 14:25:27 +0100 (CET) Received: (nullmailer pid 2359 invoked by uid 1000); Mon, 26 Feb 2024 13:25:27 -0000 From: Giovanni Biscuolo To: Ian Eure Cc: Csepp , help-guix@gnu.org, guix-devel@gnu.org Subject: Guix System automated installation In-Reply-To: <86mstnf599.fsf@riseup.net> Organization: Xelera.eu References: <87o7e3ff61.fsf@meson> <86mstnf599.fsf@riseup.net> Date: Mon, 26 Feb 2024 14:25:26 +0100 Message-ID: <87cysj5pdl.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: 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-Flow: FLOW_IN X-Migadu-Country: US X-Migadu-Scanner: mx10.migadu.com X-Migadu-Spam-Score: -6.51 X-Spam-Score: -6.51 X-Migadu-Queue-Id: 134846D8A5 X-TUID: NPHMioewtqTa --=-=-= Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Hello Ian, I'm a little late to this discussion, sorry. I'm adding guix-devel since it would be nice if some Guix 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 all the q= uestions >> you=E2=80=99re prompted for during installation, and build a new install= image which >> includes it. When booted, this installer skips any steps which have been >> preconfigured, which allows for either fully automated installation, or = partly >> automated (prompt for hostname and root password, but otherwise automati= c). >> >> Does Guix have a way to do something like this? The declarative config = is more >> or less the equivalent of the Debian preseed file, but I don=E2=80=99t s= ee anything that >> lets you build an image that=E2=80=99ll install a configuration. When using the guided installation (info "(guix) Guided Graphical Installation"), right before the actual installation on target (guix system init...) you can edit the operating-system configuration file: isn't it something similar to what you are looking for? Please consider that a preseed file is very limited compared to a full-fledged operating-system declaration since the latter contains the declaration for *all* OS configuration, not just the installed packages. Alternatively, you can use the (info "(guix) Manual Installation") and copy a pre-configured (preseed? :-) ) operating-system file, but you have to be very careful (see (info "(guix) Proceeding with the Installation"). >> I see there=E2=80=99s `guix deploy=E2=80=99, but that requires an alread= y-installed GuixSD to >> work, which isn=E2=80=99t helpful for getting it installed in the first = place. >> >> Thanks, >> >> =E2=80=94 Ian I'm also interested in a way to fully automate the installation [1] of Guix System hosts and I've developed a small bash script to help me (see below). The idea is to use the script to install a very basic Guix System on the machine and then use "guix deploy" (or deploy "manually") for a full-fledged configuration. My initial motivation was (and sill is the main) to allow me to install Guix Systems on rented hosts (dedicates or VPS) provided by vendors that do not have Guix System in the list of operating systems users can install on their machines: in this case users can boot machines in rescue mode (AFAIU all hosters provide a rescue system) and insall Guix System in a similar way as described in (info "(guix-cookbook) Running Guix on a Linode Server") or (info "(guix-cookbook) Running Guix on a Kimsufi Server") You can find the script here: https://gitlab.com/softwareworkers/swws/-/blob/master/infrastructure/hosts/= cornouiller/bootstrap-guix.sh?ref_type=3Dheads (that is the last "version" I used, for now I write a script for every machine I need... I still have to make this script generic putting all=20 needed config variables in an external file) Please consider it's still in early development, although I've already tested it both locally and with real rented machines, both bare metal and VPS. After some tests I realized that with few tests I could use such a script both on a rescue system and when installing using the Guix Installer ISO, selecting a full manual installation, see (info "(guix) Manual Installation"), and then running the script. > guix system image is maybe closer, but it doesn=E2=80=99t automate everyt= hing that the > installer does. > But the installer can be used as a Scheme library, at least in theory. T= he way > I would approach the problem is by creating a Shepherd service that runs = at boot > from the live booted ISO. I would really Love So Much=E2=84=A2 to avoid writing imperative bash scrip= ts and just write Scheme code to be able to do a "full automatic" Guix System install, using a workflow like this one: 1. guix system prepare --include preseed.scm disk-layout.scm /mnt where disk-layout.scm is a declarative gexp used to partition, format and mount all needed filesystems the resulting config.scm would be an operating-system 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 :-( Happy hacking! Gio' [1] that means: with almost zero needed intervention by the user... the user just needs to _design_ the installation. =2D-=20 Giovanni Biscuolo Xelera IT Infrastructures --=-=-= Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQJABAEBCgAqFiEERcxjuFJYydVfNLI5030Op87MORIFAmXckUcMHGdAeGVsZXJh LmV1AAoJENN9DqfOzDkS12gP/A/vN8HnMkFA270OHwPYJqohlSVKnWNqJfQu/AeY OZNOTs3gBKca7vD7iIO45iQnwyuMQjgFI0KmP3GCpmXCaENeXvbApL7sK273TEFJ r9U4e9fCAjrkYbQqEScenyea+kjyf1UW9tHVNV+3dsyX/xfSoyBVG46FOCuwbFsd +1sOg7RWVwMBK4Ottm49KSVMAK+iUGSJTFtplcO8j/vA6gVJcFjkSgxDd8vzYpzH 4nJPRtIqQkDQ0lSZcGauXOAmpEWaWhCI1/z5IpRWeTIRUBZ1Gqn4JU2bX73rVTbu lv2m+e5rMZNsGOpsEfn6LFTuptWLE3OslixshRXILhRl7NyX5y3xfBRU+yhXi6BZ WM7wtCOaP7gft/wky/xtbN2TWR2EVI5WO44TrDOHO6Aj5IkdGZqZY3lyZBgpC9t+ rhK3shtINoWPtVD2RgzeQc50vHBRIyXv2LJhA1DwJR3yglE6c658h0A4oLibLKkH Tvm7dc1X4gcY3VKXOBCAVFosH52nzygp+hLd5QpsiP6YdAZwtmrAqAwj+yIZ3Aan wpxdS2IxbDXQE3kJ+8j/UbOVrxIXi3VFnExkEzIpBlg3C/vIX+8UnTu/cyL38Vbt rfRYz5ab/EuhZjQmJnSpzhjwEuGLlhPMkqUUCddf7G8YEnvDfqQAtX5BioskvRbf wVna =3rNt -----END PGP SIGNATURE----- --=-=-=--