bug-grub
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Test Proposal for [bug #46716] Protective MBR partition is not marke


From: Thomas Schmitt
Subject: Re: Test Proposal for [bug #46716] Protective MBR partition is not marked as bootable
Date: Tue, 29 Dec 2015 18:51:51 +0100

Hi,

Alexander E. Patrakov wrote:
> > > 2B: prints "this is not a bootable disk" message 

i wrote:
> > You see a string from the EFI partition 0xef in your old BIOS ?

> Yes! And it shows it despite the fact that there is no bootable partition!

Is this string from the very start of /efi.img ?
In this case the BIOS possibly hopped on the only partition (0xef)
and tried to execute the x86 machine code of its Extended Boot Record.


> > (pseudo-)protective partition (program variant 2C with EFI
> >   partition as MBR partition 2)

> Not sure if I understand this variant correctly, a report from xorriso would
> be welcome.

The default "mjg" mode 2B appends the ESP as MBR partition 1.
In this case, no partition table entry for the ISO filesystem
is created.
So we end up with a single MBR partition 0xef (to which we do
not want to apply the boot flag).

MKRESCUE_SED_PARTNO=2 in run 2C appends the ESP as partition 2
and leaves partition table entry 1 available for covering the ISO
filesystem.
Now it depends on --protective-msdos-label whether this partition 1
starts at block 1 (in case the option is present) or at block 0
(in case the option is missing).
If the start is at block 0, then the MBR partition 1 is mountable as
ISO 9660.

In any case, partition 1 can take the boot flag if it is clear to
libisofs that a GRUB2 related MBR is present.
libisofs may safely assume this if --protective-msdos-label or
--grub2-mbr are present.
In this case it actually needs no encouragement by
--protective-msdos-bootflag.

So the description would rather be

 --protective-msdos-bootflag
      Enforce an MBR partition with "bootable/active" flag if options
      --protective-msdos-label or --grub2-mbr are given.
      These options normally cause the bootable flag to be set if
      there is an MBR partition of type other than 0xee or 0xef.
      If no such partition exists, then no bootflag is set, unless
      --protective-msdos-bootflag forces creation of a dummy partition
      of type 0x00 which covers only the first block of the ISO image.

The "normal" case is already true for --protective-msdos-label.
It sets the bootflag if it does not set the type of partition 1
to 0xee.
There will be no risk for user script regressions, because afaik
the option --grub2-mbr is only used by grub-mkrescue and only
applies to the GRUB2 MBR "boot_hybrid.img".
Giving --grub2-mbr the same bootflag power as --protective-msdos-label
will enable the choice to have a mountable ISO partition.


Andrei ?
Any objections ?
(Except the ugliness that it is so non-generic. This helps to contain
 undesired side effects.)


> > My proposal "mbr_only" works too (so far), if boot flag is present

> Good. But I'd rather wait for Mac results before approving the mbr_only
> layout.

Ye olde Macs without full EFI support will not work.
E.g. the one which needs HFS+ when booting from CD, as Andrei
reported.

I will make experiments whether it can be combined with HFS+ without
losing its appeal of implementing UEFI 2.4, section 2.5.1 and table 16.


Have a nice day :)

Thomas




reply via email to

[Prev in Thread] Current Thread [Next in Thread]