GNU bug report logs -
#57983
Error installing on a Framework Laptop
Previous Next
Full log
Message #19 received at 57983 <at> debbugs.gnu.org (full text, mbox):
* gnu/installer/parted.scm (luks-ensure-open): New procedure.
(unmount-user-partitions): Ensure luks devices are open.
---
gnu/installer/parted.scm | 16 ++++++++++++++++
1 file changed, 16 insertions(+)
diff --git a/gnu/installer/parted.scm b/gnu/installer/parted.scm
index 51ba2bebd6..fcc936a391 100644
--- a/gnu/installer/parted.scm
+++ b/gnu/installer/parted.scm
@@ -1194,6 +1194,20 @@ (define (luks-format-and-open user-partition)
((run-command-in-installer) "cryptsetup" "open" "--type" "luks"
"--key-file" key-file file-name label)))))
+(define (luks-ensure-open user-partition)
+ "Ensure partition pointed by USER-PARTITION is opened."
+ (unless (file-exists? (user-partition-upper-file-name user-partition))
+ (let* ((file-name (user-partition-file-name user-partition))
+ (label (user-partition-crypt-label user-partition))
+ (password (secret-content (user-partition-crypt-password user-partition))))
+ (call-with-luks-key-file
+ password
+ (lambda (key-file)
+ (installer-log-line "opening LUKS entry ~s at ~s"
+ label file-name)
+ ((run-command-in-installer) "cryptsetup" "open" "--type" "luks"
+ "--key-file" key-file file-name label))))))
+
(define (luks-close user-partition)
"Close the encrypted partition pointed by USER-PARTITION."
(let ((label (user-partition-crypt-label user-partition)))
@@ -1278,6 +1292,8 @@ (define (mount-user-partitions user-partitions)
(user-fs-type->mount-type fs-type))
(file-name
(user-partition-upper-file-name user-partition)))
+ (when crypt-label
+ (luks-ensure-open user-partition))
(mkdir-p target)
(installer-log-line "mounting ~s on ~s" file-name target)
(mount file-name target mount-type)))
--
2.37.2
This bug report was last modified 2 years and 271 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.