From f34b8087411cffb0a572c0ecdce92084f0593fd4 Mon Sep 17 00:00:00 2001 From: Tobias Geerinckx-Rice Date: Thu, 23 Sep 2021 13:05:43 +0200 Subject: installer: Support XFS. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * 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. --- gnu/installer/newt/partition.scm | 2 +- gnu/installer/parted.scm | 14 +++++++++++++- 2 files changed, 14 insertions(+), 2 deletions(-) (limited to 'gnu/installer') diff --git a/gnu/installer/newt/partition.scm b/gnu/installer/newt/partition.scm index fe30953a41..ea524eb4c3 100644 --- a/gnu/installer/newt/partition.scm +++ b/gnu/installer/newt/partition.scm @@ -131,7 +131,7 @@ (define (run-fs-type-page) (run-listbox-selection-page #:info-text (G_ "Please select the file-system type for this partition.") #:title (G_ "File-system type") - #:listbox-items '(ext4 btrfs fat16 fat32 jfs ntfs swap) + #:listbox-items '(ext4 btrfs fat16 fat32 jfs ntfs xfs swap) #:listbox-item->text user-fs-type-name #:sort-listbox-items? #f #:button-text (G_ "Exit") 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 @@ (define (user-fs-type-name fs-type) ((fat32) "fat32") ((jfs) "jfs") ((ntfs) "ntfs") + ((xfs) "xfs") ((swap) "linux-swap"))) (define (user-fs-type->mount-type fs-type) @@ -241,7 +242,8 @@ (define (user-fs-type->mount-type fs-type) ((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 @@ (define (partition-filesystem-user-type partition) ((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 @@ (define (create-ntfs-file-system partition) (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 @@ (define (format-user-partitions user-partitions) (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 -- cgit v1.2.3 From f1a3c11407b52004e523ec5de20d326c5661681f Mon Sep 17 00:00:00 2001 From: Tobias Geerinckx-Rice Date: Mon, 27 Sep 2021 16:37:51 +0200 Subject: installer: Fix typo in docstrings. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * gnu/packages/gnu/installer/parted.scm (force-user-partitions-formatting, format-user-partitions): Fix ‘formating’ docstring typo. --- gnu/installer/parted.scm | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'gnu/installer') diff --git a/gnu/installer/parted.scm b/gnu/installer/parted.scm index 83a88368ef..cbe676017b 100644 --- a/gnu/installer/parted.scm +++ b/gnu/installer/parted.scm @@ -898,7 +898,7 @@ (define* (create-adjacent-partitions! disk partitions (format #f "Unable to create partition ~a~%" name))))))))) (define (force-user-partitions-formatting user-partitions) - "Set the NEED-FORMATING? fields to #t on all records of + "Set the NEED-FORMATTING? fields to #t on all records of USER-PARTITIONS list and return the updated list." (map (lambda (p) (user-partition @@ -1177,7 +1177,7 @@ (define (luks-close user-partition) (define (format-user-partitions user-partitions) "Format the records in USER-PARTITIONS list with -NEED-FORMATING? field set to #t." +NEED-FORMATTING? field set to #t." (for-each (lambda (user-partition) (let* ((need-formatting? -- cgit v1.2.3