From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:55130) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dzpfD-0004b2-IQ for guix-patches@gnu.org; Wed, 04 Oct 2017 15:49:04 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1dzpfC-0003rh-I7 for guix-patches@gnu.org; Wed, 04 Oct 2017 15:49:03 -0400 Received: from debbugs.gnu.org ([208.118.235.43]:40559) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1dzpfC-0003rB-FC for guix-patches@gnu.org; Wed, 04 Oct 2017 15:49:02 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1dzpfC-0004oA-5H for guix-patches@gnu.org; Wed, 04 Oct 2017 15:49:02 -0400 Subject: [bug#28706] [PATCH 0/3] Detect wrong UUIDs/labels in 'guix system init/reconfigure' Resent-Message-ID: Received: from eggs.gnu.org ([2001:4830:134:3::10]:55065) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dzpez-0004Zf-Ia for guix-patches@gnu.org; Wed, 04 Oct 2017 15:48:50 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1dzpey-0003aH-KR for guix-patches@gnu.org; Wed, 04 Oct 2017 15:48:49 -0400 From: Ludovic =?UTF-8?Q?Court=C3=A8s?= Date: Wed, 4 Oct 2017 21:48:31 +0200 Message-Id: <20171004194831.4524-1-ludo@gnu.org> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-patches-bounces+kyle=kyleam.com@gnu.org Sender: "Guix-patches" To: 28706@debbugs.gnu.org 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 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 . 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