[PATCH] installer: Create btrfs file system.

  • Done
  • quality assurance status badge
Details
2 participants
  • Danny Milosavljevic
  • Ludovic Courtès
Owner
unassigned
Submitted by
Danny Milosavljevic
Severity
normal
D
D
Danny Milosavljevic wrote on 9 May 2019 19:45
(address . guix-patches@gnu.org)(name . Danny Milosavljevic)(address . dannym@scratchpost.org)
20190509174537.7407-1-dannym@scratchpost.org
* gnu/installer/parted.scm (create-btrfs-file-system): New procedure.
(format-user-partitions): Use it.
---
gnu/installer/parted.scm | 9 +++++++++
1 file changed, 9 insertions(+)

Toggle diff (27 lines)
diff --git a/gnu/installer/parted.scm b/gnu/installer/parted.scm
index 7cc2217cbe..fc8c9de6f1 100644
--- a/gnu/installer/parted.scm
+++ b/gnu/installer/parted.scm
@@ -1042,6 +1042,11 @@ bit bucket."
(with-error-to-port (%make-void-port "w")
(lambda () exp ...)))))
+(define (create-btrfs-file-system partition)
+ "Create an btrfs file-system for PARTITION file-name."
+ (with-null-output-ports
+ (invoke "mkfs.btrfs" "-f" partition)))
+
(define (create-ext4-file-system partition)
"Create an ext4 file-system for PARTITION file-name."
(with-null-output-ports
@@ -1106,6 +1111,10 @@ NEED-FORMATING? field set to #t."
(luks-format-and-open user-partition))
(case fs-type
+ ((btrfs)
+ (and need-formatting?
+ (not (eq? type 'extended))
+ (create-btrfs-file-system file-name)))
((ext4)
(and need-formatting?
(not (eq? type 'extended))
L
L
Ludovic Courtès wrote on 10 May 2019 15:09
(name . Danny Milosavljevic)(address . dannym@scratchpost.org)(address . 35657@debbugs.gnu.org)
877eay1mo2.fsf@gnu.org
Hi Danny,

Danny Milosavljevic <dannym@scratchpost.org> skribis:

Toggle quote (3 lines)
> * gnu/installer/parted.scm (create-btrfs-file-system): New procedure.
> (format-user-partitions): Use it.

LGTM!

Actually I didn’t know one could choose Btrfs in the graphical
installer. :-) That’s in the manual partitioning scheme, right?

Thanks,
Ludo’.
D
D
Danny Milosavljevic wrote on 14 May 2019 01:12
(no subject)
(address . control@debbugs.gnu.org)
20190514011223.54a13342@scratchpost.org
close 35657
-----BEGIN PGP SIGNATURE-----

iQEzBAEBCAAdFiEEds7GsXJ0tGXALbPZ5xo1VCwwuqUFAlzZ+dcACgkQ5xo1VCww
uqUhYgf9ELiqgrG7Aey+Dwtmguwo7ijNs/sNmTIJE7X2z2Td+5C/+O4ThOzKfQ2r
AKr0KVhgyxgCbgmv2GKH424cINkmcatQdCSPZwJ4pvKIno9GX1PbEpUOF5RccjY5
mYOvDApCX+Q0hdm0pONuwjeVgCTsOGy01jqKt7awwzsujdoGLDVPiYxmvkFAdUw7
NlrqYduVEtE0RYnxJPeQUGwWkm9IX6ppalwCQDtAUS2OR7LM44ueIdUUMMfHSrHG
P2Fanf900lB42R2DAfaJxYn+SLv+XyReRsFLBKc5COK0iOKqfTFPrN3XxUY7+agv
3EbSooEfmSOINK2hBXzXKT9l9aMdsw==
=dD1L
-----END PGP SIGNATURE-----


?