From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from list by lists.gnu.org with archive (Exim 4.71) id 1hSlY7-0005ef-RV for mharc-grub-devel@gnu.org; Mon, 20 May 2019 12:54:07 -0400 Received: from eggs.gnu.org ([209.51.188.92]:50643) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1hSlY4-0005ci-R9 for grub-devel@gnu.org; Mon, 20 May 2019 12:54:06 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1hSlY3-0005oq-J3 for grub-devel@gnu.org; Mon, 20 May 2019 12:54:04 -0400 Received: from mout.gmx.net ([212.227.15.19]:53763) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1hSlY3-0005oD-9C for grub-devel@gnu.org; Mon, 20 May 2019 12:54:03 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=gmx.net; s=badeba3b8450; t=1558371239; bh=Y22F0br2pwwjmoqmA108Kiua7Mt1dlx8nOpNK2AdwuQ=; h=X-UI-Sender-Class:Date:From:To:Subject:Cc; b=AuqDwyWhNHldSkC7ns/PSOrJZxWDs8g749evBRtyZSA8EsEKZE6GckaMWmWvDkv1l 5GwYTDkh1REQLvWWrZPiGM2Y14ww0fnuWAlTT510QTWx9MlU9X2X/Fg36z4tOzRNHU Yo7UuG1//eKbOY5gnj70jaML8UbvD8Tu89ted/bM= X-UI-Sender-Class: 01bb95c1-4bf8-414a-932a-4f6e2808ef9c Received: from scdbackup.webframe.org ([79.222.46.132]) by mail.gmx.com (mrgmx001 [212.227.17.190]) with ESMTPSA (Nemesis) id 0MLeoF-1hSUIW0v8l-000pzE; Mon, 20 May 2019 18:53:59 +0200 Date: Mon, 20 May 2019 18:52:46 +0200 From: "Thomas Schmitt" To: alain@knaff.lu Subject: Several GNU projects wondering about the reason for mformat partition table Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Cc: Message-Id: <2969675803234862362@scdbackup.webframe.org> X-Provags-ID: V03:K1:1Syan+aH31cXuw96bNBJsxR43O8igw9ZRsr7BgDFhR0DkHHRRV9 LtI2uFTNKChyUORYlh+LsqltOjuXITME7JuukAqaLsiyhJF4R2AszQSsrlid/uUbewiadQm nOcGqxcphPsfvD0rsACLpiNh3RyxwW9LnrN9Ui3WDcJ/9W1HRFhbZ6vBBYK6Bwkik3dyRdT VXiyGIQaFBRxJnKpJsGBg== X-UI-Out-Filterresults: notjunk:1;V03:K0:ry05WSlUN2Q=:OA8TRG9fY4DCR8t5IFalPJ QWcPWZHeXeFRQmGXtjajD3jG5v4HFcdRB+sS5tsnE1pBziv4EArgTmUXRrskOG4AjPRGXg7T2 dPwpc2dJjlDWhKGgJb6s9g0dDYb7kLJX8db0A0vzCepjXt01Jt0kYZg4VAwYHwYLbgRcp/N9h dsPOWzh5LoqMuo4pm46Ux4DV5mw1PZwP+D+KM6m+IPVPzk6uibL4gt6dUjh1HB9CoP4Bd9IDv ip2gkgldGUq3RYJ2ZLGh3FdJ6KzUGCwPYf4HtzAr71t4p9VCVtEggERGYfcn+dL0b2vKDh3I5 RVIMXHozyVEeoYeyHsZLg9SWaoNx5ni9DJVZJwAKioUAn1dttxVupHX0QUGPtLtGSONRQ7puT t8frKwEQupjXvNNyBAqR0c8VBOGIUCKNx0NF9nMz9l4LDtuYmMDY/S9jvwGpOqKbtbS0G7AT+ BR1z/cY+b5ZPL6kYr0p2yRUqnsp4DAvn7e7xahxaQwLvJom2VjmFJG+HSJwAJXfJWWN05a+LZ LgAXH+aIjqY092pAiFxdH4oxtEUyya920AQ+1qALn1iucm6LtPRB//S46qW1O8fQEEV0D2/l2 xO3jj3xXjLOwiKH57F0Eb5NRXuebWeoT68RFT5t+WWReVnBQ4Av2XEQqlRapHz4AgrMO4FZt0 4TMPfv5G8MVjRYsBSUbshAWTMJKUnZCQupaamkL93wCbnLtp1o6sV0LvCZ2oPMHuvWb6c8Ath XLJJNKuT273BjvP6590Rw7attxeGoE0sScVT9us9JEqVsttei2i+cDHbBKbGeCA7mcFdZtCCC 61SDnTBpEr/eFX5YcyDuJJ7weX/E6qy9b7/fuJL/1JdNUhlm8G8fxxbyIEm0DU7ZAy4Jw+CJl g8uZ1kJ+oimQ/cvn+w+0InNmbmyocOpxoyugN842PDJ4f1ijuFIiGamiItbOx/KGhcDqDivCp Gv9Up/4ULEhbpLLCjeW8rG3Jx2r1qfW8Ek1qWELj8H1VyUzUjPX+i X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 212.227.15.19 X-BeenThere: grub-devel@gnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: The development of GNU GRUB List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 20 May 2019 16:54:06 -0000 Hi, in the course of a problem search between GRUB, Guix, and xorriso we found the trigger of a problem with some old Macbook EFI firmware in a gesture of mformat. Line 1375 of http://svn.savannah.gnu.org/viewvc/mtools/trunk/mformat.c?revision=3D506= &view=3Dmarkup has /* install fake partition table pointing to itself */ Now we are wondering for which use case there is this MBR partition table entry starting with LBA 0 and claiming the whole device. The SVN at savannah shows that this gesture was introduced with revision 4 in may 2002 by "aknaff". My hope is that this was you and that you can tel= l grub-devel (Cc'ed) more about the motivation. =2D-----------------------------------------------------------------------= --- In case you are curious about the motivation of this mail: Our particular use case is to create a FAT filesystem image for use as EFI system partition in ISO 9660 images on USB sticks. grub-mkrescue runs mformat to create this image and then uses mcopy to populate it with EFI start programs. See http://git.savannah.gnu.org/cgit/grub.git/tree/util/grub-mkrescue.c#n812 The partition entry with start LBA 0 caused the EFI firmware to get stuck, probably looping endlessly. Experiments with dd reveiled that the partitio= n entry was to blame, and in it the start LBA 0. This is clearly a firmware bug and obviously fixed in later models of Macbooks. Nevertheless we care for old oddball hardware. So the question is which of these alternatives to choose: - Keep the partition entry because its removal could break some other EFI firmware's boot process. - Overwrite the partition table in bytes 446 to 509 of the mformat result by zeros before populating it with files. - Use mformat option -k to avoid production of the partition table. I personally have scruples to omit the other fields which get written if option -k is not present. Is there anything written with (!keepBoot) which we need for a vanilla FAT filesystem to be recognizable or usable ? =2D-----------------------------------------------------------------------= --- Have a nice day :) Thomas