From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp10.migadu.com ([2001:41d0:8:6d80::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms5.migadu.com with LMTPS id SG++EbzPh2IfPAEAbAwnHQ (envelope-from ) for ; Fri, 20 May 2022 19:28:28 +0200 Received: from aspmx1.migadu.com ([2001:41d0:8:6d80::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp10.migadu.com with LMTPS id qIfnELzPh2KOTwAAG6o9tA (envelope-from ) for ; Fri, 20 May 2022 19:28:28 +0200 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by aspmx1.migadu.com (Postfix) with ESMTPS id 57130238C6 for ; Fri, 20 May 2022 19:28:27 +0200 (CEST) Received: from localhost ([::1]:55398 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1ns6QK-0000sC-Hu for larch@yhetil.org; Fri, 20 May 2022 13:28:24 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:60544) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1ns6Py-0000rg-GT for bug-guix@gnu.org; Fri, 20 May 2022 13:28:02 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:46119) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1ns6Py-0007ok-7x for bug-guix@gnu.org; Fri, 20 May 2022 13:28:02 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1ns6Py-0000zM-5I for bug-guix@gnu.org; Fri, 20 May 2022 13:28:02 -0400 X-Loop: help-debbugs@gnu.org Subject: bug#55406: WIP: Image API support for fat16 partitions References: <3078A40B-22B0-4492-BFD2-72D725F31689@gmail.com> In-Reply-To: <3078A40B-22B0-4492-BFD2-72D725F31689@gmail.com> Resent-From: Pavel Shlyak Original-Sender: "Debbugs-submit" Resent-CC: bug-guix@gnu.org Resent-Date: Fri, 20 May 2022 17:28:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 55406 X-GNU-PR-Package: guix X-GNU-PR-Keywords: To: 55406@debbugs.gnu.org Received: via spool by 55406-submit@debbugs.gnu.org id=B55406.16530676793790 (code B ref 55406); Fri, 20 May 2022 17:28:02 +0000 Received: (at 55406) by debbugs.gnu.org; 20 May 2022 17:27:59 +0000 Received: from localhost ([127.0.0.1]:40016 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ns6Ps-0000z1-DL for submit@debbugs.gnu.org; Fri, 20 May 2022 13:27:59 -0400 Received: from out5-smtp.messagingengine.com ([66.111.4.29]:53253) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ns60i-0000Kl-JY for 55406@debbugs.gnu.org; Fri, 20 May 2022 13:01:57 -0400 Received: from compute4.internal (compute4.nyi.internal [10.202.2.44]) by mailout.nyi.internal (Postfix) with ESMTP id 6350B5C0176 for <55406@debbugs.gnu.org>; Fri, 20 May 2022 13:01:49 -0400 (EDT) Received: from mailfrontend2 ([10.202.2.163]) by compute4.internal (MEProxy); Fri, 20 May 2022 13:01:49 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=pantherx.org; h= cc:content-type:date:date:from:from:in-reply-to:message-id :mime-version:reply-to:sender:subject:subject:to:to; s=fm2; t= 1653066109; x=1653152509; bh=60XrWM/7KA25r3YEJmefnTj2h3hIx2WQeAs uu5psL6w=; b=krpWUZPnf5vF6ic42yjFBh4gWsox4HTJ1z5raraXc85L2zxD0H9 u1vBpgxnwfYWks1cAXXqap1x5KO3x670pSWmgEVqZiBhNhbaAEpiSvDSSd9OMkDs VsaYZSil7B1+h+4E0FAHr4OwhUqgMFdLnAhT4vSQYNX+h3OoXmeXE1vq0LEFO9oD fYKewzzYdOc1h2BG8fBgQEkSKCh9PAYy9HprtwuI6PqpzDjIfWUU0Xw8m8yRfdRc ujC95ek/MoBQm05MSRrfNPEPv7roIfbvEhkLD65CWI+8P8ZAp88QW4R+dsBZi0nU m5NYV7rdDO3gifpfS0DpV1dt/UETnAymvug== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-type:date:date:feedback-id :feedback-id:from:from:in-reply-to:message-id:mime-version :reply-to:sender:subject:subject:to:to:x-me-proxy:x-me-proxy :x-me-sender:x-me-sender:x-sasl-enc; s=fm1; t=1653066109; x= 1653152509; bh=60XrWM/7KA25r3YEJmefnTj2h3hIx2WQeAsuu5psL6w=; b=S dn5ybMYCUoqqIU33inwuHlWILqPnp3J2O1Mh/FIFF0YxLhrJiSKuWN4OaoyGQbVh g2X5XlpbsmL9D1DWDr5vhzIaepXV/R3GJedd1DnV88+vVHG7w/92m9aO6ZiznYVu hsqyqIzuAdzOnGgrUxPdvQFf2UA8QZGPjDBwplYfD3aJzAEnW7w6rvOMyIbyQqAS nJ5miL+yR1q1Zaa0VAa4dbS05mthqoNNbSi3SkNLgnQd/pz99c89EH4nfKqxFueG 8uFzpUx2A+KmLezsaG4/oVfSQGtz5YQ79ZH2dkEv+mt8X0NOXWvWu0ClKGUorT6f OaMY0PUJ86rzTUMV7eRYA== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvfedrieefgddutdehucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucenucfjughrpefhtggguffkfffvofesmhdtmherhh dtjeenucfhrhhomheprfgrvhgvlhcuufhhlhihrghkuceophdrshhhlhihrghksehprghn thhhvghrgidrohhrgheqnecuggftrfgrthhtvghrnhepiedvgefhueeigfegffffudevte ffffehtedvvdefieevffdtjeelffdtffeujedtnecuvehluhhsthgvrhfuihiivgeptden ucfrrghrrghmpehmrghilhhfrhhomhepphdrshhhlhihrghksehprghnthhhvghrgidroh hrgh X-ME-Proxy: Feedback-ID: idda946d0:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA for <55406@debbugs.gnu.org>; Fri, 20 May 2022 13:01:48 -0400 (EDT) From: Pavel Shlyak Content-Type: multipart/mixed; boundary="Apple-Mail=_C26817B6-2E89-43A3-B968-96788B71F0D6" Mime-Version: 1.0 (Mac OS X Mail 16.0 \(3696.100.31\)) Message-Id: <332533F2-B819-4EF4-9EAA-FBB55AAD13E5@pantherx.org> Date: Fri, 20 May 2022 20:01:45 +0300 X-Mailer: Apple Mail (2.3696.100.31) X-Mailman-Approved-At: Fri, 20 May 2022 13:27:55 -0400 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-guix@gnu.org List-Id: Bug reports for GNU Guix List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-guix-bounces+larch=yhetil.org@gnu.org Sender: "bug-Guix" X-Migadu-Flow: FLOW_IN X-Migadu-To: larch@yhetil.org X-Migadu-Country: US ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1653067708; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:mime-version:mime-version: content-type:content-type:resent-cc:resent-from:resent-sender: resent-message-id:in-reply-to:in-reply-to:references:references: list-id:list-help:list-unsubscribe:list-subscribe:list-post: dkim-signature; bh=60XrWM/7KA25r3YEJmefnTj2h3hIx2WQeAsuu5psL6w=; b=jGtuHLEOlP3q8zGAdWVzePXru7ewyLhbu5XPXgio9Iq0/kKi26NFaoHALynX9svUNKW5CI V4/eUpfoSl/1nNPc6JsB0SoHlZ+itoZbh70VwG/UEHpVxS+aFCWSLVZEa15YbDuHyUQ88J rBTk3EP3Ez8jsEKx2PbN389/WLmkV5u+L9pI22nkvzwLAX0h3Nt92dCUIJPnXRBhe2C6WA OLC2j3U+QpYX3qdKP4Ze3+3sPhRA+ZQC7KQcZy7oyq275xLVRV2r2P8pfieyPCFEHil3nm dDqCuwEYQ1seV1nybtbA4PqvOrKKGhZEtYaCR5l9tJBdXot3164tMmhen8/Y/g== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1653067708; a=rsa-sha256; cv=none; b=uor8UkypYaXJOhThOGLBq0lou+A7o0PEAPnUSIJx3wBXgOCtc9c/W1TgUCLiQLTgqym0E5 zJ9kiMzE2BR1BB2tet336+TSroXiRkoPhNWMGR5y+iHIBA1zEK0xEhp4jMQaDVNFTxncBO vFUhc9/4SZ92/mWq8B0QyfmpLz8fgFAKUR6K+3jJqWwBoaH/hyjp+88RPWt8+jai2SXvUu E1BXDH5+rUjrUbGBdOHopwtSr3G8yexOwAZNp2gfdKUHtwcfU44ydVDo7v4XzmzB7qB7tf +XTh3j6xdNsxiZwPapLEW+JjgVEjiD59LLcRhMgkUPDM+Yq0XFTrMk3/tZNBeQ== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=pantherx.org header.s=fm2 header.b=krpWUZPn; dkim=fail ("headers rsa verify failed") header.d=messagingengine.com header.s=fm1 header.b="S dn5ybM"; dmarc=none; spf=pass (aspmx1.migadu.com: domain of "bug-guix-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="bug-guix-bounces+larch=yhetil.org@gnu.org" X-Migadu-Spam-Score: 0.86 Authentication-Results: aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=pantherx.org header.s=fm2 header.b=krpWUZPn; dkim=fail ("headers rsa verify failed") header.d=messagingengine.com header.s=fm1 header.b="S dn5ybM"; dmarc=none; spf=pass (aspmx1.migadu.com: domain of "bug-guix-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="bug-guix-bounces+larch=yhetil.org@gnu.org" X-Migadu-Queue-Id: 57130238C6 X-Spam-Score: 0.86 X-Migadu-Scanner: scn0.migadu.com X-TUID: J6y9D8mOkP0o --Apple-Mail=_C26817B6-2E89-43A3-B968-96788B71F0D6 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=utf-8 I have written a small patch to partially fix the issue. Flags are still = not set. GPT is still not fixed. There=E2=80=99s no need to return file = systems that are not supported in make-partition-image function in = gnu/build/image.scm --Apple-Mail=_C26817B6-2E89-43A3-B968-96788B71F0D6 Content-Disposition: attachment; filename=mbr-support-vfat-partitions.patch Content-Type: application/octet-stream; x-unix-mode=0644; name="mbr-support-vfat-partitions.patch" Content-Transfer-Encoding: 7bit diff --git a/gnu/system/image.scm b/gnu/system/image.scm index 42e215f614..a83f844682 100644 --- a/gnu/system/image.scm +++ b/gnu/system/image.scm @@ -304,10 +304,15 @@ (define (format->image-type format) (define (partition->dos-type partition) ;; Return the MBR partition type corresponding to the given PARTITION. ;; See: https://en.wikipedia.org/wiki/Partition_type. - (let ((flags (partition-flags partition))) + (let ((flags (partition-flags partition)) (file-system (partition-file-system partition))) (cond - ((member 'esp flags) "0xEF") - (else "0x83")))) + ((member 'esp flags) "0xEF") + ((string-prefix? "ext" file-system) "0x83") + ((string=? file-system "vfat") "0x0E") + (else + (raise (condition + (&message + (message "unsupported partition type")))))))) (define (partition->gpt-type partition) ;; Return the genimage GPT partition type code corresponding to PARTITION. --Apple-Mail=_C26817B6-2E89-43A3-B968-96788B71F0D6--