[Top][All Lists]

[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 23:30:50 +0500
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.4.0

29.12.2015 18:26, Alexander E. Patrakov пишет:
28.12.2015 18:20, Thomas Schmitt пишет:

i improved the test script by adding two more manipulation modes:
- "mbr_only" produces an EFI compliant ISO without GPT, HFS+, APM.
- "original" lets the xorriso arguments pass unchanged.

The mode can be chosen by the environment variable
Default mode is "mjg": ESP in MBR+GPT+APM, HFS+ in APM.

Other environment variables for parametrization are
Read the first half of the script for explanations.

The script may now be stored anywhere. If it does not find its
neighboring "../../xorriso/xorriso", then it uses "xorriso" by default.
By MKRESCUE_SED_XORRISO one can address the xorriso binary explicitely.

Download from


If GNU xorriso -version says
   Version timestamp :  2015.12.27.150821
and one wants to test -DLibisofs_mjg_boot_for_grub2, then one should
overwrite the file
by the file version that is downloadable as


and run "make".
This keeps the results of mode "original" compliant with EFI
even if -DLibisofs_mjg_boot_for_grub2 was in effect at compile time.

The result of "original" still is influenced by the fact that
-DLibisofs_mjg_boot_for_grub2 prevents writing of gap filling
partition table entries.




   mv grub-mkrescue-sed.sh?format=txt grub-mkrescue-sed.sh
   chmod u+x grub-mkrescue-sed.sh

   export MKRESCUE_SED_XORRISO=$HOME/xorriso-1.4.3/xorriso/xorriso

   export MKRESCUE_SED_MODE=mjg
   grub-mkrescue -o output.iso minimal --xorriso=./grub-mkrescue-sed.sh

   export MKRESCUE_SED_MODE=mbr_only
   grub-mkrescue -o output.iso minimal --xorriso=./grub-mkrescue-sed.sh

   export MKRESCUE_SED_MODE=original
   grub-mkrescue -o output.iso minimal --xorriso=./grub-mkrescue-sed.sh

Inspect results by:

   $MKRESCUE_SED_XORRISO -hfsplus on -indev output.iso \
                         -report_system_area plain -report_el_torito


I have tested this script with various xorriso builds.

I have three builds of xorriso:

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

I have not tested anything with
-DLibisofs_protective_msdos_plus_boot_dummY but without
-DLibisofs_pmpbd_on_lba0, because my original layout (partitions
occupying the same space) was based on exactly one now-invalid design
consideration: ease of creation of valid geometry with dd.

I have four sets of grub-mkrescue options, with an appropriately patched
xorriso in the PATH:

A. "plain": grub-mkrescue -o minimal-plain.iso minimal
B. "default": grub-mkrescue -o minimal-default.iso minimal
C: "mjg-p2": MKRESCUE_SED_MODE=mjg MKRESCUE_SED_PARTNO=2 grub-mkrescue
-o minimal-mjg-p2.iso minimal --xorriso=/.../grub-mkrescue-sed.sh
grub-mkrescue -o minimal-mjg-p2.iso minimal

All combinations except 1B and 1C are, based on your prior emails,
valid, so I have tested them on DG965SS from a USB flash drive.

Note: I have also applied Andrei's patch that replaces the boot code in
the FAT filesystem. It was intended to allow older Macs to boot, but it
also affects DG965SS in the 2B case.

So, here are the interesting results:

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

2B: prints "this is not a bootable disk" message that is embedded in the
new boot code. This is especially interesting because there is no
partition marked as bootable, so my prior understanding of the BIOS
logic is wrong.

All other images are bootable.

Results from a 2007 Mac, USB boot:

CPPFLAGS have no influence
"A" images are not recognized as bootable
"B" and "C" images suggest 3 working EFI boot options
"D" image has only one EFI boot option, and it works

Results from a 2012 Mac, USB boot:

"A" images offer 2 EFI boot options, both work
"B" images offer 3 EFI boot options, all work
"C" images offer 3 EFI and one Windows boot option, all of them work
"D" images offer 1 EFI working boot option and, except for the "vanilla" xorriso build, 1 working Windows boot option.

Results from a 2007 Mac, CD boot:

Only 3C and 3D images were tested.
"3C" provides three EFI and one Windows option. The last of the three EFI options boots into Mac OS X, all the other options work.
"3D" provides 1 EFI and 1 Windows option, both options work.

Results from a 2012 Mac, CD boot:

Only 3C and 3D images were tested.
"3C" provides two EFI and one Windows option, all of them work.
"3D" provides 1 EFI and 1 Windows option, both options work.

So, as it looks, in terms of compatibility with hardware where I can either test things myself or ask others to test, mjg-p2 and mbr-only images are equivalent, but mbr-only images produce less confusion in terms of redundant (and not always working) boot options. OTOH, the old macs (that require hfsplus when booting from a CD) likely need to use the mjg layout.

Alexander E. Patrakov

reply via email to

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