mbox

[bug#44169,0/3] Referring to swap with UUIDs and labels

Message ID 20201023095822.20528-1-ludo@gnu.org
Headers show

Message

Ludovic Courtès Oct. 23, 2020, 9:58 a.m. UTC
Hi!

Someone reported on IRC yesterday that the installer generates
‘swap-devices’ that explicitly list /dev nodes.

These patches change that so that it uses UUIDs instead.  It’s
only in the unencrypted case anyway, because I think we don’t
create swap partitions in the full-encrypted mode because the
partition would be unencrypted (or we’d need to set up another
LUKS mapping, but the installer doesn’t do that).

The ‘swap’ Shepherd service can now look up swap devices by
UUID/label.  Note that it uses the generic ‘find-partition-by-label’
and ‘find-partition-by-uuid’ procedures, which means it could
stumble upon a partition that’s not a swap partition.  That’s
unlikely and probably OK though: the worst that can happen is
that the ‘swap’ Shepherd service will fail to start.

Feedback welcome!

Ludo’.

Ludovic Courtès (3):
  file-systems: Allow swap space lookup by UUID/label.
  services: swap: Allow for UUIDs and file system labels.
  installer: Use UUIDs in the 'swap-devices' field.

 doc/guix.texi              | 34 +++++++++++++++++++----
 gnu/build/file-systems.scm | 43 ++++++++++++++++++++++++++++-
 gnu/installer/parted.scm   |  7 ++++-
 gnu/services/base.scm      | 55 +++++++++++++++++++++++++++++---------
 4 files changed, 120 insertions(+), 19 deletions(-)