From unknown Fri Jun 13 11:09:24 2025 X-Loop: help-debbugs@gnu.org Subject: bug#59695: ESP partition uses 1024 byte sectors Resent-From: Efraim Flashner Original-Sender: "Debbugs-submit" Resent-CC: bug-guix@gnu.org Resent-Date: Tue, 29 Nov 2022 20:52:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 59695 X-GNU-PR-Package: guix X-GNU-PR-Keywords: To: 59695@debbugs.gnu.org X-Debbugs-Original-To: bug-guix@gnu.org Received: via spool by submit@debbugs.gnu.org id=B.16697551152277 (code B ref -1); Tue, 29 Nov 2022 20:52:02 +0000 Received: (at submit) by debbugs.gnu.org; 29 Nov 2022 20:51:55 +0000 Received: from localhost ([127.0.0.1]:56262 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1p07a6-0000af-V8 for submit@debbugs.gnu.org; Tue, 29 Nov 2022 15:51:55 -0500 Received: from lists.gnu.org ([209.51.188.17]:56630) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1p07a2-0000aT-SZ for submit@debbugs.gnu.org; Tue, 29 Nov 2022 15:51:53 -0500 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 1p07a1-0003vw-VT for bug-guix@gnu.org; Tue, 29 Nov 2022 15:51:50 -0500 Received: from mail-wm1-x329.google.com ([2a00:1450:4864:20::329]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1p07a0-0001zU-3E for bug-guix@gnu.org; Tue, 29 Nov 2022 15:51:49 -0500 Received: by mail-wm1-x329.google.com with SMTP id o7-20020a05600c510700b003cffc0b3374so11767039wms.0 for ; Tue, 29 Nov 2022 12:51:47 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=content-disposition:mime-version:mail-followup-to:message-id :subject:to:from:date:sender:from:to:cc:subject:date:message-id :reply-to; bh=bRJ2jTDLheeyXvhX1/0dFkUYb4mFdzk4TghD93dwZsg=; b=mVBMQWKRAwe7QJId7qD0+jvc+fPkla/dDULsiMQt49gFNmo1yhrXWsSy54sYQ970tt FL5+8wKSGjjH8dlquGPVtANLtdI2wkOgurDwCsFeFJjpbNdiLTYqk8QgdKU5w4am3nd/ vTpO1TUE0jGDxl9hOyx/QjuvWDE6fK3b5VCzrb/ATu+t1yaxY34lkCJiNP3BqOtfVWNS vi6Lx0b71pmeU38GcSwGrt5S/nOK/iXI2Kb9vjmRrPNc+8t/711CcFt/7ilDkXeka4M6 qZil+vKbVEFkAgRdwApTCN53DrghHsSZh64rC0/aD53hEBmQE0qStPaIy1jCR3tiT34K siHQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-disposition:mime-version:mail-followup-to:message-id :subject:to:from:date:sender:x-gm-message-state:from:to:cc:subject :date:message-id:reply-to; bh=bRJ2jTDLheeyXvhX1/0dFkUYb4mFdzk4TghD93dwZsg=; b=4wMyiiPj6UR/robyPQSTBz42ELNZGU7d4Aob+PfcO85bEaF+pHzRyNE9+rv74WeKHL YE8mf6lA5rZE0VL0DlFgouiek1B3n/s6YMlytXrws+Kj5NqhTlTVpz7woUdyilf42KZz qthmcSji9mguqJ8ftkRICB9PoQeTYC6fP4r27iLqe//Qu8FAVIys6OsHgbdwCC+mHdDe h3dIpzo4/sOXHrnsLH2GpiRmicsH48F9n0XdcP4ZLfn2eUFXbopt1uVYXjNwKNiYL/1F Esy0Vhr9CkbfbXliXy4A19INLP7f80baGr18pMt3mZWFkDoWsXnqv8uuT86gpwto84A7 bnGg== X-Gm-Message-State: ANoB5pkIO46c9VwGZL2shzABopZIwXBWL4YtUq1hBL/IiP+Ra8eF14Bj 30O4YqT2qF+wOHnvM804rE0HZQ5tXkcgUw== X-Google-Smtp-Source: AA0mqf72skH/YwifrqspDeiQtTa95srH35e/vs4vmbhbgirbAqnWgLzFD5/JIoivttiUzVBIkc7kWQ== X-Received: by 2002:a05:600c:4f51:b0:3b4:a6c4:70fb with SMTP id m17-20020a05600c4f5100b003b4a6c470fbmr29323070wmq.79.1669755105254; Tue, 29 Nov 2022 12:51:45 -0800 (PST) Received: from localhost ([141.226.13.150]) by smtp.gmail.com with ESMTPSA id n21-20020a05600c3b9500b003b4c979e6bcsm3624599wms.10.2022.11.29.12.51.44 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 29 Nov 2022 12:51:44 -0800 (PST) Date: Tue, 29 Nov 2022 22:51:42 +0200 From: Efraim Flashner Message-ID: Mail-Followup-To: bug-guix@gnu.org MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="CdW10b3pa6V7YDvw" Content-Disposition: inline X-PGP-Key-ID: 0x41AAE7DCCA3D8351 X-PGP-Key: https://flashner.co.il/~efraim/efraim_flashner.asc X-PGP-Fingerprint: A28B F40C 3E55 1372 662D 14F7 41AA E7DC CA3D 8351 Received-SPF: pass client-ip=2a00:1450:4864:20::329; envelope-from=efraim.flashner@gmail.com; helo=mail-wm1-x329.google.com X-Spam_score_int: -16 X-Spam_score: -1.7 X-Spam_bar: - X-Spam_report: (-1.7 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FORGED_FROMDOMAIN=0.001, FREEMAIL_FROM=0.001, HEADER_FROM_DIFFERENT_DOMAINS=0.249, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=no autolearn_force=no X-Spam_action: no action X-Spam-Score: -1.1 (-) 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: -2.1 (--) --CdW10b3pa6V7YDvw Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable I was working on using a grub-efi system image for aarch64 and I got the following error: 'Error: FAT sector size mismatch (fs=3D1024, dev=3D512)' I traced it back to u-boot=C2=B9. u-boot wouldn't chainload grub if the device block size and the filesystem sector size doesn't line up. I changed the line in (gnu build image) in make-vfat-image to use '-S 512' for esp partitions and was able to load the grub menu from u-boot. I spent some time looking through the git history but I wasn't able to find anything to suggest why we have 1024 byte sectors there specifically. =C2=B9 https://source.denx.de/u-boot/u-boot/-/blob/master/fs/fat/fat.c#L589 --=20 Efraim Flashner =D7=90=D7=A4=D7=A8=D7=99=D7=9D = =D7=A4=D7=9C=D7=A9=D7=A0=D7=A8 GPG key =3D A28B F40C 3E55 1372 662D 14F7 41AA E7DC CA3D 8351 Confidentiality cannot be guaranteed on emails sent or received unencrypted --CdW10b3pa6V7YDvw Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQIzBAABCAAdFiEEoov0DD5VE3JmLRT3Qarn3Mo9g1EFAmOGcN4ACgkQQarn3Mo9 g1F/Ug/+Ph4oxQW1WEELiufrOwqvmr0GVNNBheXmFrzF1r/vTyN4zJjqjr2ugzod BUPnby9kTAeBzoFP8n38aTM3F+msczZWNPeX9nq5o8NnyG0VP/63Yemkzpr9ANJY ixaRuNP3YAy9K4rz7Auu+MXDPm9wm9V6+uxopVKwLJZuiDmEkAwHgFJxSEhq3JQo i+EFLO1S2ncDQAok6bqfIbphrWOglZDAPocSSNzC/e1wX/MuwkbY0prOPB45BpcE kA4b+erQtb9vkuqSrMy0DPkXd1A7JhG+dIOaxhcKKyxDyt3xnK+SUqVR/6vCBv9E A/SQ6zy9WTGw4xJx9W8sVaaJE9evkCORC903/9aXA+5pjOFu0K6/1Kw7T7A1Irkk yWukV7qygvSm66WKu2u9wCMWsK01DYdJtwX2oUUuQCmxdwe1f8AKnip/L5FMcqWi 4Twi5O2S8YcAivlRnGmHwWTvkCgANsKXAEeMp5iJjhYqWI7PSgIwqDt9PBsc/6yD AdRCtUwWqh9LlR6qj7ZN6Xl7eEOTUh1FLjEEBRSTezhDbbPrALvgxsYkusO0hieq K6bdQOywEc+xhPo/6nnx15Y2WOVrbWZ0/oSg79gqViOwSqRPxOL2vOdqFQdkMsU9 8/mrK4976dbvBPQhkNKx+vRB5wR0NTf4GxrEldWerbqWgnWMA10= =duo/ -----END PGP SIGNATURE----- --CdW10b3pa6V7YDvw-- From unknown Fri Jun 13 11:09:24 2025 X-Loop: help-debbugs@gnu.org Subject: bug#59695: ESP partition uses 1024 byte sectors Resent-From: Efraim Flashner Original-Sender: "Debbugs-submit" Resent-CC: bug-guix@gnu.org Resent-Date: Thu, 01 Dec 2022 08:25:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 59695 X-GNU-PR-Package: guix X-GNU-PR-Keywords: To: 59695@debbugs.gnu.org Received: via spool by 59695-submit@debbugs.gnu.org id=B59695.166988306924304 (code B ref 59695); Thu, 01 Dec 2022 08:25:02 +0000 Received: (at 59695) by debbugs.gnu.org; 1 Dec 2022 08:24:29 +0000 Received: from localhost ([127.0.0.1]:38242 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1p0ers-0006Jw-Bz for submit@debbugs.gnu.org; Thu, 01 Dec 2022 03:24:28 -0500 Received: from mail-wm1-f45.google.com ([209.85.128.45]:53222) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1p0erq-0006Jk-CE for 59695@debbugs.gnu.org; Thu, 01 Dec 2022 03:24:27 -0500 Received: by mail-wm1-f45.google.com with SMTP id o30so616930wms.2 for <59695@debbugs.gnu.org>; Thu, 01 Dec 2022 00:24:26 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=in-reply-to:content-disposition:mime-version:references :mail-followup-to:message-id:subject:to:from:date:sender:from:to:cc :subject:date:message-id:reply-to; bh=9tmI8H9YspI7Ufpge9qGodECx4ksEmNKjf0icPSnjO4=; b=YNgVDoy515Qj4olykTh6CO0GcxbkSGiaJEJyIVw6NfHgbALe0GuzJuaxouBpecDdUK WgNS4wTq+QjNZKci3WCxcyp01YzHoyGbrfyVhtssfE2g4X1nvbm07aiYbH5uWqQApL+L vSsEbJQw3kLMBtASNVxoA0CMFs697m4p9kKjf3aW4PV2HvEYqQFLffY+YQxEk8zxOqR0 X9Oc+Sjpqyl4rtXw490+R4KzijqJPkoHCRrfwLM+6kFBG5eHdSqQPZazy8oHuHvHHHhk LezxQtnseYUGN5kxoDTcrHUlB0qh3rOuH9fasuC+7yL4CuPcjakyCNV99Gq+4Vi9Exvj B1HA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=in-reply-to:content-disposition:mime-version:references :mail-followup-to:message-id:subject:to:from:date:sender :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=9tmI8H9YspI7Ufpge9qGodECx4ksEmNKjf0icPSnjO4=; b=xVFIWK4Vuy7Xczbsa/MExJsgtRyI4i++gyHGKsecw+GDMLa5Gznd+Zf7dyfxSO2Oyi 2qtPIq/uU3rEdmbS1b6aSM7eN3ix2AkqoibDntXWIxk6Ole8kTL93xlrKIIDuVut914m 3nBqoaNOQ1mwEXKmyXrnnyRaECdn8C2SH0mif33xUTHSbMaSJkB2gQXAs0UAXbU2Qj7Q TREe5eWzMo9y84bF3gXvwYSpN36z/IA1pN5WPuqZxht/EjsIlGaClEMxbL0NZzzA06q6 spqjusm1g7Pbsj6vwUYtWvw6Txe57y9QYJPgWSrLd9la5uFW4NqIxRtrrnojV+rVDeS7 tVzg== X-Gm-Message-State: ANoB5pnmPSUzQMBLNqLrFv3EQQpimmp94lCTlpgHEWsik3M9HyqLLO9S qWPHgzP6YIELqYPkklfwTs0u7c8+nEU= X-Google-Smtp-Source: AA0mqf5TIYTWpUBG5pMAaW3w8H64rGgszkybeyl9AbAV0xZeIj3jmC9d4GiPYS2PvHvEqk/Uuzc4ag== X-Received: by 2002:a05:600c:22c4:b0:3cf:71b7:7a41 with SMTP id 4-20020a05600c22c400b003cf71b77a41mr49072672wmg.31.1669883060126; Thu, 01 Dec 2022 00:24:20 -0800 (PST) Received: from localhost ([141.226.13.150]) by smtp.gmail.com with ESMTPSA id p17-20020a05600c359100b003c6b9749505sm8556285wmq.30.2022.12.01.00.24.19 for <59695@debbugs.gnu.org> (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 01 Dec 2022 00:24:19 -0800 (PST) Date: Thu, 1 Dec 2022 10:24:17 +0200 From: Efraim Flashner Message-ID: Mail-Followup-To: Efraim Flashner , 59695@debbugs.gnu.org References: MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="eV8Oe2TW36fkgAB6" Content-Disposition: inline In-Reply-To: X-PGP-Key-ID: 0x41AAE7DCCA3D8351 X-PGP-Key: https://flashner.co.il/~efraim/efraim_flashner.asc X-PGP-Fingerprint: A28B F40C 3E55 1372 662D 14F7 41AA E7DC CA3D 8351 X-Spam-Score: 0.3 (/) 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: -0.7 (/) --eV8Oe2TW36fkgAB6 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Tue, Nov 29, 2022 at 10:51:42PM +0200, Efraim Flashner wrote: > I was working on using a grub-efi system image for aarch64 and I got the > following error: > 'Error: FAT sector size mismatch (fs=3D1024, dev=3D512)' > I traced it back to u-boot=C2=B9. u-boot wouldn't chainload grub if the > device block size and the filesystem sector size doesn't line up. I > changed the line in (gnu build image) in make-vfat-image to use '-S 512' > for esp partitions and was able to load the grub menu from u-boot. >=20 > I spent some time looking through the git history but I wasn't able to > find anything to suggest why we have 1024 byte sectors there > specifically. >=20 > =C2=B9 https://source.denx.de/u-boot/u-boot/-/blob/master/fs/fat/fat.c#L5= 89 Normally I'd be ok with hardcoding 512 for the sector size to fix this, but then I remembered that there are 4k block size disks which actually declare themselves as having 4k blocks and not emulating 512 byte blocks. What do you think? I suppose one option would be to patch u-boot to not demand they be equal, but that only works with guix build u-boot. We could force 512, u-boot is the only thing I've come across so far that cares and most people=C2=B2 use =C2=B5SD cards which advertise 512 byte blo= cks. Maybe change it to 512 and add a TODO to revisit it later as needed? =C2=B2 citation needed --=20 Efraim Flashner =D7=90=D7=A4=D7=A8=D7=99=D7=9D = =D7=A4=D7=9C=D7=A9=D7=A0=D7=A8 GPG key =3D A28B F40C 3E55 1372 662D 14F7 41AA E7DC CA3D 8351 Confidentiality cannot be guaranteed on emails sent or received unencrypted --eV8Oe2TW36fkgAB6 Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQIzBAABCAAdFiEEoov0DD5VE3JmLRT3Qarn3Mo9g1EFAmOIZK4ACgkQQarn3Mo9 g1E4yA//QTuJeKP1GOhF8ZiHWqWAvh3Ka+KWFWK14k6+3eHNA3QXdSiXosps75H8 8aRyE59319aY6szkDFbkFfuc0PvoYU5kYgRaeqqo1Pm0us8Zn3RdEwMSm1ZgkOSv oBGOJv3hGiEyqDKXWm59EZuri+KPxaQrOFmk7KrkAZO7G7NWEUrhtoywaMqKb04F r4PGp9DhHR+TFwjYnTriNr4N8NJXAj+KVzm+x4YogH2MdfXYsMBUFwkjr1LXqEgy 89ogUfKPN9NWRg3wWxI6vtF1JgDXqB2lpQrQgAnFPiOc4ZxW5T7Rcn49V0fK7F45 BVH8Zsre/7+3A3adrs7FHjYiCrL8IM+welcbodQO/TVn5teG5NEqFPTn9wygRgVG zyzUscmqFlj57z34kbf3zEVxsbB8Orrgf/zha/+YudKndoDEXbmi8DvEF1F28f7z TUSLOvV7ROUb/MeQIdZ+Knnoip3HqBfIPwPxz5/+XPYi56SVy/7iL9OiT4S+M1uO k4jBs0Xv0Zp460qj9s6ySi3ZH4hafW5FZDzIvzMg3zNoc/vP1tBAb2y9I5B9FO9W FcKitxPijYsxLcOyUFDIs83g61H9RB2oMg/6Q80oazXSR2OF99qf2PMxLyeaIhpt Nb1xzHkWTGKjnB1yJjgeuuLxEWgDVnsdbPChQgbIvUH24B5AX3E= =HJNi -----END PGP SIGNATURE----- --eV8Oe2TW36fkgAB6--