From debbugs-submit-bounces@debbugs.gnu.org Thu Oct 03 08:11:28 2024 Received: (at submit) by debbugs.gnu.org; 3 Oct 2024 12:11:28 +0000 Received: from localhost ([127.0.0.1]:60221 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1swKg4-0008CZ-4j for submit@debbugs.gnu.org; Thu, 03 Oct 2024 08:11:28 -0400 Received: from lists.gnu.org ([209.51.188.17]:42728) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1swKg3-0008CR-1W for submit@debbugs.gnu.org; Thu, 03 Oct 2024 08:11:27 -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 1swKg0-0003XX-IH for guix-patches@gnu.org; Thu, 03 Oct 2024 08:11:25 -0400 Received: from mail-ej1-x631.google.com ([2a00:1450:4864:20::631]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1swKfy-0007vr-Gi for guix-patches@gnu.org; Thu, 03 Oct 2024 08:11:24 -0400 Received: by mail-ej1-x631.google.com with SMTP id a640c23a62f3a-a8d6ac24a3bso179786166b.1 for ; Thu, 03 Oct 2024 05:11:20 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=burningswell-com.20230601.gappssmtp.com; s=20230601; t=1727957479; x=1728562279; darn=gnu.org; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:from:to:cc:subject:date:message-id:reply-to; bh=uIB5EPFug0/5SbXiPXhVYBwKF7vuQe5GVmM6ckAFM2s=; b=1fsFcz75P9U+58NKH1UdkA9JSv6iMOgWRbMtwOBiDPaGuKM4Pe53BtA3LEkwF6AUxU qvoJKDEaU5wz1FmWto6qJAHocLZT81cq/RcBn1OrlPGUjJO5J2iX4Qj9DETieUnfzu3t JVqfRTWwcExpiWfJhmVG3tIodXTCWEvqyvJCTVCa62JJxfX17TqEFK5mbfgAYWia4l1p FwPRU0tUAM4+FA5DzPY/+GTiDH5S96u79PSQiivDtMKLrqr4PIUW0UzIQaRuko6unJmF MdQbPmTEkWbegI8nzqZUtJt7rBx6KN1Gfm/gi8RvlHiJAG6j1X+E7fOv0zB3fo3BFHVh GyFw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1727957479; x=1728562279; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=uIB5EPFug0/5SbXiPXhVYBwKF7vuQe5GVmM6ckAFM2s=; b=eEEIi/PDmUNVWY7NQb8fC9eCdyUK6fZPyGj0NvmVZVpBpHpm47RpYMDk+auI5hpbau 5sGUzTZTrTp7ydOP8e8VsCOhiQM0qKJoGwH9c1QnbXuJqvRooNaQN13sQNjhUXhTkxMH fgg7145ayMKoSTokSTRF5Z3PF/diY8xjqWKFd41NfkGMSLvgWxDamjCdIJW+53h4ai1h 5Q04h1+LRJ8J8SaIThl4vJNaczuf4zP/KKSLLggHEwjNW5ETyzWY/avCluuYTjgAZ41/ Z3aEWEJ3ZNWLvAvMbMkQ1N7fD8G4m/gYkZ9yQ4nACWlkIjtMddnZ8kGvABGf1CnplWcU yZ+w== X-Gm-Message-State: AOJu0YwqFJS/bejcZwTmvcJXCj9WiIMk9z+1Vza+ggGRVMRKHMvC/umU qKS7rOrBl4ZXsGNcazzwo/Xdca63f14RH2YWcBGFsvPukts+HePZx0oyeOoWsWKyOKqCWenhNci A X-Google-Smtp-Source: AGHT+IG9/SWqIZWyeW1JCtPFRyVMBtUxRbPs+lfYCy/6dHnqmbyOmyiZe3JfaY0xFfJ1x2aDtrLBMQ== X-Received: by 2002:a17:907:5087:b0:a8d:2b86:d76a with SMTP id a640c23a62f3a-a990a1dd479mr200519266b.32.1727957478875; Thu, 03 Oct 2024 05:11:18 -0700 (PDT) Received: from localhost.localdomain ([2a01:599:11c:96e4:28c8:f563:d9da:c488]) by smtp.gmail.com with ESMTPSA id a640c23a62f3a-a991047a6d4sm76666166b.187.2024.10.03.05.11.18 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 03 Oct 2024 05:11:18 -0700 (PDT) From: Roman Scherer To: guix-patches@gnu.org Subject: [PATCH 0/2] Add btrfs support and vfat file system options Date: Thu, 3 Oct 2024 14:11:14 +0200 Message-ID: X-Mailer: git-send-email 2.46.0 MIME-Version: 1.0 X-Debbugs-Cc: Florian Pelz , Ludovic Court?s , Maxim Cournoyer Content-Transfer-Encoding: 8bit Received-SPF: none client-ip=2a00:1450:4864:20::631; envelope-from=roman@burningswell.com; helo=mail-ej1-x631.google.com X-Spam_score_int: -18 X-Spam_score: -1.9 X-Spam_bar: - X-Spam_report: (-1.9 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_NONE=0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: submit Cc: Roman Scherer X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) Hello Guix, I'm building a disk image for the Asahi Linux installer using Guix. The Asahi Linux installer has 2 requirements for its disk image: - It needs a btrfs root partition, so the installer can resize it. - The block sizes of the vfat and btrfs filesystems need to be 4k. To create this image, I created my own image type like this: ``` (define asahi-efi-partition (partition (size (* 500 (expt 2 20))) (offset root-offset) (label "EFI") (file-system "vfat") (file-system-options (list "-S" "4096")) (flags '(esp)) (initializer (with-extensions (list guile-zlib) (with-imported-modules (source-module-closure '((asahi guix build bootloader m1n1)) #:select? import-asahi-module?) #~(lambda* (root . args) (use-modules (asahi guix build bootloader m1n1)) (apply m1n1-initialize-efi-partition root args))))))) (define asahi-root-partition (partition (size 'guess) (label root-label) (file-system "btrfs") (file-system-options (list "-s" "4096")) (flags '(boot)) (uuid "fef23143-fe46-4f7f-bbb9-efc46a2a5e48") (initializer (gexp initialize-root-partition)))) ``` Unfortuanatly Guix does not support setting file system options for vfat partitions, nor btrfs as the root file system of an image. The following 2 patches add support for this. The first one adds support for file-system-options on vfat file systems. The code works the same as before, defaulting to 512 block size if no -S option is provided and the file system is an EFI partition, otherwise it uses the user provided block size. The 2nd patch adds support for btrfs to Guix disk images. With those 2 patches I was able to build a disk image that is compatible with the Asahi Linux installer. I tested the code by building this image, putting it on a web server, and then using it with the Asahi Linux installer to install a Guix system. Could you please review the patch series and help me to get this into Guix? Thanks, Roman. Roman Scherer (2): image: Use file system options in make-vfat-image. image: Add support for btrfs. doc/guix.texi | 5 +++-- gnu/build/image.scm | 43 +++++++++++++++++++++++++++++++++---------- gnu/system/image.scm | 8 ++++++-- 3 files changed, 42 insertions(+), 14 deletions(-) base-commit: b522b468cbefcae6170e260ffadadb57f6f5ca54 -- 2.46.0 From debbugs-submit-bounces@debbugs.gnu.org Thu Oct 03 08:14:46 2024 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 To: 73612@debbugs.gnu.org Subject: [PATCH 2/2] image: Add support for btrfs. 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-Debbugs-Cc: Florian Pelz , Ludovic Court?s , Maxim Cournoyer Content-Transfer-Encoding: 8bit X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 73612 Cc: Roman Scherer X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) * 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") -- 2.46.0 From debbugs-submit-bounces@debbugs.gnu.org Thu Oct 03 08:14:49 2024 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 To: 73612@debbugs.gnu.org Subject: [PATCH 1/2] image: Use file system options in make-vfat-image. 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-Debbugs-Cc: Florian Pelz , Ludovic Court?s , Maxim Cournoyer Content-Transfer-Encoding: 8bit X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 73612 Cc: Roman Scherer X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) * 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 -- 2.46.0 From debbugs-submit-bounces@debbugs.gnu.org Mon Oct 14 07:30:39 2024 Received: (at 73612-done) by debbugs.gnu.org; 14 Oct 2024 11:30:39 +0000 Received: from localhost ([127.0.0.1]:35573 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1t0JHa-0003E4-Nr for submit@debbugs.gnu.org; Mon, 14 Oct 2024 07:30:39 -0400 Received: from eggs.gnu.org ([209.51.188.92]:46812) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1t0JHY-00039V-4Z for 73612-done@debbugs.gnu.org; Mon, 14 Oct 2024 07:30:36 -0400 Received: from fencepost.gnu.org ([209.51.188.10]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1t0JHA-0003do-S1; Mon, 14 Oct 2024 07:30:12 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=MIME-Version:Date:References:In-Reply-To:Subject:To: From; bh=grpkriaYVHJ5gIw59fAv9PixQSw6F3oan8rhNCFBUrY=; b=qJABAYuOdKT4mRiF2E+d 1F4HkdcAYz01jix08Cf0EVVCKKtrFk3OiDBbVB4xK3dlz8t2WqK1o+jBOJ7s202ApXtY3gJO52W6U s5Uje+KdMR/X37vhXZn+6LbtazTvt9mXAbL4rCIm9237nDB1Y5y2qubhQmk4PT1/Gk6IApLymnlki MtA4UP5BfPvJEeSjf7YP0449vQjnipdafdsZ3n6ZBRsoGRPtMOJpn4rD+cGthf/qFv8qNfAWB+RYr U8gr+VU2dEEV3Y8nDPGbPCU8iXEXdd6snN5jrWbyPdoFJdtiu7vUf4oth54a2higASlPhxVa8Jkxl tap8lUKiptLtVg==; From: =?utf-8?Q?Ludovic_Court=C3=A8s?= To: Roman Scherer Subject: Re: [bug#73612] [PATCH 0/2] Add btrfs support and vfat file system options In-Reply-To: (Roman Scherer's message of "Thu, 3 Oct 2024 14:11:14 +0200") References: X-URL: http://www.fdn.fr/~lcourtes/ X-Revolutionary-Date: Tridi 23 =?utf-8?Q?Vend=C3=A9miaire?= an 233 de la =?utf-8?Q?R=C3=A9volution=2C?= jour du Navet X-PGP-Key-ID: 0x090B11993D9AEBB5 X-PGP-Key: http://www.fdn.fr/~lcourtes/ludovic.asc X-PGP-Fingerprint: 3CE4 6455 8A84 FDC6 9DB4 0CFB 090B 1199 3D9A EBB5 X-OS: x86_64-pc-linux-gnu Date: Mon, 14 Oct 2024 13:30:09 +0200 Message-ID: <87zfn63ose.fsf@gnu.org> User-Agent: Gnus/5.13 (Gnus v5.13) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 73612-done Cc: 73612-done@debbugs.gnu.org, Florian Pelz , Maxim Cournoyer X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) Hi, Roman Scherer skribis: > The first one adds support for file-system-options on vfat file systems. = The > code works the same as before, defaulting to 512 block size if no -S opti= on is > provided and the file system is an EFI partition, otherwise it uses the u= ser > provided block size. > > The 2nd patch adds support for btrfs to Guix disk images. > > With those 2 patches I was able to build a disk image that is compatible = with > the Asahi Linux installer. I tested the code by building this image, putt= ing > it on a web server, and then using it with the Asahi Linux installer to > install a Guix system. > > Could you please review the patch series and help me to get this into Gui= x? > > Thanks, Roman. > > Roman Scherer (2): > image: Use file system options in make-vfat-image. > image: Add support for btrfs. Both look good to me. Applied, thanks! Ludo=E2=80=99. From unknown Sat Jun 14 03:53:10 2025 Received: (at fakecontrol) by fakecontrolmessage; To: internal_control@debbugs.gnu.org From: Debbugs Internal Request Subject: Internal Control Message-Id: bug archived. Date: Mon, 11 Nov 2024 12:24:06 +0000 User-Agent: Fakemail v42.6.9 # This is a fake control message. # # The action: # bug archived. thanks # This fakemail brought to you by your local debbugs # administrator