From: Giovanni Biscuolo <g@xelera.eu>
To: Ian Eure <ian@retrospec.tv>
Cc: help-guix@gnu.org, guix-devel@gnu.org
Subject: declarative partition and format with Guix (was Re: Guix System automated installation)
Date: Wed, 28 Feb 2024 08:33:43 +0100 [thread overview]
Message-ID: <87v8693uw8.fsf@xelera.eu> (raw)
In-Reply-To: <87v869bob5.fsf@meson>
[-- Attachment #1: Type: text/plain, Size: 4585 bytes --]
Hello Ian,
Ian Eure <ian@retrospec.tv> writes:
> Giovanni Biscuolo <g@xelera.eu> writes:
[...]
>> 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.
>
> I appreciate where you’re coming from, I also like the one-file
> 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’s system allows you to do
> things which Guix does not.
[...]
> means you can use a preseed file to tell the installer to
> partition disks, set up LUKS-encrypted volumes (and specify one or
> 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’ll
> 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’s no facility for specifying disk partitioning or *creating*
> filesystems in the system config -- it can only be pointed at ones
> 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™ to avoid writing imperative bash
>> scripts
>> 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
>> :-(
>>
>
> I don’t think there’s any need for a preseed.scm file, and I’m not
> 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
> embedded in another struct which contains that, similar to the
> (image ...) config for `guix system image'. I think there are
> some interesting possibilities here: you could change your
> 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'
--
Giovanni Biscuolo
Xelera IT Infrastructures
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 849 bytes --]
next prev parent reply other threads:[~2024-02-28 7:34 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <87o7e3ff61.fsf@meson>
[not found] ` <86mstnf599.fsf@riseup.net>
2024-02-26 13:25 ` Guix System automated installation Giovanni Biscuolo
2024-02-27 20:37 ` Ian Eure
2024-02-28 7:33 ` Giovanni Biscuolo [this message]
2024-02-28 9:53 ` declarative partition and format with Guix (was Re: Guix System automated installation) Giovanni Biscuolo
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://guix.gnu.org/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87v8693uw8.fsf@xelera.eu \
--to=g@xelera.eu \
--cc=guix-devel@gnu.org \
--cc=help-guix@gnu.org \
--cc=ian@retrospec.tv \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/guix.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).