From mboxrd@z Thu Jan 1 00:00:00 1970 From: ludo@gnu.org (Ludovic =?utf-8?Q?Court=C3=A8s?=) Subject: Re: Drive identifiers Date: Wed, 24 Jan 2018 15:12:04 +0100 Message-ID: <87y3kn1h3f.fsf@gnu.org> References: <87mv1c4kp7.fsf@gnu.org> <86y3kvzypj.fsf@gmail.com> <20180118102914.6cb68394@scratchpost.org> <86po66isol.fsf@gmail.com> <87607x7qce.fsf@elephly.net> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:47351) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1eeLmj-00034U-4s for guix-devel@gnu.org; Wed, 24 Jan 2018 09:12:21 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1eeLmZ-00058J-C6 for guix-devel@gnu.org; Wed, 24 Jan 2018 09:12:17 -0500 Received: from hera.aquilenet.fr ([2a0c:e300::1]:46554) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1eeLmZ-00056a-4J for guix-devel@gnu.org; Wed, 24 Jan 2018 09:12:07 -0500 In-Reply-To: <87607x7qce.fsf@elephly.net> (Ricardo Wurmus's message of "Fri, 19 Jan 2018 17:42:09 +0100") List-Id: "Development of GNU Guix and the GNU System distribution." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-devel-bounces+gcggd-guix-devel=m.gmane.org@gnu.org Sender: "Guix-devel" To: Ricardo Wurmus Cc: Guix-devel , myglc2@gmail.com Ricardo Wurmus skribis: > ;; Get the UUID of the encrypted disk > (define %uuid > (let* ((port (open-input-pipe "blkid -s UUID -o value /dev/sda1")) > (str (read-line port))) > (close-pipe port) > str)) > =E2=80=A6 > (operating-system =E2=80=A6 > (mapped-devices (list (mapped-device > (source (uuid %uuid)) > (target "root") > (type luks-device-mapping)))) It=E2=80=99s a weird example because the idea of UUIDs is precisely to *not* record the partition=E2=80=99s /dev name. :-) Ludo=E2=80=99.