From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from list by lists.gnu.org with archive (Exim 4.71) id 1eh2Lv-0004ir-Ty for mharc-grub-devel@gnu.org; Wed, 31 Jan 2018 19:03:43 -0500 Received: from eggs.gnu.org ([2001:4830:134:3::10]:58603) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1eh2Lt-0004gk-BX for grub-devel@gnu.org; Wed, 31 Jan 2018 19:03:42 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1eh2Lo-0007Zt-CA for grub-devel@gnu.org; Wed, 31 Jan 2018 19:03:41 -0500 Received: from mout.gmx.net ([212.227.15.15]:62934) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1eh2Lo-0007ZL-0g for grub-devel@gnu.org; Wed, 31 Jan 2018 19:03:36 -0500 Received: from scdbackup.webframe.org ([79.222.38.208]) by mail.gmx.com (mrgmx002 [212.227.17.190]) with ESMTPSA (Nemesis) id 0MBnvD-1eZ6P43JOZ-00AjJv; Thu, 01 Feb 2018 01:03:33 +0100 Date: Thu, 01 Feb 2018 01:02:31 +0100 From: "Thomas Schmitt" To: grub-devel@gnu.org Subject: Re: A thread on grub-bug could need attention Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 8bit Cc: michel@bouissou.net References: In-Reply-To: Message-Id: <24646785871403433912@scdbackup.webframe.org> X-Provags-ID: V03:K0:SeDwCEqR5KJP2VTTbpsDgvgzBY1ww8SXL5v3AOArDdzPpj/Pucv 3uPJc2v1F4AEdOFV8cvj6MRI/4kJm4EFa4GM7x1g2iHxSd4WutMmigx6QTPUusfsybG9+KM PHHBvgpyCEkKgNthBppRwLig/x/nMe+cWYgrwvhN10Y60EHkC/9+VFFhdSbBL/F7sXJ6t0r Ga9ohehie3x2KmsLkqnDw== X-UI-Out-Filterresults: notjunk:1;V01:K0:muGT9s1MkOM=:sNtlHnvmj3hiEGAXHjpIRZ BvbA3hVk+0AX3yqBXsxwYb/UHapMC1aANHQedyPAzL2U3kqbSTGlchHuXWvtWkPaDcho4bYEN 2JLXlWxWMi9A0hpJ5NQKEaJT1wWmycIaE/9ibCi2bpuyw1NnV56zbL3G9AK6FmF4VHhA4Sjf1 JjugxMbucAy20wIzW4HTCsOkLCXZMFQAFXBNW08HQotQFxZ9z1QnGSZBuQTD33D0jfoswRzE/ 3r3ff+kWRQw4Ka4ar/AawMDzfo2V3zQWS+wuisNKHmY3tx9eUQt4hin4ss7ua3UPFInR6A8Tu 1TDtTQep+IN2Tth2ClNLhLfiQ4CAEN3xxHrd44/Lunqpq7CGzfJR7JweNBgTsDmJrMo6IpKkQ kAMXLIHrcEC+l6paAnclkNynF6KcwLyQ9X1WsrlN5Ads18z+DkmhNLaWOEG2s7PNWdjdn9Wcb cUHa+oP09wui0hDj18fAk1Vd8n8cXiLw0Ds1StuY0M7TzilDwUUlz0UymYXpN6ffzIpEWaPMe JQ7Sr4IlkZ4tg6lJzLKv/95LxlB3TB37SQ4GLwyxVfaO1G3ntILIA4BRIJgL4geYaN42Dhdxy NcA4oG06Ld0QlLNWnAZLNkOqFIohgoi0H6GR5w3ByyRAOdkxdrQjcAYzkYjfP+GoXvT5OwVVT 7vdcO4CQdjnZPMAqbxiclwQiJWuq6VGhHECeszLcOv9vO4yhb1OYKJeLWd0pjLK3fsnTuUbNj c6xowWvLzpKdJnByEE4SbDTKBSpl8YrW4aTRonW0yhXkl+a14NKATT/phfNaLQZL9W4nCdjtB scp1sxoOsnqYWBuHirVhn9jU9w5Nke/7grm9e5WKzc/BJE29wE= X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] X-Received-From: 212.227.15.15 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: Thu, 01 Feb 2018 00:03:42 -0000 Hi, Michel Bouissou wrote: > I'm happy to report that the USB stick I made today with > grub-mkrescue-sed.sh does boot alright on tested machines. So GRUB itself is ok with the machine. GPT and MBR partitions alike. > The HP tested machine has, AFAIK, no CSM "legacy" boot mode at all and I > believe it doesn't boot anything but UEFI. It booted the tails ISO which has no EFI boot equipment but only an ISOLINUX El Torito boot image for BIOS and an ISOLINUX isohybrid MBR with machine code which BIOS will execute when presented on USB stick. The machine's firmware probably falls back to legacy mode when detecting BIOS stuff but no EFI partition. ------------------------------------------------------------------------- What only do our users at the distro ISO projects miss which grub-mkrescue does right ? Is it simply the invalid GPT which Matthew J. Garrett introduced to get some of his test machines booting ? (Or did he introduce the MBR partition without noticing that this invalidates GPT ?) See "Anatomy of a Fedora 17 ISO image" https://mjg59.dreamwidth.org/11285.html preceeded by "Further adventures in EFI booting" https://mjg59.dreamwidth.org/4957.html The EFI images, which he and nearly all others use, are made with GRUB2. grub-mkrescue does a similar stunt about x86 machine code without side effects and the Block0 of an Apple Partition Map. But it does not combine a non-protective MBR with GPT. Michel - on his way to India - could zeroize 512-byte block 1 of the Debian Live ISO and then try to boot it from USB stick dd if=/dev/zero conv=notrunc bs=512 seek=1 count=1 of=...image.or.stick... where "...image.or.stick..." mabe either something like debian-live-*.iso or /dev/sdc. This would further deface the GPT and possibly de-confuse the firmware. Michel, i will try to remember to remind you, when you are back. :)) ------------------------------------------------------------------------- The partition tables of modified and vanilla grub-mkrescue ISOs: This is the modified one from grub-mkrescue-sed.sh : > root@zafu:/# xorriso -indev stdio:/dev/sdb -report_el_torito plain -report_system_area plain > ... > El Torito images : N Pltf B Emul Ld_seg Hdpt Ldsiz LBA > El Torito boot img : 1 BIOS y none 0x0000 0x00 4 1487 > El Torito boot img : 2 UEFI y none 0x0000 0x00 5760 7154 > El Torito img path : 1 /boot/grub/i386-pc/eltorito.img > El Torito img opts : 1 boot-info-table grub2-boot-info We see that it's with EFI equipment. (LBA counts blocks of 2048 bytes. Ldsiz counts blocks of 512 bytes. Blame IBM and Phoenix, not me.) > MBR partition table: N Status Type Start Blocks > MBR partition : 1 0x80 0x00 64 28552 > MBR partition : 2 0x00 0xef 28616 5760 (Here all block numbers are counted with 512 bytes per block.) By the options manipulation of grub-mkrescue-sed.sh the EFI partition image was appended after the mountable ISO 9660 partition. Other than with vanilla grub-mkrescue both partitions are marked in the MBR partition table. Partition 1 has the Boot/Active flag set, because some firmwares ignore media which do not have it on any partition. Partition 2 is the EFI partition. The same bytes as the El Torito UEFI boot image. (7154 * 2048 / 512 = 28616) Vanilla grub-mkrescue would rather look like: El Torito images : N Pltf B Emul Ld_seg Hdpt Ldsiz LBA El Torito boot img : 1 BIOS y none 0x0000 0x00 4 4047 El Torito boot img : 2 UEFI y none 0x0000 0x00 5760 85 El Torito img path : 1 /boot/grub/i386-pc/eltorito.img El Torito img opts : 1 boot-info-table grub2-boot-info El Torito img path : 2 /efi.img ... MBR partition table: N Status Type Start Blocks MBR partition : 1 0x00 0xee 1 34779 GPT : N Info GPT disk GUID : 04a5adf35d1adb4382bf8300bebe08a1 GPT entry array : 20 176 separated GPT lba range : 64 34734 34779 GPT partition name : 1 4700610070003000 GPT partname local : 1 Gap0 ... GPT partition name : 2 450046004900200062006f006f007400200070006100720074006900740069006f006e00 GPT partname local : 2 EFI boot partition GPT partition GUID : 2 04a5adf35d1adb4382bd8300bebe08a1 GPT type GUID : 2 28732ac11ff8d211ba4b00a0c93ec93b GPT partition flags: 2 0x1000000000000001 GPT start and size : 2 340 5760 GPT partition path : 2 /efi.img ... GPT start and size : 4 34132 600 plus maybe APM : N Info APM block size : 2048 ... Other than with the mbr_only version, the EFI partition is a data file inside the ISO 9660 filesystem: /efi.img 247 lines of explanation of the report format are available with xorriso -report_system_area help -report_el_torito help | less Have a nice day :) Thomas