From 35770c78a2db5cced15f651fdf31ed9aae349899 Mon Sep 17 00:00:00 2001 From: Denis 'GNUtoo' Carikli Date: Mon, 13 Oct 2025 02:19:26 +0200 Subject: image: Add support for swap. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * gnu/build/image.scm (make-swap-image): New variable. (make-partition-image): Support swap. * gnu/system/image.scm (system-disk-image): Support swap. * doc/guix.texi: (partition Reference): Support swap. Change-Id: I1c201e6aa5dd207d53e5732617910860ee894990 Signed-off-by: Denis 'GNUtoo' Carikli Signed-off-by: Ludovic Courtès --- gnu/system/image.scm | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'gnu/system') diff --git a/gnu/system/image.scm b/gnu/system/image.scm index b89d3a67781..68a88bda0f2 100644 --- a/gnu/system/image.scm +++ b/gnu/system/image.scm @@ -403,6 +403,7 @@ used in the image." (file-system (partition-file-system partition))) (cond ((member 'esp flags) "0xEF") + ((string=? file-system "swap") "0x82") ((or (string=? file-system "btrfs") (string-prefix? "ext" file-system) (string=? file-system "f2fs")) "0x83") @@ -430,6 +431,7 @@ used in the image." ((or (string=? file-system "vfat") (string=? file-system "fat16") (string=? file-system "fat32")) "F") + ((string=? file-system "swap") "S") ((and (string=? file-system "unformatted") (partition-uuid partition)) (uuid->string (partition-uuid partition))) @@ -464,6 +466,8 @@ used in the image." (list e2fsprogs fakeroot)) ((string=? type "f2fs") (list f2fs-tools fakeroot)) + ((string=? type "swap") + (list fakeroot util-linux)) ((or (string=? type "vfat") (string-prefix? "fat" type)) (list dosfstools fakeroot mtools)) -- cgit v1.3