GNU bug report logs - #28706
[PATCH 0/3] Detect wrong UUIDs/labels in 'guix system init/reconfigure'

Previous Next

Package: guix-patches;

Reported by: Ludovic Courtès <ludo <at> gnu.org>

Date: Wed, 4 Oct 2017 19:49:02 UTC

Severity: normal

Tags: patch

Done: ludo <at> gnu.org (Ludovic Courtès)

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: help-debbugs <at> gnu.org (GNU bug Tracking System)
To: ludo <at> gnu.org (Ludovic Courtès)
Cc: tracker <at> debbugs.gnu.org
Subject: bug#28706: closed ([PATCH 0/3] Detect wrong UUIDs/labels in 'guix
 system init/reconfigure')
Date: Thu, 05 Oct 2017 10:13:02 +0000
[Message part 1 (text/plain, inline)]
Your message dated Thu, 05 Oct 2017 12:12:14 +0200
with message-id <87bmll9a4h.fsf <at> gnu.org>
and subject line Re: [bug#28706] [PATCH 3/3] guix system: Error out when passed a wrong file system UUID/label.
has caused the debbugs.gnu.org bug report #28706,
regarding [PATCH 0/3] Detect wrong UUIDs/labels in 'guix system init/reconfigure'
to be marked as done.

(If you believe you have received this mail in error, please contact
help-debbugs <at> gnu.org.)


-- 
28706: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=28706
GNU Bug Tracking System
Contact help-debbugs <at> gnu.org with problems
[Message part 2 (message/rfc822, inline)]
From: Ludovic Courtès <ludo <at> gnu.org>
To: guix-patches <at> gnu.org
Cc: Ludovic Courtès <ludo <at> gnu.org>
Subject: [PATCH 0/3] Detect wrong UUIDs/labels in 'guix system
 init/reconfigure'
Date: Wed,  4 Oct 2017 21:48:31 +0200
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



[Message part 3 (message/rfc822, inline)]
From: ludo <at> gnu.org (Ludovic Courtès)
To: Danny Milosavljevic <dannym <at> scratchpost.org>
Cc: 28706-done <at> debbugs.gnu.org
Subject: Re: [bug#28706] [PATCH 3/3] guix system: Error out when passed a
 wrong file system UUID/label.
Date: Thu, 05 Oct 2017 12:12:14 +0200
Danny Milosavljevic <dannym <at> scratchpost.org> skribis:

> LGTM!

Thanks for checking.  Pushed as
9d80d0e95c9eab042ddd8250ad9a231ed0c458dc.

Note that the <file-system> change breaks the ABI, so “make clean-go”
is needed!

Ludo’.


This bug report was last modified 7 years and 237 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.