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: Alexander E. Patrakov
Subject: Re: Test Proposal for [bug #46716] Protective MBR partition is not marked as bootable
Date: Tue, 29 Dec 2015 18:26:19 +0500
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.5.0

28.12.2015 18:20, Thomas Schmitt пишет:
Hi,

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
   MKRESCUE_SED_MODE
Default mode is "mjg": ESP in MBR+GPT+APM, HFS+ in APM.

Other environment variables for parametrization are
   MKRESCUE_SED_PARTNO   MKRESCUE_SED_PROTECTIVE   MKRESCUE_SED_DEBUG
   MKRESCUE_SED_XORRISO  MKRESCUE_SED_XORRISO_ARGS
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

   
http://libburnia-project.org/browser/libisoburn/trunk/frontend/grub-mkrescue-sed.sh?format=txt


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
   xorriso-1.4.3/libisofs/system_area.c
by the file version that is downloadable as
   
http://bazaar.launchpad.net/~libburnia-team/libisofs/scdbackup/download/1301/system_area.c-20081019135100-i5wqmczu54lzyabt-1/system_area.c
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.

-----------------------------------------------------------------

Examples:

   wget 
http://libburnia-project.org/browser/libisoburn/trunk/frontend/grub-mkrescue-sed.sh?format=txt
   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
   export MKRESCUE_SED_PARTNO=2
   grub-mkrescue -o output.iso minimal --xorriso=./grub-mkrescue-sed.sh
   unset MKRESCUE_SED_PARTNO

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

   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 plain

-----------------------------------------------------------------

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 --xorriso=/.../grub-mkrescue-sed.sh C: "mjg-p2": MKRESCUE_SED_MODE=mjg MKRESCUE_SED_PARTNO=2 grub-mkrescue -o minimal-mjg-p2.iso minimal --xorriso=/.../grub-mkrescue-sed.sh D: "mbr-only": MKRESCUE_SED_MODE=mbr_only MKRESCUE_SED_PROTECTIVE=no grub-mkrescue -o minimal-mjg-p2.iso minimal --xorriso=/.../grub-mkrescue-sed.sh

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.

--
Alexander E. Patrakov



reply via email to

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