mirror of
https://git.in.rschanz.org/ryan77627/guix.git
synced 2024-11-07 07:26:13 -05:00
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.
This commit is contained in:
parent
1133596b42
commit
8fec416cec
3 changed files with 20 additions and 4 deletions
|
@ -1,7 +1,7 @@
|
|||
;;; GNU Guix --- Functional package management for GNU
|
||||
;;; Copyright © 2018 Mathieu Othacehe <m.othacehe@gmail.com>
|
||||
;;; Copyright © 2019 Ludovic Courtès <ludo@gnu.org>
|
||||
;;; Copyright © 2019 Tobias Geerinckx-Rice <me@tobias.gr>
|
||||
;;; Copyright © 2019, 2020 Tobias Geerinckx-Rice <me@tobias.gr>
|
||||
;;;
|
||||
;;; This file is part of GNU Guix.
|
||||
;;;
|
||||
|
@ -32,6 +32,7 @@ (define-module (gnu installer)
|
|||
#:use-module (gnu packages connman)
|
||||
#:use-module (gnu packages cryptsetup)
|
||||
#:use-module (gnu packages disk)
|
||||
#:use-module (gnu packages file-systems)
|
||||
#:use-module (gnu packages guile)
|
||||
#:use-module (gnu packages guile-xyz)
|
||||
#:autoload (gnu packages gnupg) (guile-gcrypt)
|
||||
|
@ -295,7 +296,8 @@ (define set-installer-path
|
|||
cryptsetup
|
||||
dosfstools ;mkfs.fat
|
||||
e2fsprogs ;mkfs.ext4
|
||||
btrfs-progs
|
||||
btrfs-progs ;mkfs.btrfs
|
||||
jfsutils ;jfs_mkfs
|
||||
kbd ;chvt
|
||||
guix ;guix system init call
|
||||
util-linux ;mkwap
|
||||
|
|
|
@ -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 @@ (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 swap)
|
||||
#:listbox-items '(ext4 btrfs fat16 fat32 jfs swap)
|
||||
#:listbox-item->text user-fs-type-name
|
||||
#:sort-listbox-items? #f
|
||||
#:button-text (G_ "Exit")
|
||||
|
|
|
@ -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 @@ (define (user-fs-type-name fs-type)
|
|||
((btrfs) "btrfs")
|
||||
((fat16) "fat16")
|
||||
((fat32) "fat32")
|
||||
((jfs) "jfs")
|
||||
((swap) "linux-swap")))
|
||||
|
||||
(define (user-fs-type->mount-type fs-type)
|
||||
|
@ -229,7 +231,8 @@ (define (user-fs-type->mount-type fs-type)
|
|||
((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 @@ (define (partition-filesystem-user-type partition)
|
|||
((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 @@ (define (create-fat32-file-system partition)
|
|||
(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 @@ (define (format-user-partitions user-partitions)
|
|||
(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
|
||||
|
|
Loading…
Reference in a new issue