bug-grub
[Top][All Lists]
Advanced

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

Re: [Bug-xorriso] Test Proposal for [bug #46716] Protective MBR partitio


From: Alexander E. Patrakov
Subject: Re: [Bug-xorriso] Test Proposal for [bug #46716] Protective MBR partition is not marked as bootable
Date: Tue, 29 Dec 2015 21:22:10 +0500
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.4.0

29.12.2015 21:05, Thomas Schmitt пишет:
Hi,

do i understand it right that you decided for the dummy MBR partition
that covers a single block at the start of the ISO ?

Assuming that a layout is chosen that has a protective MBR partition of type 0xee and thus needs a dummy bootable MBR partition, I would prefer it to cover a single block at the start of the iso. But if a simpler MBR-only layout works and doesn't need dummy partitions, then I would prefer it even more.


If you confirm, i will replace the two macros by a single option
which you can add to your grub-mkrescue run.

How about this:

--protective-msdos-bootflag
     If --protective-msdos-label or --grub2-mbr are given, make sure
     that one of the MBR partitions bears the "bootable/active" flag.
     If that flag is missing then apply it to the first partition
     which is not of type 0xee or 0xef. If no such partition exists,
     then create a dummy partition of type 0x00 which covers only the
     first block of the ISO image.

This looks good.


(An MBR partition which includes block 0 can be neither a
  0xee nor a 0xef. So if there is one, it will get the bootflag
  and no 0x00 partition will get appended.
  No partition overlapping can be added.)

If a --grub2-mjg-layout option emerges, then the effect of
--protective-msdos-bootflag will be extended to that one, too.


The sketching of a comprehensive language for describing
boot sectors and partitions will last a bit longer, i fear.


--------------------------------------------------------------------
Now for alternative layouts:

Alexander E. Patrakov wrote:
1. "vanilla": with the modified system_area.c, but with no CPPFLAGS
2. "no-boot-dummy": with -DLibisofs_mjg_boot_for_grub2
3. "rich": with -DLibisofs_mjg_boot_for_grub2
    -DLibisofs_protective_msdos_plus_boot_dummY -DLibisofs_pmpbd_on_lba0
...
A. "plain": grub-mkrescue -o minimal-plain.iso minimal
B. "default": grub-mkrescue -o minimal-default.iso minimal
     --xorriso=/.../grub-mkrescue-sed.sh
C: "mjg-p2": MKRESCUE_SED_MODE=mjg MKRESCUE_SED_PARTNO=2 ...
D: "mbr-only": MKRESCUE_SED_MODE=mbr_only MKRESCUE_SED_PROTECTIVE=no

All combinations except 1B and 1C are, based on your prior emails, valid,

At least mode "mjg" yields the desired result only with 2 and 3.

So here we agree on the set of valid options.

1A, 1D, 2A: not recognized by the motherboard at all.
no MBR partitions are marked as bootable on these iso images.

1A and 2A are the reason why this thread exists. They lack of
a non-0xee-0xef partition which one could mark bootable.

Right.

1D has no boot flag because MKRESCUE_SED_PROTECTIVE=no. You may
trade bootflag for mountable ISO partition by MKRESCUE_SED_PROTECTIVE=yes.
(I will ponder whether boot flag can be enabled by --grub2-mbr
  if some non-0xee-0xef partition is at hand.)

Thanks for the suggestion, but I will be able to retest only tomorrow.



Note: I have also applied Andrei's patch that replaces the boot code in the
FAT filesystem.
...
2B: prints "this is not a bootable disk" message that is embedded
in the new boot code.

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!


2B lacks boot flag because 0xef is the only MBR partition.

Right.



-----------------------------------------------------------------
My conclusions:

Andrei's proposal to have an "mjg" layout (MBR+GPT+APM) works so far,
if it gets augmented by an additional MBR partition which bears a
boot flag.
This may be

- a dummy partition (program variant 3[AB]),

This was already tested and works.

- or a (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.


- or a partition which makes the ISO mountable (program 2C with
   MKRESCUE_SED_PROTECTIVE=no).

This would work, too.


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

- because the program changes for "mjg" included the desire for
   a bootflag (program variant [23]D),

- or because MKRESCUE_SED_PROTECTIVE=yes are in effect (programs
   [1-3]D).

The new proposed option --protective-msdos-bootflag will enforce
the presence of a boot flag if the system area settings indicate
a GRUB2 MBR.

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

--
Alexander E. Patrakov



reply via email to

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