summary refs log tree commit diff
path: root/gnu/installer/parted.scm
diff options
context:
space:
mode:
authorTobias Geerinckx-Rice <me@tobias.gr>2021-09-23 13:05:43 +0200
committerTobias Geerinckx-Rice <me@tobias.gr>2021-09-23 18:17:18 +0200
commitf34b8087411cffb0a572c0ecdce92084f0593fd4 (patch)
tree99c30df45e7acaa31382d02a42b4342bf66db225 /gnu/installer/parted.scm
parent9e0509f9af4c7ce24622285dff3d1967e65bce7d (diff)
downloadguix-f34b8087411cffb0a572c0ecdce92084f0593fd4.tar.gz
installer: Support XFS.
* gnu/installer/newt/partition.scm (run-fs-type-page): Add ‘xfs’ to the
list box.
* gnu/installer/parted.scm (user-fs-type-name, user-fs-type->mount-type)
(partition-filesystem-user-type): Add ‘xfs’ mapping.
(create-xfs-file-system): New procedure.
(format-user-partitions): Use it.
* gnu/installer.scm (set-installer-path): Add xfsprogs.
Diffstat (limited to 'gnu/installer/parted.scm')
-rw-r--r--gnu/installer/parted.scm14
1 files changed, 13 insertions, 1 deletions
diff --git a/gnu/installer/parted.scm b/gnu/installer/parted.scm
index c000b1dec2..83a88368ef 100644
--- a/gnu/installer/parted.scm
+++ b/gnu/installer/parted.scm
@@ -231,6 +231,7 @@ inferior to MAX-SIZE, #f otherwise."
     ((fat32) "fat32")
     ((jfs)   "jfs")
     ((ntfs)  "ntfs")
+    ((xfs)   "xfs")
     ((swap)  "linux-swap")))
 
 (define (user-fs-type->mount-type fs-type)
@@ -241,7 +242,8 @@ inferior to MAX-SIZE, #f otherwise."
     ((fat16) "vfat")
     ((fat32) "vfat")
     ((jfs)   "jfs")
-    ((ntfs)  "ntfs")))
+    ((ntfs)  "ntfs")
+    ((xfs)   "xfs")))
 
 (define (partition-filesystem-user-type partition)
   "Return the filesystem type of PARTITION, to be stored in the FS-TYPE field
@@ -256,6 +258,7 @@ of <user-partition> record."
             ((string=? name "fat32") 'fat32)
             ((string=? name "jfs") 'jfs)
             ((string=? name "ntfs") 'ntfs)
+            ((string=? name "xfs") 'xfs)
             ((or (string=? name "swsusp")
                  (string=? name "linux-swap(v0)")
                  (string=? name "linux-swap(v1)"))
@@ -1125,6 +1128,11 @@ bit bucket."
   (with-null-output-ports
    (invoke "mkfs.ntfs" "-F" "-f" partition)))
 
+(define (create-xfs-file-system partition)
+  "Create an XFS file-system for PARTITION file-name."
+  (with-null-output-ports
+   (invoke "mkfs.xfs" "-f" partition)))
+
 (define (create-swap-partition partition)
   "Set up swap area on PARTITION file-name."
   (with-null-output-ports
@@ -1206,6 +1214,10 @@ NEED-FORMATING? field set to #t."
           (and need-formatting?
                (not (eq? type 'extended))
                (create-ntfs-file-system file-name)))
+         ((xfs)
+          (and need-formatting?
+               (not (eq? type 'extended))
+               (create-xfs-file-system file-name)))
          ((swap)
           (create-swap-partition file-name))
          (else