summary refs log tree commit diff
path: root/gnu/system/vm.scm
diff options
context:
space:
mode:
authorLudovic Courtès <ludo@gnu.org>2020-04-01 15:08:11 +0200
committerLudovic Courtès <ludo@gnu.org>2020-04-11 19:22:25 +0200
commit4d1ff68d731fdc47ca1220863fee07a685a26616 (patch)
tree4cfc7ade29bb15a9928cf78b403f6136279e1628 /gnu/system/vm.scm
parent82782d8cecec974c03ec95824f62455f0a795815 (diff)
downloadguix-4d1ff68d731fdc47ca1220863fee07a685a26616.tar.gz
vm: 'qemu-image' can pass options to the 'mkfs' command.
* gnu/build/vm.scm (<partition>)[file-system-options]: New field.
(create-ext-file-system, create-fat-file-system)
(format-partition): Add #:options and honor it.
(initialize-partition): Pass #:options to 'format-partition'.
* gnu/system/vm.scm (qemu-image): Add #:file-system-options and use it
for the root partition.
Diffstat (limited to 'gnu/system/vm.scm')
-rw-r--r--gnu/system/vm.scm5
1 files changed, 4 insertions, 1 deletions
diff --git a/gnu/system/vm.scm b/gnu/system/vm.scm
index 8baed372cb..65e96d42ee 100644
--- a/gnu/system/vm.scm
+++ b/gnu/system/vm.scm
@@ -368,6 +368,7 @@ INPUTS is a list of inputs (as for packages)."
                      (disk-image-size 'guess)
                      (disk-image-format "qcow2")
                      (file-system-type "ext4")
+                     (file-system-options '())
                      (extra-directives '())
                      file-system-label
                      file-system-uuid
@@ -382,7 +383,8 @@ INPUTS is a list of inputs (as for packages)."
 'qcow2' or 'raw'), with a root partition of type FILE-SYSTEM-TYPE.
 Optionally, FILE-SYSTEM-LABEL can be specified as the volume name for the root
 partition; likewise FILE-SYSTEM-UUID, if true, specifies the UUID of the root
-partition (a UUID object).
+partition (a UUID object).  FILE-SYSTEM-OPTIONS is an optional list of
+command-line options passed to 'mkfs.ext4' (or similar).
 
 The returned image is a full disk image that runs OS-DERIVATION,
 with a GRUB installation that uses GRUB-CONFIGURATION as its configuration
@@ -472,6 +474,7 @@ system that is passed to 'populate-root-file-system'."
                              (uuid #$(and=> file-system-uuid
                                             uuid-bytevector))
                              (file-system #$file-system-type)
+                             (file-system-options '#$file-system-options)
                              (flags '(boot))
                              (initializer initialize)))
                       ;; Append a small EFI System Partition for use with UEFI