From patchwork Thu Oct 3 12:13:31 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Roman Scherer X-Patchwork-Id: 31610 Return-Path: X-Original-To: patchwork@mira.cbaines.net Delivered-To: patchwork@mira.cbaines.net Received: by mira.cbaines.net (Postfix, from userid 113) id CD4FD27BBEA; Thu, 3 Oct 2024 13:15:26 +0100 (BST) X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on mira.cbaines.net X-Spam-Level: X-Spam-Status: No, score=-8.6 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,MAILING_LIST_MULTI,RCVD_IN_DNSWL_BLOCKED, RCVD_IN_MSPIKE_H2,RCVD_IN_VALIDITY_CERTIFIED,RCVD_IN_VALIDITY_RPBL, RCVD_IN_VALIDITY_SAFE,SPF_HELO_PASS,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.6 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mira.cbaines.net (Postfix) with ESMTPS id 4CBA827BBE2 for ; Thu, 3 Oct 2024 13:15:26 +0100 (BST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1swKjX-00042t-U3; Thu, 03 Oct 2024 08:15:03 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1swKjV-00041a-M1 for guix-patches@gnu.org; Thu, 03 Oct 2024 08:15:01 -0400 Received: from debbugs.gnu.org ([2001:470:142:5::43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1swKjV-0000ef-Cd; Thu, 03 Oct 2024 08:15:01 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=debbugs.gnu.org; s=debbugs-gnu-org; h=MIME-Version:References:In-Reply-To:Date:From:To:Subject; bh=SPt+lkEbDzFZm1X8U/ekYOGL+C2KD+dAiLcDJNwN6o0=; b=nxlhZ+pcYbx3aZJLuipvZZTT+91PcVWW+mjvEwC8Hn/Jp8IcjDbUS0Rul4hlryeLUMimA+KNJq8nmwSuQuyCghf1OwXHKsI6vEstklDEQ37L4V7BesE1RinA8ZjaqhBahEsF3aXnewGwMFiT5YwyduRCDUqAeG7tWOD3b6ESLW3SbaxJkGrp2jVfDQ6AG71ABm0BOvxhNqzVt/YBYv2iXo/ZWcwJMXaTNrLmHKebXM59MbDvk+EagIK4SeOD8sEdzFYCvv4yRg4JYIVLCXpz+WqSxpjr/IIow0yO8+bQW1I4FD9CJstYvD6Af5veiULRkLttkqsSvm6AI7dttsuCcw==; Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1swKjX-0008Jc-2c; Thu, 03 Oct 2024 08:15:03 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#73612] [PATCH 1/2] image: Use file system options in make-vfat-image. Resent-From: Roman Scherer Original-Sender: "Debbugs-submit" Resent-CC: pelzflorian@pelzflorian.de, ludo@gnu.org, maxim.cournoyer@gmail.com, guix-patches@gnu.org Resent-Date: Thu, 03 Oct 2024 12:15:03 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 73612 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 73612@debbugs.gnu.org Cc: Roman Scherer , Florian Pelz , Ludovic Court?s , Maxim Cournoyer X-Debbugs-Original-Xcc: Florian Pelz , Ludovic Court?s , Maxim Cournoyer Received: via spool by 73612-submit@debbugs.gnu.org id=B73612.172795768931922 (code B ref 73612); Thu, 03 Oct 2024 12:15:03 +0000 Received: (at 73612) by debbugs.gnu.org; 3 Oct 2024 12:14:49 +0000 Received: from localhost ([127.0.0.1]:60236 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1swKjI-0008In-MO for submit@debbugs.gnu.org; Thu, 03 Oct 2024 08:14:48 -0400 Received: from mail-ej1-f54.google.com ([209.85.218.54]:51542) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1swKjF-0008IN-Iy for 73612@debbugs.gnu.org; Thu, 03 Oct 2024 08:14:45 -0400 Received: by mail-ej1-f54.google.com with SMTP id a640c23a62f3a-a93c1cc74fdso150888766b.3 for <73612@debbugs.gnu.org>; Thu, 03 Oct 2024 05:14:43 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=burningswell-com.20230601.gappssmtp.com; s=20230601; t=1727957618; x=1728562418; darn=debbugs.gnu.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=SPt+lkEbDzFZm1X8U/ekYOGL+C2KD+dAiLcDJNwN6o0=; b=KG79CU1SerIm/RzFUV8Vi5pS98mVXygmNtJKAX+6FE5HxjUiAaVG2o4gv34zywMIY0 1IS9YJZpBy6YgiJDqPJnocRkHI3WbkiDN2TQh/2v0PibcCn1696ECTMryGxBYhLsIxey s30Eo5dA1Hl+wT2OcHLBbzxkf9RA3ZLsoGvYzZWqJfVnPP7IhFvggtoQMnpM4BKqSUwv CCLKTFMaRWG8leK8ZXC2xsui6kae5F2pEQECwEVaFmAUbfefJh1nWfwCcQ/LRg03Z6Za YvrDekgQAXdZc0aktNzsOjwwJH9AQZmEYqLOh+PYrNKsWQFhY5c3p4o2Hf1W0fjU/yw2 On1Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1727957618; x=1728562418; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=SPt+lkEbDzFZm1X8U/ekYOGL+C2KD+dAiLcDJNwN6o0=; b=VjZNTSriLcSXLvlJFdsvUha6fAiXkniYltlIdgZlPn8Re8pGk6H4shCn/Q+Si/eXmO HRpxkY9HRo9gR8GNne+c8nrd3KadJa20M+yOVuLVPjIBE++d98AvzMfrA96Xx1+P8+Cj DG14ly2mqsQTaTMFBoHA05NO5I6qv4wa96+SQnQsqPmEyKJ40vR5rNx6pR9tmRAHOehB Ue1WaaMpzioGWzP2LMAM7i1JK/ddvfR6zal/a1ii1uX0hSQ4oZ+IQ28CF5iM6o2U/Ccb sPqpYozgxWG+EUF8JD2pkH4I1f99dmVtL6Z4hexMIBol+Qke/KMYlv56QwQ7BGMR7MVi k5Yw== X-Gm-Message-State: AOJu0YxfDIib0aCnk+XKwFnI4+HTFdiN2sLHupCtdn0ocpCeOl/UOM2m 3ZtmlAMkfQtnCneKmqDxEl6IvC0eAkkfMTbt4siwyoGn7DNs4+XLlTNhvY5PaAIh0/dr8maoUzf y X-Google-Smtp-Source: AGHT+IGDiYyAH4Q4eZLe01sacikD6/KU39xysWsSYRWxYWia5kBkehReqBtZgY/mZyeeOXDzf6T23Q== X-Received: by 2002:a17:907:2689:b0:a90:348f:fad7 with SMTP id a640c23a62f3a-a98f829695dmr629781366b.38.1727957617812; Thu, 03 Oct 2024 05:13:37 -0700 (PDT) Received: from localhost.localdomain ([2a01:599:11c:96e4:28c8:f563:d9da:c488]) by smtp.gmail.com with ESMTPSA id a640c23a62f3a-a99104c6d1esm78088066b.189.2024.10.03.05.13.36 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 03 Oct 2024 05:13:37 -0700 (PDT) From: Roman Scherer Date: Thu, 3 Oct 2024 14:13:31 +0200 Message-ID: <2afad4c3208e6bb3d2a4e65f151fdcc58dae8b61.1727957293.git.roman@burningswell.com> X-Mailer: git-send-email 2.46.0 In-Reply-To: References: MIME-Version: 1.0 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: guix-patches@gnu.org List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-patches-bounces+patchwork=mira.cbaines.net@gnu.org Sender: guix-patches-bounces+patchwork=mira.cbaines.net@gnu.org X-getmail-retrieved-from-mailbox: Patches * gnu/build/image.scm (make-vfat-image): Use file system options. Change-Id: I791aadd2803d1ef96fc79cf8910a74a0083d2b6e --- doc/guix.texi | 3 ++- gnu/build/image.scm | 24 ++++++++++++++---------- 2 files changed, 16 insertions(+), 11 deletions(-) diff --git a/doc/guix.texi b/doc/guix.texi index 52e36e4354..87904761f0 100644 --- a/doc/guix.texi +++ b/doc/guix.texi @@ -47918,7 +47918,8 @@ partition Reference @item @code{file-system-options} (default: @code{'()}) The partition file system creation options that should be passed to the partition creation tool, as a list of strings. This is only supported -when creating @code{"ext4"} partitions. +when creating @code{"vfat"}, @code{"fat16"}, @code{"fat32"} or +@code{"ext4"} partitions. See the @code{"extended-options"} man page section of the @code{"mke2fs"} tool for a more complete reference. diff --git a/gnu/build/image.scm b/gnu/build/image.scm index 6ca0a428e0..50518585f8 100644 --- a/gnu/build/image.scm +++ b/gnu/build/image.scm @@ -105,17 +105,21 @@ (define* (make-vfat-image partition target root fs-bits) "Handle the creation of VFAT partition images. See 'make-partition-image'." (let ((size (partition-size partition)) (label (partition-label partition)) - (flags (partition-flags partition))) + (flags (partition-flags partition)) + (fs-options (partition-file-system-options partition))) (apply invoke "fakeroot" "mkdosfs" "-n" label "-C" target - "-F" (number->string fs-bits) - (size-in-kib - (if (eq? size 'guess) - (estimate-partition-size root) - size)) - ;; u-boot in particular needs the formatted block - ;; size and the physical block size to be equal. - ;; TODO: What about 4k blocks? - (if (member 'esp flags) (list "-S" "512") '())) + "-F" (number->string fs-bits) + (size-in-kib + (if (eq? size 'guess) + (estimate-partition-size root) + size)) + ;; u-boot in particular needs the formatted block + ;; size and the physical block size to be equal. + ;; TODO: What about 4k blocks? + (if (and (member 'esp flags) + (not (member "-S" fs-options))) + (append (list "-S" "512") fs-options) + fs-options)) (for-each (lambda (file) (unless (member file '("." "..")) (invoke "mcopy" "-bsp" "-i" target From patchwork Thu Oct 3 12:13:32 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Roman Scherer X-Patchwork-Id: 31609 Return-Path: X-Original-To: patchwork@mira.cbaines.net Delivered-To: patchwork@mira.cbaines.net Received: by mira.cbaines.net (Postfix, from userid 113) id 169FA27BBEA; Thu, 3 Oct 2024 13:15:14 +0100 (BST) X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on mira.cbaines.net X-Spam-Level: X-Spam-Status: No, score=-8.6 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,MAILING_LIST_MULTI,RCVD_IN_DNSWL_BLOCKED, RCVD_IN_MSPIKE_H2,RCVD_IN_VALIDITY_CERTIFIED,RCVD_IN_VALIDITY_RPBL, RCVD_IN_VALIDITY_SAFE,SPF_HELO_PASS,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.6 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mira.cbaines.net (Postfix) with ESMTPS id 32FE127BBE2 for ; Thu, 3 Oct 2024 13:15:13 +0100 (BST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1swKjW-000426-UW; Thu, 03 Oct 2024 08:15:02 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1swKjV-00041C-4H for guix-patches@gnu.org; Thu, 03 Oct 2024 08:15:01 -0400 Received: from debbugs.gnu.org ([2001:470:142:5::43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1swKjU-0000eZ-Rj; Thu, 03 Oct 2024 08:15:00 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=debbugs.gnu.org; s=debbugs-gnu-org; h=MIME-Version:References:In-Reply-To:Date:From:To:Subject; bh=YQPlJc5zN9a9lk0fsYXF3Q8GOGieM7xJoADiitgiv5E=; b=NWTiTaMgwskhC3qxW4K1gjiwdVluXg7u/WjeimK1wPNmkvcxnGVt5SVDuhbWYwYEtKvrCYHQWi87HmmCAYPfCgiY0fIK4pFDXW7W4qnpEnl1s8Q27DuPYdzfCSmzxCoPellHMoNPv0rejLFWNnu/IJ2Oe7pmDaQYxsXi0flVn90GkaKr4hcppW/hVsc3UKQjFTDeXZAeSP1reNQOLT7TmfrUegZyMdWnzHMNmWc4B0Hc4zO454wXgxXxYB5Q8oNe9LflwztaNoE6z5/ZwjwbOrSr5tCoGfyFvheVeTubPMHXglWeYNnUB8EDNJPNinE33R1stS1CgBJY1MdnQ3xbmA==; Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1swKjW-0008JT-Hs; Thu, 03 Oct 2024 08:15:02 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#73612] [PATCH 2/2] image: Add support for btrfs. Resent-From: Roman Scherer Original-Sender: "Debbugs-submit" Resent-CC: pelzflorian@pelzflorian.de, ludo@gnu.org, maxim.cournoyer@gmail.com, guix-patches@gnu.org Resent-Date: Thu, 03 Oct 2024 12:15:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 73612 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 73612@debbugs.gnu.org Cc: Roman Scherer , Florian Pelz , Ludovic Court?s , Maxim Cournoyer X-Debbugs-Original-Xcc: Florian Pelz , Ludovic Court?s , Maxim Cournoyer Received: via spool by 73612-submit@debbugs.gnu.org id=B73612.172795768631913 (code B ref 73612); Thu, 03 Oct 2024 12:15:02 +0000 Received: (at 73612) by debbugs.gnu.org; 3 Oct 2024 12:14:46 +0000 Received: from localhost ([127.0.0.1]:60234 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1swKjG-0008Ie-8w for submit@debbugs.gnu.org; Thu, 03 Oct 2024 08:14:46 -0400 Received: from mail-lf1-f44.google.com ([209.85.167.44]:47560) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1swKjD-0008IR-Uj for 73612@debbugs.gnu.org; Thu, 03 Oct 2024 08:14:44 -0400 Received: by mail-lf1-f44.google.com with SMTP id 2adb3069b0e04-5399651d21aso767669e87.3 for <73612@debbugs.gnu.org>; Thu, 03 Oct 2024 05:14:42 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=burningswell-com.20230601.gappssmtp.com; s=20230601; t=1727957621; x=1728562421; darn=debbugs.gnu.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=YQPlJc5zN9a9lk0fsYXF3Q8GOGieM7xJoADiitgiv5E=; b=uueIlAxYr4Iw0vg2HsStlTekOP0R5E1WTjzQtdaHeMUBteV5UH0GVaOjHkfIFEM3Va NsFaejHl7Yh8bI0RImhuv62JGXpdYsleRgmnkkB1VP9iDChfjA3rV3yOSl0erJUQEg/t 4LtHRVH0x5xJfLHpoOy5uq0WSFwKLJt6UmjOZYIGDTdNkJ+iXZBAikDn3go88PAdssof REUOJjJHAVd15Y5Bk6JbpxXLo6XFdl6Y6fCAsFx+YlLo2frnyna4zEF/SS0FN0xxySo6 nHAMZD8IrZyyfinHoxQO7dFoKSp1CwyVHvS6Qbr9RXXzVOiD6GhbP6hXEfdj0TZ6BOgC b6NA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1727957621; x=1728562421; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=YQPlJc5zN9a9lk0fsYXF3Q8GOGieM7xJoADiitgiv5E=; b=vK9UWe9UI1iggKAGT8NcuBzaDgCuE3IOtm3+lCmOA1D9YVMycRgGIHsyQhrM/UABCI q8uMcfI1GAJMRgLKdarX6Nt0o9EpuiUzc0n+0C2CCIVTUJMvhiEkdEh9wdWngN7y5188 o6KqWf3E9a9cyAoZ8Hk2Y46RzsNfetfbVF66SRR1JBsoe/YmkDwNVzA4KkEhHzDgQp9e VHKQQSAe4C+g3wvXmvEKrACI/wBtJwp5m0fj+dJjjF+skxHNm1Imf07PZPEvgXrqaFk6 8lQXOvUF16PtRcxCjCOMS1bJjjam7Y+R9qKwLn/AJgB5dzwgweVM1cNsGpwsEmY4GBxQ wkjQ== X-Gm-Message-State: AOJu0YxfeclX40ahDzjlnZqwwko0kzDTSzC6abLLSDvP4ZDe9JiA6/ug lsXu2UF1j1BvU1MNWLiLcgHGPZPVm2cRE1J7XgLK1hDtHIVQfqJMwWI2l/nujNHwqlsZmpAYtPX w X-Google-Smtp-Source: AGHT+IG0HAXq+/Kyt3FOKyc+HbxDdi+vVJhaEt66PErUYRlr/rbLnZogO6kWz/mzcmy+ZAsy0wtPtA== X-Received: by 2002:a05:6512:398c:b0:539:979e:8952 with SMTP id 2adb3069b0e04-539a07a8e62mr3960443e87.59.1727957620551; Thu, 03 Oct 2024 05:13:40 -0700 (PDT) Received: from localhost.localdomain ([2a01:599:11c:96e4:28c8:f563:d9da:c488]) by smtp.gmail.com with ESMTPSA id a640c23a62f3a-a99104c6d1esm78088066b.189.2024.10.03.05.13.39 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 03 Oct 2024 05:13:40 -0700 (PDT) From: Roman Scherer Date: Thu, 3 Oct 2024 14:13:32 +0200 Message-ID: <2858a7b9fa0f064f3dc8130a6e786828ce7206ee.1727957293.git.roman@burningswell.com> X-Mailer: git-send-email 2.46.0 In-Reply-To: References: MIME-Version: 1.0 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: guix-patches@gnu.org List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-patches-bounces+patchwork=mira.cbaines.net@gnu.org Sender: guix-patches-bounces+patchwork=mira.cbaines.net@gnu.org X-getmail-retrieved-from-mailbox: Patches * gnu/build/image.scm (make-btrfs-image): New variable. * gnu/system/image.scm (system-disk-image): Support btrfs. Change-Id: I80a5b52ec478ce5927d6208e324cbb70282c647a --- doc/guix.texi | 2 +- gnu/build/image.scm | 19 +++++++++++++++++++ gnu/system/image.scm | 8 ++++++-- 3 files changed, 26 insertions(+), 3 deletions(-) diff --git a/doc/guix.texi b/doc/guix.texi index 87904761f0..34970fa398 100644 --- a/doc/guix.texi +++ b/doc/guix.texi @@ -47910,7 +47910,7 @@ partition Reference The partition file system as a string, defaulting to @code{"ext4"}. The supported values are @code{"vfat"}, @code{"fat16"}, @code{"fat32"}, -and @code{"ext4"}. +@code{"btrfs"}, and @code{"ext4"}. @code{"vfat"}, @code{"fat16"}, and @code{"fat32"} partitions without the @code{'esp} flag are by default LBA compatible. diff --git a/gnu/build/image.scm b/gnu/build/image.scm index 50518585f8..2332b72b17 100644 --- a/gnu/build/image.scm +++ b/gnu/build/image.scm @@ -73,6 +73,23 @@ (define (estimate-partition-size root) (max (ash 1 20) (* 1.25 (file-size root)))) +(define* (make-btrfs-image partition target root) + "Handle the creation of BTRFS partition images. See +'make-partition-image'." + (let ((size (partition-size partition)) + (fs-options (partition-file-system-options partition)) + (label (partition-label partition)) + (uuid (partition-uuid partition))) + (apply invoke + `("fakeroot" "mkfs.btrfs" "-r" ,root + "-L" ,label + ,@(if uuid + `("-U" ,(uuid->string uuid)) + '()) + "--shrink" + ,@fs-options + ,target)))) + (define* (make-ext-image partition target root #:key (owner-uid 0) @@ -141,6 +158,8 @@ (define* (make-partition-image partition-sexp target root) (let* ((partition (sexp->partition partition-sexp)) (type (partition-file-system partition))) (cond + ((string=? "btrfs" type) + (make-btrfs-image partition target root)) ((string-prefix? "ext" type) (make-ext-image partition target root)) ((or (string=? type "vfat") (string=? type "fat16")) diff --git a/gnu/system/image.scm b/gnu/system/image.scm index b0c96c60f0..af0f3eb354 100644 --- a/gnu/system/image.scm +++ b/gnu/system/image.scm @@ -402,7 +402,8 @@ (define* (system-disk-image image (file-system (partition-file-system partition))) (cond ((member 'esp flags) "0xEF") - ((string-prefix? "ext" file-system) "0x83") + ((or (string=? file-system "btrfs") + (string-prefix? "ext" file-system)) "0x83") ((or (string=? file-system "vfat") (string=? file-system "fat16")) "0x0E") ((string=? file-system "fat32") "0x0C") @@ -421,7 +422,8 @@ (define* (system-disk-image image (file-system (partition-file-system partition))) (cond ((member 'esp flags) "U") - ((string-prefix? "ext" file-system) "L") + ((or (string=? file-system "btrfs") + (string-prefix? "ext" file-system)) "L") ((or (string=? file-system "vfat") (string=? file-system "fat16") (string=? file-system "fat32")) "F") @@ -453,6 +455,8 @@ (define* (system-disk-image image (let ((initializer (or #$(partition-initializer partition) initialize-root-partition)) (inputs '#+(cond + ((string=? type "btrfs") + (list btrfs-progs fakeroot)) ((string-prefix? "ext" type) (list e2fsprogs fakeroot)) ((or (string=? type "vfat")