diff --git a/gnu/system.scm b/gnu/system.scm index d337e5259..d71b9c15b 100644 --- a/gnu/system.scm +++ b/gnu/system.scm @@ -243,6 +243,11 @@ directly by the user." ((? string? device) device))) + (define (ensure-not-/dev device) + (if (and (string? device) (string-prefix? "/" device)) + #f + device)) + (match (read port) (('boot-parameters ('version 0) ('label label) ('root-device root) @@ -277,15 +282,16 @@ directly by the user." file))) (store-device - (match (assq 'store rest) - (('store ('device device) _ ...) - (device-sexp->device device)) - (_ ;the old format - ;; Root might be a device path like "/dev/sda1", which is not a - ;; suitable GRUB device identifier. - (if (string-prefix? "/" root) - #f - root)))) + ;; ROOT might be a device path like "/dev/sda1", which is not a + ;; suitable GRUB device identifier. + (ensure-not-/dev + (match (assq 'store rest) + (('store ('device #f) _ ...) + root-device) + (('store ('device device) _ ...) + (device-sexp->device device)) + (_ ;the old format + root-device)))) (store-mount-point (match (assq 'store rest) @@ -906,6 +912,7 @@ device in a ." (case (file-system-title fs) ((uuid) (file-system-device fs)) ((label) (file-system-device fs)) + ((device) (file-system-device fs)) (else #f))) (define (operating-system-boot-parameters os system.drv root-device)