[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
01/02: vm: Add a minimum root size.
From: |
Christopher Baines |
Subject: |
01/02: vm: Add a minimum root size. |
Date: |
Wed, 4 Oct 2017 02:16:58 -0400 (EDT) |
cbaines pushed a commit to branch master
in repository guix.
commit 0c75a4de497991912af0e4d252b90c283e162e5d
Author: Christopher Baines <address@hidden>
Date: Thu Sep 28 18:57:09 2017 +0100
vm: Add a minimum root size.
* gnu/system/vm.scm (qemu-image): When guessing the root-size, use a lower
bound of 20 MiB, otherwise the root file system size is sometimes 0 MiB in
size.
---
gnu/system/vm.scm | 9 ++++++---
1 file changed, 6 insertions(+), 3 deletions(-)
diff --git a/gnu/system/vm.scm b/gnu/system/vm.scm
index 78143e4..d340a85 100644
--- a/gnu/system/vm.scm
+++ b/gnu/system/vm.scm
@@ -304,9 +304,12 @@ the image."
#:register-closures? #$register-closures?
#:system-directory #$os-drv))
(root-size #$(if (eq? 'guess disk-image-size)
- #~(estimated-partition-size
- (map (cut string-append "/xchg/" <>)
- graphs))
+ #~(max
+ ;; Minimum 20 MiB root size
+ (* 20 (expt 2 20))
+ (estimated-partition-size
+ (map (cut string-append "/xchg/" <>)
+ graphs)))
(- disk-image-size
(* 50 (expt 2 20)))))
(partitions (list (partition