summaryrefslogtreecommitdiff
path: root/gnu/installer
diff options
context:
space:
mode:
authorTobias Geerinckx-Rice <me@tobias.gr>2020-01-03 19:26:54 +0100
committerTobias Geerinckx-Rice <me@tobias.gr>2020-01-05 02:40:07 +0100
commit8fec416cec6ffa5e2f1647eda8090fef1b0f71ac (patch)
tree5b7694d26a21746eff6d1b12817263849f5fee79 /gnu/installer
parent1133596b426e7ff291fee024273fb7dd0af9564e (diff)
downloadpatches-8fec416cec6ffa5e2f1647eda8090fef1b0f71ac.tar
patches-8fec416cec6ffa5e2f1647eda8090fef1b0f71ac.tar.gz
installer: Add JFS support.
* gnu/installer/newt/partition.scm (run-fs-type-page): Add ‘jfs’ to the list box. * gnu/installer/parted.scm (user-fs-type-name, user-fs-type->mount-type) (partition-filesystem-user-type): Add ‘jfs’ mapping (create-jfs-file-system): New procedure. (format-user-partitions): Use it. * gnu/installer.scm (set-installer-path): Add jfsutils.
Diffstat (limited to 'gnu/installer')
-rw-r--r--gnu/installer/newt/partition.scm3
-rw-r--r--gnu/installer/parted.scm15
2 files changed, 16 insertions, 2 deletions
diff --git a/gnu/installer/newt/partition.scm b/gnu/installer/newt/partition.scm
index 74e9473171..3cba7f77dd 100644
--- a/gnu/installer/newt/partition.scm
+++ b/gnu/installer/newt/partition.scm
@@ -1,6 +1,7 @@
;;; GNU Guix --- Functional package management for GNU
;;; Copyright © 2018, 2019 Mathieu Othacehe <m.othacehe@gmail.com>
;;; Copyright © 2019 Ludovic Courtès <ludo@gnu.org>
+;;; Copyright © 2020 Tobias Geerinckx-Rice <me@tobias.gr>
;;;
;;; This file is part of GNU Guix.
;;;
@@ -120,7 +121,7 @@ Be careful, all data on the disk will be lost.")
(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 swap)
+ #:listbox-items '(ext4 btrfs fat16 fat32 jfs 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 519996ff12..c2b02c9281 100644
--- a/gnu/installer/parted.scm
+++ b/gnu/installer/parted.scm
@@ -1,6 +1,7 @@
;;; GNU Guix --- Functional package management for GNU
;;; Copyright © 2018, 2019 Mathieu Othacehe <m.othacehe@gmail.com>
;;; Copyright © 2019 Ludovic Courtès <ludo@gnu.org>
+;;; Copyright © 2020 Tobias Geerinckx-Rice <me@tobias.gr>
;;;
;;; This file is part of GNU Guix.
;;;
@@ -221,6 +222,7 @@ inferior to MAX-SIZE, #f otherwise."
((btrfs) "btrfs")
((fat16) "fat16")
((fat32) "fat32")
+ ((jfs) "jfs")
((swap) "linux-swap")))
(define (user-fs-type->mount-type fs-type)
@@ -229,7 +231,8 @@ inferior to MAX-SIZE, #f otherwise."
((ext4) "ext4")
((btrfs) "btrfs")
((fat16) "fat")
- ((fat32) "vfat")))
+ ((fat32) "vfat")
+ ((jfs) "jfs")))
(define (partition-filesystem-user-type partition)
"Return the filesystem type of PARTITION, to be stored in the FS-TYPE field
@@ -242,6 +245,7 @@ of <user-partition> record."
((string=? name "btrfs") 'btrfs)
((string=? name "fat16") 'fat16)
((string=? name "fat32") 'fat32)
+ ((string=? name "jfs") 'jfs)
((or (string=? name "swsusp")
(string=? name "linux-swap(v0)")
(string=? name "linux-swap(v1)"))
@@ -1031,6 +1035,11 @@ bit bucket."
(with-null-output-ports
(invoke "mkfs.fat" "-F32" partition)))
+(define (create-jfs-file-system partition)
+ "Create a JFS file-system for PARTITION file-name."
+ (with-null-output-ports
+ (invoke "jfs_mkfs" "-f" partition)))
+
(define (create-swap-partition partition)
"Set up swap area on PARTITION file-name."
(with-null-output-ports
@@ -1101,6 +1110,10 @@ NEED-FORMATING? field set to #t."
(and need-formatting?
(not (eq? type 'extended))
(create-fat32-file-system file-name)))
+ ((jfs)
+ (and need-formatting?
+ (not (eq? type 'extended))
+ (create-jfs-file-system file-name)))
((swap)
(create-swap-partition file-name))
(else