diff options
| author | Tobias Geerinckx-Rice <me@tobias.gr> | 2020-01-03 19:26:54 +0100 |
|---|---|---|
| committer | Tobias Geerinckx-Rice <me@tobias.gr> | 2020-01-05 02:40:07 +0100 |
| commit | 8fec416cec6ffa5e2f1647eda8090fef1b0f71ac (patch) | |
| tree | 5b7694d26a21746eff6d1b12817263849f5fee79 /gnu/installer/parted.scm | |
| parent | 1133596b426e7ff291fee024273fb7dd0af9564e (diff) | |
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/parted.scm')
| -rw-r--r-- | gnu/installer/parted.scm | 15 |
1 files changed, 14 insertions, 1 deletions
diff --git a/gnu/installer/parted.scm b/gnu/installer/parted.scm index 519996ff12b..c2b02c92817 100644 --- a/gnu/installer/parted.scm +++ b/gnu/installer/parted.scm | |||
| @@ -1,6 +1,7 @@ | |||
| 1 | ;;; GNU Guix --- Functional package management for GNU | 1 | ;;; GNU Guix --- Functional package management for GNU |
| 2 | ;;; Copyright © 2018, 2019 Mathieu Othacehe <m.othacehe@gmail.com> | 2 | ;;; Copyright © 2018, 2019 Mathieu Othacehe <m.othacehe@gmail.com> |
| 3 | ;;; Copyright © 2019 Ludovic Courtès <ludo@gnu.org> | 3 | ;;; Copyright © 2019 Ludovic Courtès <ludo@gnu.org> |
| 4 | ;;; Copyright © 2020 Tobias Geerinckx-Rice <me@tobias.gr> | ||
| 4 | ;;; | 5 | ;;; |
| 5 | ;;; This file is part of GNU Guix. | 6 | ;;; This file is part of GNU Guix. |
| 6 | ;;; | 7 | ;;; |
| @@ -221,6 +222,7 @@ inferior to MAX-SIZE, #f otherwise." | |||
| 221 | ((btrfs) "btrfs") | 222 | ((btrfs) "btrfs") |
| 222 | ((fat16) "fat16") | 223 | ((fat16) "fat16") |
| 223 | ((fat32) "fat32") | 224 | ((fat32) "fat32") |
| 225 | ((jfs) "jfs") | ||
| 224 | ((swap) "linux-swap"))) | 226 | ((swap) "linux-swap"))) |
| 225 | 227 | ||
| 226 | (define (user-fs-type->mount-type fs-type) | 228 | (define (user-fs-type->mount-type fs-type) |
| @@ -229,7 +231,8 @@ inferior to MAX-SIZE, #f otherwise." | |||
| 229 | ((ext4) "ext4") | 231 | ((ext4) "ext4") |
| 230 | ((btrfs) "btrfs") | 232 | ((btrfs) "btrfs") |
| 231 | ((fat16) "fat") | 233 | ((fat16) "fat") |
| 232 | ((fat32) "vfat"))) | 234 | ((fat32) "vfat") |
| 235 | ((jfs) "jfs"))) | ||
| 233 | 236 | ||
| 234 | (define (partition-filesystem-user-type partition) | 237 | (define (partition-filesystem-user-type partition) |
| 235 | "Return the filesystem type of PARTITION, to be stored in the FS-TYPE field | 238 | "Return the filesystem type of PARTITION, to be stored in the FS-TYPE field |
| @@ -242,6 +245,7 @@ of <user-partition> record." | |||
| 242 | ((string=? name "btrfs") 'btrfs) | 245 | ((string=? name "btrfs") 'btrfs) |
| 243 | ((string=? name "fat16") 'fat16) | 246 | ((string=? name "fat16") 'fat16) |
| 244 | ((string=? name "fat32") 'fat32) | 247 | ((string=? name "fat32") 'fat32) |
| 248 | ((string=? name "jfs") 'jfs) | ||
| 245 | ((or (string=? name "swsusp") | 249 | ((or (string=? name "swsusp") |
| 246 | (string=? name "linux-swap(v0)") | 250 | (string=? name "linux-swap(v0)") |
| 247 | (string=? name "linux-swap(v1)")) | 251 | (string=? name "linux-swap(v1)")) |
| @@ -1031,6 +1035,11 @@ bit bucket." | |||
| 1031 | (with-null-output-ports | 1035 | (with-null-output-ports |
| 1032 | (invoke "mkfs.fat" "-F32" partition))) | 1036 | (invoke "mkfs.fat" "-F32" partition))) |
| 1033 | 1037 | ||
| 1038 | (define (create-jfs-file-system partition) | ||
| 1039 | "Create a JFS file-system for PARTITION file-name." | ||
| 1040 | (with-null-output-ports | ||
| 1041 | (invoke "jfs_mkfs" "-f" partition))) | ||
| 1042 | |||
| 1034 | (define (create-swap-partition partition) | 1043 | (define (create-swap-partition partition) |
| 1035 | "Set up swap area on PARTITION file-name." | 1044 | "Set up swap area on PARTITION file-name." |
| 1036 | (with-null-output-ports | 1045 | (with-null-output-ports |
| @@ -1101,6 +1110,10 @@ NEED-FORMATING? field set to #t." | |||
| 1101 | (and need-formatting? | 1110 | (and need-formatting? |
| 1102 | (not (eq? type 'extended)) | 1111 | (not (eq? type 'extended)) |
| 1103 | (create-fat32-file-system file-name))) | 1112 | (create-fat32-file-system file-name))) |
| 1113 | ((jfs) | ||
| 1114 | (and need-formatting? | ||
| 1115 | (not (eq? type 'extended)) | ||
| 1116 | (create-jfs-file-system file-name))) | ||
| 1104 | ((swap) | 1117 | ((swap) |
| 1105 | (create-swap-partition file-name)) | 1118 | (create-swap-partition file-name)) |
| 1106 | (else | 1119 | (else |
