[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
08/10: vm: 'system-disk-image' no longer requires the OS to define the "
From: |
guix-commits |
Subject: |
08/10: vm: 'system-disk-image' no longer requires the OS to define the "/" file system. |
Date: |
Wed, 24 Apr 2019 18:46:15 -0400 (EDT) |
civodul pushed a commit to branch master
in repository guix.
commit 5be7aecd1443cdb60fe0252e62767cf1193bf6bd
Author: Ludovic Courtès <address@hidden>
Date: Wed Apr 24 21:56:03 2019 +0200
vm: 'system-disk-image' no longer requires the OS to define the "/" file
system.
Previously 'guix system disk-image' would fail if the OS didn't define a
"/" file system, even though it actually overrides that file system.
* gnu/system/vm.scm (system-disk-image)[root-uuid]: Turn into a
procedure.
Call 'root-uuid' on a variant of OS with a "/" file system and inherit
from that.
---
gnu/system/vm.scm | 19 ++++++++++++++-----
1 file changed, 14 insertions(+), 5 deletions(-)
diff --git a/gnu/system/vm.scm b/gnu/system/vm.scm
index 22e3fcc..92b03b0 100644
--- a/gnu/system/vm.scm
+++ b/gnu/system/vm.scm
@@ -617,7 +617,7 @@ to USB sticks meant to be read-only."
;; Volume name of the root file system.
(normalize-label "Guix_image"))
- (define root-uuid
+ (define (root-uuid os)
;; UUID of the root file system, computed in a deterministic fashion.
;; This is what we use to locate the root file system so it has to be
;; different from the user's own file system UUIDs.
@@ -647,17 +647,26 @@ to USB sticks meant to be read-only."
(bootloader grub-mkrescue-bootloader))
(operating-system-bootloader os)))
- ;; Force our own root file system.
+ ;; Force our own root file system. (We need a "/" file system
+ ;; to call 'root-uuid'.)
(file-systems (cons (file-system
(mount-point "/")
- (device root-uuid)
+ (device "/dev/placeholder")
+ (type file-system-type))
+ file-systems-to-keep))))
+ (uuid (root-uuid os))
+ (os (operating-system
+ (inherit os)
+ (file-systems (cons (file-system
+ (mount-point "/")
+ (device uuid)
(type file-system-type))
file-systems-to-keep))))
(bootcfg (operating-system-bootcfg os)))
(if (string=? "iso9660" file-system-type)
(iso9660-image #:name name
#:file-system-label root-label
- #:file-system-uuid root-uuid
+ #:file-system-uuid uuid
#:os os
#:register-closures? #t
#:bootcfg-drv bootcfg
@@ -674,7 +683,7 @@ to USB sticks meant to be read-only."
#:disk-image-format "raw"
#:file-system-type file-system-type
#:file-system-label root-label
- #:file-system-uuid root-uuid
+ #:file-system-uuid uuid
#:copy-inputs? #t
#:register-closures? #t
#:inputs `(("system" ,os)
- branch master updated (9374cbd -> ecb33b8), guix-commits, 2019/04/24
- 10/10: vm: Adjust FAT serial number code to 32-bit Guile., guix-commits, 2019/04/24
- 05/10: installer: Ask for user password and initialize /etc/shadow., guix-commits, 2019/04/24
- 08/10: vm: 'system-disk-image' no longer requires the OS to define the "/" file system.,
guix-commits <=
- 09/10: installer: Preserve order of user accounts., guix-commits, 2019/04/24
- 07/10: installer: Ask for the root account password., guix-commits, 2019/04/24
- 03/10: self: Install 'guix.zh_CN.info'., guix-commits, 2019/04/24
- 06/10: installer: 'run-input-page' has a new #:input-flags parameter., guix-commits, 2019/04/24
- 04/10: installer: Add missing 'G_' for networking message., guix-commits, 2019/04/24
- 01/10: install: Add node name in Castellano., guix-commits, 2019/04/24
- 02/10: system: Add guile-readline and guile-colorized to %BASE-PACKAGES., guix-commits, 2019/04/24