summaryrefslogtreecommitdiff
path: root/gnu/installer/parted.scm
diff options
context:
space:
mode:
authorMathieu Othacehe <othacehe@gnu.org>2020-07-26 10:30:57 +0200
committerMathieu Othacehe <othacehe@gnu.org>2020-07-26 18:35:10 +0200
commit218a67dfabcdf592325a8f8c49b86478f69ff589 (patch)
tree3434eb6ae6ab76bfb7f91920f3c0cd35689c0419 /gnu/installer/parted.scm
parent675e56221e3dfc58cac94bf30835f16a9c41d530 (diff)
installer: Add NTFS support.
This adds support for creating and editing NTFS partitions. It is however not possible yet to create root NTFS partitions, as overlaying on top of a fuse partition does not seem supported. * gnu/installer.scm (installer-program): Add "ntfs-3g" to the inputs. * gnu/installer/parted.scm (user-fs-type-name, user-fs-type->mount-type, partition-filesystem-user-type, create-ntfs-file-system, format-user-partitions): Add NTFS support. * gnu/installer/newt/partition.scm (run-fs-type-page): Add NTFS support.
Diffstat (limited to 'gnu/installer/parted.scm')
-rw-r--r--gnu/installer/parted.scm16
1 files changed, 14 insertions, 2 deletions
diff --git a/gnu/installer/parted.scm b/gnu/installer/parted.scm
index 6c805cc0537..47e0a9e78d2 100644
--- a/gnu/installer/parted.scm
+++ b/gnu/installer/parted.scm
@@ -222,7 +222,8 @@ inferior to MAX-SIZE, #f otherwise."
222 ((btrfs) "btrfs") 222 ((btrfs) "btrfs")
223 ((fat16) "fat16") 223 ((fat16) "fat16")
224 ((fat32) "fat32") 224 ((fat32) "fat32")
225 ((jfs) "jfs") 225 ((jfs) "jfs")
226 ((ntfs) "ntfs")
226 ((swap) "linux-swap"))) 227 ((swap) "linux-swap")))
227 228
228(define (user-fs-type->mount-type fs-type) 229(define (user-fs-type->mount-type fs-type)
@@ -232,7 +233,8 @@ inferior to MAX-SIZE, #f otherwise."
232 ((btrfs) "btrfs") 233 ((btrfs) "btrfs")
233 ((fat16) "fat") 234 ((fat16) "fat")
234 ((fat32) "vfat") 235 ((fat32) "vfat")
235 ((jfs) "jfs"))) 236 ((jfs) "jfs")
237 ((ntfs) "ntfs")))
236 238
237(define (partition-filesystem-user-type partition) 239(define (partition-filesystem-user-type partition)
238 "Return the filesystem type of PARTITION, to be stored in the FS-TYPE field 240 "Return the filesystem type of PARTITION, to be stored in the FS-TYPE field
@@ -246,6 +248,7 @@ of <user-partition> record."
246 ((string=? name "fat16") 'fat16) 248 ((string=? name "fat16") 'fat16)
247 ((string=? name "fat32") 'fat32) 249 ((string=? name "fat32") 'fat32)
248 ((string=? name "jfs") 'jfs) 250 ((string=? name "jfs") 'jfs)
251 ((string=? name "ntfs") 'ntfs)
249 ((or (string=? name "swsusp") 252 ((or (string=? name "swsusp")
250 (string=? name "linux-swap(v0)") 253 (string=? name "linux-swap(v0)")
251 (string=? name "linux-swap(v1)")) 254 (string=? name "linux-swap(v1)"))
@@ -1040,6 +1043,11 @@ bit bucket."
1040 (with-null-output-ports 1043 (with-null-output-ports
1041 (invoke "jfs_mkfs" "-f" partition))) 1044 (invoke "jfs_mkfs" "-f" partition)))
1042 1045
1046(define (create-ntfs-file-system partition)
1047 "Create a JFS file-system for PARTITION file-name."
1048 (with-null-output-ports
1049 (invoke "mkfs.ntfs" "-F" "-f" partition)))
1050
1043(define (create-swap-partition partition) 1051(define (create-swap-partition partition)
1044 "Set up swap area on PARTITION file-name." 1052 "Set up swap area on PARTITION file-name."
1045 (with-null-output-ports 1053 (with-null-output-ports
@@ -1117,6 +1125,10 @@ NEED-FORMATING? field set to #t."
1117 (and need-formatting? 1125 (and need-formatting?
1118 (not (eq? type 'extended)) 1126 (not (eq? type 'extended))
1119 (create-jfs-file-system file-name))) 1127 (create-jfs-file-system file-name)))
1128 ((ntfs)
1129 (and need-formatting?
1130 (not (eq? type 'extended))
1131 (create-ntfs-file-system file-name)))
1120 ((swap) 1132 ((swap)
1121 (create-swap-partition file-name)) 1133 (create-swap-partition file-name))
1122 (else 1134 (else