unofficial mirror of guix-patches@gnu.org 
 help / color / mirror / code / Atom feed
From: "Ludovic Courtès" <ludo@gnu.org>
To: 28706@debbugs.gnu.org
Subject: [bug#28706] [PATCH 0/3] Detect wrong UUIDs/labels in 'guix system init/reconfigure'
Date: Wed,  4 Oct 2017 21:48:31 +0200	[thread overview]
Message-ID: <20171004194831.4524-1-ludo@gnu.org> (raw)

Hello Guix!

At the GHM we were discussing that a common mistake when installing
GuixSD is to specify a wrong file system UUID or label in the config.
You would run the whole install to completion, reboot into the new
system, just to find that it fails to boot because you passed the wrong
UUID or label.  And then you have to reinstall again.  Roel’s report at
<https://lists.gnu.org/archive/html/help-guix/2017-09/msg00068.html> is
another instance of that (though Roel could easily roll back in that
case.)

With this patch such mistakes are detected early on, upon ‘guix system
init’ or ‘guix system reconfigure’:

  configuration.scm:32:23: error: file system with UUID 'c78e0703-373f-4c4d-9652-5633f072eae6' not found
  configuration.scm:42:23: error: file system with UUID '1234-ABCD' not found

The behavior is to stop altogether when such a problem is found.  I
wondered whether it should be a warning instead, on the grounds that it
could be annoying if the mistake-prevention logic wrongfully raised an
error for some reason.  However, I figured that a warning would be much
less efficient (people wouldn’t notice), and I think
‘check-file-system-availability’ avoids the obvious pitfalls by
filtering out irrelevant file systems.

Thoughts?

Thanks,
Ludo’.

Ludovic Courtès (3):
  uuid: Add 'uuid=?' and use it.
  file-systems: Add a 'location' field to <file-system>.
  guix system: Error out when passed a wrong file system UUID/label.

 gnu/build/file-systems.scm  |  4 +--
 gnu/system/file-systems.scm |  6 ++++-
 gnu/system/uuid.scm         | 13 +++++++++
 guix/scripts/system.scm     | 65 +++++++++++++++++++++++++++++++++++++++++++++
 tests/uuid.scm              |  6 +++++
 5 files changed, 91 insertions(+), 3 deletions(-)

-- 
2.14.2

             reply	other threads:[~2017-10-04 19:49 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-10-04 19:48 Ludovic Courtès [this message]
2017-10-04 19:51 ` [bug#28706] [PATCH 1/3] uuid: Add 'uuid=?' and use it Ludovic Courtès
2017-10-04 19:51   ` [bug#28706] [PATCH 2/3] file-systems: Add a 'location' field to <file-system> Ludovic Courtès
2017-10-05  6:11     ` Danny Milosavljevic
2017-10-04 19:51   ` [bug#28706] [PATCH 3/3] guix system: Error out when passed a wrong file system UUID/label Ludovic Courtès
2017-10-05  6:12     ` Danny Milosavljevic
2017-10-05 10:12       ` bug#28706: " Ludovic Courtès
2017-10-05  6:11   ` [bug#28706] [PATCH 1/3] uuid: Add 'uuid=?' and use it Danny Milosavljevic

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=20171004194831.4524-1-ludo@gnu.org \
    --to=ludo@gnu.org \
    --cc=28706@debbugs.gnu.org \
    /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).