summaryrefslogtreecommitdiff
path: root/gnu/system
diff options
context:
space:
mode:
authorLudovic Courtès <ludo@gnu.org>2022-07-01 10:26:17 +0200
committerLudovic Courtès <ludo@gnu.org>2022-07-01 12:10:28 +0200
commit9f530ef38a23caa1136f93cda45d396ce8fe1569 (patch)
treee22c999dbc8a1fa983c59c21fa444984ec6be7f1 /gnu/system
parente871c3a857005c2c55fcbf4dbd48e22fe33b6451 (diff)
image: Add default value for partition initializer.
Previously, the default value would lead to a wrong-type-to-apply crash. * gnu/system/image.scm (system-disk-image)[image-builder]: When 'partition-initializer' returns #f, fall back to INITIALIZE-ROOT-PARTITION. * gnu/tests/base.scm (run-root-unmount-test)[test-image]: Remove 'initializer' field of partition. * gnu/image.scm (<partition>)[initializer]: Add comment.
Diffstat (limited to 'gnu/system')
-rw-r--r--gnu/system/image.scm3
1 files changed, 2 insertions, 1 deletions
diff --git a/gnu/system/image.scm b/gnu/system/image.scm
index f1739a35c1..60ae38f6d8 100644
--- a/gnu/system/image.scm
+++ b/gnu/system/image.scm
@@ -374,7 +374,8 @@ used in the image."
(type (partition-file-system partition))
(image-builder
(with-imported-modules*
- (let ((initializer #$(partition-initializer partition))
+ (let ((initializer (or #$(partition-initializer partition)
+ initialize-root-partition))
(inputs '#+(list e2fsprogs fakeroot dosfstools mtools))
(image-root "tmp-root"))
(sql-schema #$schema)