diff options
author | Mathieu Othacehe <m.othacehe@gmail.com> | 2018-12-08 23:36:07 +0900 |
---|---|---|
committer | Ludovic Courtès <ludo@gnu.org> | 2019-01-17 14:04:26 +0100 |
commit | 59e8f3c3accb51c9b7dc4e012f40b9235b317efc (patch) | |
tree | 63e83f6a64bab9add12a4e097594fa7cdf67fbd8 /gnu/installer/parted.scm | |
parent | 8ae7044f1d6a8c6a8a91ae6c032030e1affc9772 (diff) | |
download | patches-59e8f3c3accb51c9b7dc4e012f40b9235b317efc.tar patches-59e8f3c3accb51c9b7dc4e012f40b9235b317efc.tar.gz |
installer: parted: Use read-luks-partition-uuid instead of
find-partition-by-luks-uuid.
* gnu/installer/parted.scm (user-partition->mapped-device): Replace
read-luks-partition-uuid by find-partition-by-luks-uuid,
(user-partition->file-system): only compute uuid if the partition
is not encrypted.
Diffstat (limited to 'gnu/installer/parted.scm')
-rw-r--r-- | gnu/installer/parted.scm | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/gnu/installer/parted.scm b/gnu/installer/parted.scm index c56da60550..c7be24051d 100644 --- a/gnu/installer/parted.scm +++ b/gnu/installer/parted.scm @@ -23,7 +23,7 @@ #:use-module (gnu system uuid) #:use-module ((gnu build file-systems) #:select (read-partition-uuid - find-partition-by-luks-uuid)) + read-luks-partition-uuid)) #:use-module (guix build syscalls) #:use-module (guix build utils) #:use-module (guix records) @@ -1203,8 +1203,9 @@ the FS-TYPE field set to 'swap, return the empty list if none found." (mount-type (user-fs-type->mount-type fs-type)) (path (user-partition-path user-partition)) (upper-path (user-partition-upper-path user-partition)) - (uuid (uuid->string (read-partition-uuid path) - fs-type))) + ;; Only compute uuid if partition is not encrypted. + (uuid (or crypt-label + (uuid->string (read-partition-uuid path) fs-type)))) `(file-system (mount-point ,mount-point) (device ,@(if crypt-label @@ -1232,7 +1233,9 @@ from (gnu system mapped-devices) and return it." (let ((label (user-partition-crypt-label user-partition)) (path (user-partition-path user-partition))) `(mapped-device - (source (uuid ,(uuid->string (read-partition-uuid path)))) + (source (uuid ,(uuid->string + (read-luks-partition-uuid path) + 'luks))) (target ,label) (type luks-device-mapping)))) |