From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from list by lists.gnu.org with archive (Exim 4.71) id 1hQRgy-0003yN-6x for mharc-grub-devel@gnu.org; Tue, 14 May 2019 03:17:40 -0400 Received: from eggs.gnu.org ([209.51.188.92]:59578) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1hQRgw-0003x4-DB for grub-devel@gnu.org; Tue, 14 May 2019 03:17:39 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1hQRgv-0004Aq-Bp for grub-devel@gnu.org; Tue, 14 May 2019 03:17:38 -0400 Received: from mout.gmx.net ([212.227.17.21]:50843) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1hQIwE-0006x9-52 for grub-devel@gnu.org; Mon, 13 May 2019 17:56:54 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=gmx.net; s=badeba3b8450; t=1557784597; bh=5hZixP5sPxgmWdciLCMoJvOauyWcN40cqtjdPatWWjg=; h=X-UI-Sender-Class:Date:From:To:Subject:Cc:References:In-Reply-To; b=JzsWt9V2bQ8ymtd5+0nY3jug7qQE+6KnOJBrN6b2B2ld2ie3BXDzng/2ZARyonYjv b+TK/rVcSb18BheOLYSwjuluD7MGRH8xyXaY0fhZDVRdfKiu4lyrQvEFBhFV1Ggov8 42yyeCGSAdQ1XWmUDxXFwS+scx44P5HfgxZriupw= X-UI-Sender-Class: 01bb95c1-4bf8-414a-932a-4f6e2808ef9c Received: from scdbackup.webframe.org ([79.222.46.132]) by mail.gmx.com (mrgmx102 [212.227.17.168]) with ESMTPSA (Nemesis) id 0M6P5z-1gSzPi15v1-00yQ7T; Mon, 13 May 2019 23:56:37 +0200 Date: Mon, 13 May 2019 23:55:06 +0200 From: "Thomas Schmitt" To: grub-devel@gnu.org Subject: Re: grub-mkrescue: Problem with MBR partition table at start of EFI partition Content-Type: text/plain; charset="utf-8" Cc: References: <20190513210436.wdtmjtrertczuwf7@tomti.i.net-space.pl> In-Reply-To: <20190513210436.wdtmjtrertczuwf7@tomti.i.net-space.pl> Message-Id: <11182679267462435257@scdbackup.webframe.org> X-Provags-ID: V03:K1:sh9Wibf8g3AXaANGnRuRKqO4ZKDU2cswaV+RXXUrMWGQ5fayptb 6wUtg+urk+U0rfS7HS6WQDYUu6I4ZtI+y7+LjYmoHFQ6lzLr/1M+QLoVNv2nGEaEP0iv1RU 0P3DYEYG0Nu48RQZmomerp/iTQcEoJWx6dAPwae3DVLdM5r6uX1WDxF0f4tFSrirVdr1VhA f91mKUahY61xtFStPvOFQ== X-UI-Out-Filterresults: notjunk:1;V03:K0:KWWWGhtzze0=:Pig7RmENVsb9FauwaAORjs +ChSzGDB+Ysb+85OZnDflgedqlTBSLabiTH0MDAnnqaAuPy8c66M3oQ0uxKPF+BOfG/YatnHr c6I3L2Sb0Aonhaq7rbpj3Pflx73IeJocPNOURKPLb0/VU5lLBvxulVaBUfPlSNR2Ow/moFJpd IOUIYUrth4X096NFiOcozDAC2REsFhc8Qasl9Wdxu8NLpGfAsg8XryPrO3DTQIu9N6ZZLhsMP L2B8nxT+wAAbOTK7RUAbFmnm/BchToiJQEhHPpMzX2K8RQVAnVLp7dH2tTodzLjcgAhyNQvbe ZAkL0d0EaBP43z7FteBj2oDrLQs5dGvYZBzBYOTPPvBD5r4zJvlDnumbTEU6Ol7cS9ZmLzYzS 8ho8FNgpviQkgNQ3HbXKfaj6kUZkocNRDzsAyq5wwt4nzL5z91L5qq1o6Zjr9/8hqipLlhWN3 lHzBv9ukNphQ2qbiTziAz9YUvD/74C0qKvc9JW2T4IlyrQkBPJ8h2wnR5134ia/+zJH0rmXBo gBMRxg+0bY24vNd+MmH69aBAYwxswgmcDAf93Ayw53MGjhlHY+i8ovEvfEWXsgZRfkhd8k7Zz UcSnktqbAwyBBuHJEnWLJhil8c6LTuC9S+cpvA4u5HB2ZJFmtfWiGfp1Lkq5Xynd16FK+nJbE ucTSE/p78PsHj9o1AEY9SRwHuxmkNlmrC08jY4rj304vClNBwvqv3usoFHX1JiH2SEKdOKWjK MEaZh1MEjANtVCAC5m4aACXMIWIn42tdG8GgAxYg0VWfbFuj6hFO3x6DXq3g69H7yUX3EUf7y 9LbcgYKvLhE+Hba/Cn//GWan48yjf4jqTexJhJO6zSofM1ZAe0M6zW3GcenFkFnzc1HF4D1UV uLIFvB1yiIubs4YuDW+Cyv5llFAVYBMQUkhWDRQ6lDFxL68jk/0L3MFlwz7JgFUH/B7wampJ7 g0o8wab2F4g== X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 212.227.17.21 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: Tue, 14 May 2019 07:17:39 -0000 Hi, Daniel Kiper wrote: > may I ask you to write a summary of your findings, A Macbook took offense from the MBR partition table entry in the EFI FAT image which grub-mkrescue produces by help of mformat(1). Vladimir stated that this partition table entry is not intentional and that the information in block 0, which would be missing after using mformat option -k, is probably not needed. Vladimir's proposal to look into the EFI partitions of MS-Windows ISOs led to the insight that their MBR partition table space is filled with cleartext. I.e. not-zero is usual. Credibly looking partition table entry starting at LBA 0 is not usual. (Further we learned that Microsoft has its own protocol implemented in EFIs by which they boot USB sticks with MBR partitioning and no partition of type 0xEF.) > what works and what does not The only thing that was found to not work is a MBR partition entry 1 which starts at LBA 0. Probably it needs to have non-zero block count and non-zero type. > how the issue should be fixed Safest seems to be not to change the mformat run in grub-mkrescue but rather to postprocess its result, e.g. before the run of mcopy which populates the image. Postprocessing would mean to zeroize the whole range of MBR partition table entries. That's bytes 446 to 509 of the FAT image. > why this fix should land in the upcoming release. It may well wait until the start of the next release cycle, although i deem it easy to test and of low risk. Most Linux distros have zeros where i propose to put them. They make their EFI images by mkfs.fat(8). Have a nice day :) Thomas