mirror of
https://codeberg.org/guix/guix.git
synced 2025-10-02 02:15:12 +00:00
system: Fix 'guix system' when root fs is named by UUID.
Fixes <https://bugs.gnu.org/23881>. * guix/scripts/system.scm (previous-grub-entries) (display-system-generation): Handle the case where the root device is specified by UUID.
This commit is contained in:
parent
d760a2fc18
commit
c52bf877e9
1 changed files with 15 additions and 8 deletions
|
@ -52,6 +52,7 @@
|
||||||
#:use-module (srfi srfi-35)
|
#:use-module (srfi srfi-35)
|
||||||
#:use-module (srfi srfi-37)
|
#:use-module (srfi srfi-37)
|
||||||
#:use-module (ice-9 match)
|
#:use-module (ice-9 match)
|
||||||
|
#:use-module (rnrs bytevectors)
|
||||||
#:export (guix-system
|
#:export (guix-system
|
||||||
read-operating-system))
|
read-operating-system))
|
||||||
|
|
||||||
|
@ -397,6 +398,9 @@ it atomically, and then run OS's activation script."
|
||||||
read-boot-parameters))
|
read-boot-parameters))
|
||||||
(label (boot-parameters-label params))
|
(label (boot-parameters-label params))
|
||||||
(root (boot-parameters-root-device params))
|
(root (boot-parameters-root-device params))
|
||||||
|
(root-device (if (bytevector? root)
|
||||||
|
(uuid->string root)
|
||||||
|
root))
|
||||||
(kernel (boot-parameters-kernel params))
|
(kernel (boot-parameters-kernel params))
|
||||||
(kernel-arguments (boot-parameters-kernel-arguments params)))
|
(kernel-arguments (boot-parameters-kernel-arguments params)))
|
||||||
(menu-entry
|
(menu-entry
|
||||||
|
@ -405,7 +409,7 @@ it atomically, and then run OS's activation script."
|
||||||
(seconds->string time) ")"))
|
(seconds->string time) ")"))
|
||||||
(linux kernel)
|
(linux kernel)
|
||||||
(linux-arguments
|
(linux-arguments
|
||||||
(cons* (string-append "--root=" root)
|
(cons* (string-append "--root=" root-device)
|
||||||
#~(string-append "--system=" #$system)
|
#~(string-append "--system=" #$system)
|
||||||
#~(string-append "--load=" #$system "/boot")
|
#~(string-append "--load=" #$system "/boot")
|
||||||
kernel-arguments))
|
kernel-arguments))
|
||||||
|
@ -478,13 +482,16 @@ list of services."
|
||||||
(params (call-with-input-file param-file read-boot-parameters))
|
(params (call-with-input-file param-file read-boot-parameters))
|
||||||
(label (boot-parameters-label params))
|
(label (boot-parameters-label params))
|
||||||
(root (boot-parameters-root-device params))
|
(root (boot-parameters-root-device params))
|
||||||
|
(root-device (if (bytevector? root)
|
||||||
|
(uuid->string root)
|
||||||
|
root))
|
||||||
(kernel (boot-parameters-kernel params)))
|
(kernel (boot-parameters-kernel params)))
|
||||||
(display-generation profile number)
|
(display-generation profile number)
|
||||||
(format #t (_ " file name: ~a~%") generation)
|
(format #t (_ " file name: ~a~%") generation)
|
||||||
(format #t (_ " canonical file name: ~a~%") (readlink* generation))
|
(format #t (_ " canonical file name: ~a~%") (readlink* generation))
|
||||||
;; TRANSLATORS: Please preserve the two-space indentation.
|
;; TRANSLATORS: Please preserve the two-space indentation.
|
||||||
(format #t (_ " label: ~a~%") label)
|
(format #t (_ " label: ~a~%") label)
|
||||||
(format #t (_ " root device: ~a~%") root)
|
(format #t (_ " root device: ~a~%") root-device)
|
||||||
(format #t (_ " kernel: ~a~%") kernel))))
|
(format #t (_ " kernel: ~a~%") kernel))))
|
||||||
|
|
||||||
(define* (list-generations pattern #:optional (profile %system-profile))
|
(define* (list-generations pattern #:optional (profile %system-profile))
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue