[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [bug #46716] Protective MBR partition is not marked as bootable
From: |
Thomas Schmitt |
Subject: |
Re: [bug #46716] Protective MBR partition is not marked as bootable |
Date: |
Sat, 19 Dec 2015 19:39:50 +0100 |
Hi,
i wrote:
> > I currently try to talk Debian out of nesting partitions,
> > even id the big one is type 0x00.
Alexander E. Patrakov wrote:
> If the discussion is archived somewhere, a pointer to it would be nice to
> have.
I made a lenghty assessment of Debians amd64 and i386 setup at
occasion of this bug report
https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=776317#75
(which is about a misunderstanding, actually).
Then i hopped on that topic in debian-cd list like Cato the Elder
did on Carthago. This must have been annoying enough so that
Debian's arm64 ISOs have this layout:
$ xorriso -indev debian-8.1.0-arm64-netinst.iso -report_system_area plain
-report_el_torito plain
...
ISO image size/512 : 329728
...
MBR partition table: N Status Type Start Blocks
MBR partition : 1 0x00 0x83 0 329728
MBR partition : 2 0x00 0xef 329728 2048
El Torito catalog : 918 1
El Torito cat path : /boot.catalog
El Torito images : N Pltf B Emul Ld_seg Hdpt Ldsiz LBA
El Torito boot img : 1 UEFI y none 0x0000 0x00 768 919
El Torito img path : 1 /boot/grub/efi.img
Note that partition 2 is outside the ISO, while the El Torito
boot image is a file in the ISO. Content is the same, i assume.
Well, arm64 has not legacy BIOS to struggle with.
Currently it looks like your idea with the duplicate partition
of type 0x00 and boot flag is another one which covers all.
But it is as ugly as isohybrid+GRUB2 for BIOS+EFI as in Debian
amd64 ISOs.
> [instructions for grub-mkrescue on Debian VM]
I will try to make my own grub-mkrescue image before the year
is over. :))
> http://82.193.153.141/minimal.iso
It contains the full orchestra:
System area summary: MBR protective-msdos-label grub2-mbr cyl-align-off GPT
APM
ISO image size/512 : 32852
Partition offset : 0
MBR heads per cyl : 64
MBR secs per head : 32
MBR partition table: N Status Type Start Blocks
MBR partition : 1 0x00 0xee 1 32851
GPT : N Info
GPT disk GUID : 781a13c2a0f79b4ead7fe455e9b7e46c
GPT entry array : 20 176 separated
GPT lba range : 64 32806 32851
GPT partition name : 1 4700610070003000
GPT partname local : 1 Gap0
GPT partition GUID : 1 781a13c2a0f79b4ead7ce455e9b7e46c
GPT type GUID : 1 a2a0d0ebe5b9334487c068b6b72699c7
GPT partition flags: 1 0x1000000000000001
GPT start and size : 1 64 272
GPT partition name : 2
450046004900200062006f006f007400200070006100720074006900740069006f006e00
GPT partname local : 2 EFI boot partition
GPT partition GUID : 2 781a13c2a0f79b4ead7de455e9b7e46c
GPT type GUID : 2 28732ac11ff8d211ba4b00a0c93ec93b
GPT partition flags: 2 0x1000000000000001
GPT start and size : 2 336 5760
GPT partition path : 2 /efi.img
GPT partition name : 3 4700610070003100
GPT partname local : 3 Gap1
GPT partition GUID : 3 781a13c2a0f79b4ead7ee455e9b7e46c
GPT type GUID : 3 a2a0d0ebe5b9334487c068b6b72699c7
GPT partition flags: 3 0x1000000000000001
GPT start and size : 3 6096 26708
APM : N Info
APM block size : 2048
APM gap fillers : 2
APM partition name : 1 Gap0
APM partition type : 1 ISO9660_data
APM start and size : 1 16 1508
APM partition name : 2 HFSPLUS_Hybrid
APM partition type : 2 Apple_HFS
APM start and size : 2 1524 6527
APM partition name : 3 Gap1
APM partition type : 3 ISO9660_data
APM start and size : 3 8051 162
El Torito catalog : 1669 1
El Torito cat path : /boot.catalog
El Torito images : N Pltf B Emul Ld_seg Hdpt Ldsiz LBA
El Torito boot img : 1 BIOS y none 0x0000 0x00 4 7916
El Torito boot img : 2 UEFI y none 0x0000 0x00 5760 84
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
(Note how neatly Vladimir and i avoided any partition nesting
when planning this layout.
Lengthy explanation of the report format:
xorriso -report_system_area help -report_el_torito help | less
)
Achieved by these -as mkisofs options:
$ xorriso -indev minimal.iso -report_system_area as_mkisofs
...
--grub2-mbr ...local.file...
--protective-msdos-label
-apm-block-size 2048
-hfsplus
-efi-boot-part --efi-boot-image
-c '/boot.catalog'
-b '/boot/grub/i386-pc/eltorito.img'
-no-emul-boot
-boot-load-size 4
-boot-info-table
--grub2-boot-info
-eltorito-alt-boot
-e '/efi.img'
-no-emul-boot
...
> By the way, I have also created an ISO with a hybrid MBR by treating the
> original minimal.iso with gdisk. The iso is available at
> http://82.193.153.141/minimal-hybrid.iso
I assume that its MBR lets any decent EFI ignore the GPT:
MBR partition table: N Status Type Start Blocks
MBR partition : 1 0x00 0xee 1 63
MBR partition : 2 0x80 0x07 64 272
MBR partition : 3 0x00 0xef 336 5760
MBR partition : 4 0x00 0x07 6096 26708
MBR partition path : 3 /efi.img
Isn't 0xee a misnomer now that you decided for MBR ?
Actually one could save one partition slot by leaving the first
few blocks unclaimed or by extending partion 2 to block 1.
MBR partition table: N Status Type Start Blocks
MBR partition : 1 0x80 0x07 1 335
MBR partition : 2 0x00 0xef 336 5760
MBR partition : 3 0x00 0x07 6096 26708
Nevertheless, your overlapping layout would have the appeal of
giving a mountable partition:
MBR partition table: N Status Type Start Blocks
MBR partition : 1 0x80 0x00 0 32804
MBR partition : 2 0x00 0xef 336 5760
It would travel on the ticket that EFI shall ignore MBR partition
type 0x00. Ugly, but well tested by Debian amd64 isohybrid+GRUB2.
My personal favorite would be what Debian arm64 does, plus a
boot flag:
MBR partition table: N Status Type Start Blocks
MBR partition : 1 0x80 0x83 0 32804
MBR partition : 2 0x00 0xef 32804 5760
To be produced by these options
-append_partition 2 0xef ...local.path.../efi.img
-G ...local.file.with.a.few.binary.zeros...
-c '/boot.catalog'
-e '/efi.img'
-no-emul-boot
Debian's amd64 EFI system partition is smaller than yours.
It contains just enough GRUB2 to find the GRUB2 installation
inside the ISO filesystem. Menus and other stuff are only in
that ISO directory.
Have a nice day :)
Thomas
- Re: [bug #46716] Protective MBR partition is not marked as bootable, (continued)
Re: [bug #46716] Protective MBR partition is not marked as bootable, Thomas Schmitt, 2015/12/19
Message not available
- Re: [bug #46716] Protective MBR partition is not marked as bootable, Alexander E. Patrakov, 2015/12/19
- Re: [bug #46716] Protective MBR partition is not marked as bootable, Alexander E. Patrakov, 2015/12/19
- Re: [bug #46716] Protective MBR partition is not marked as bootable,
Thomas Schmitt <=
- Re: [Bug-xorriso] [bug #46716] Protective MBR partition is not marked as bootable, Andrei Borzenkov, 2015/12/19
- Re: [bug #46716] Protective MBR partition is not marked as bootable, Thomas Schmitt, 2015/12/19
- Re: [Bug-xorriso] [bug #46716] Protective MBR partition is not marked as bootable, Andrei Borzenkov, 2015/12/20
- Re: [bug #46716] Protective MBR partition is not marked as bootable, Thomas Schmitt, 2015/12/20
- Test Proposal for [bug #46716] Protective MBR partition is not marked as bootable, Thomas Schmitt, 2015/12/20
- Re: Test Proposal for [bug #46716] Protective MBR partition is not marked as bootable, Thomas Schmitt, 2015/12/20
- Re: Test Proposal for [bug #46716] Protective MBR partition is not marked as bootable, Alexander E. Patrakov, 2015/12/20
- Re: Test Proposal for [bug #46716] Protective MBR partition is not marked as bootable, Alexander E. Patrakov, 2015/12/23
- Re: Test Proposal for [bug #46716] Protective MBR partition is not marked as bootable, Thomas Schmitt, 2015/12/23
- Re: [Bug-xorriso] Test Proposal for [bug #46716] Protective MBR partition is not marked as bootable, Andrei Borzenkov, 2015/12/24