bugGNU GRUB - Bugs: bug #46716, Protective MBR partition is not...

 
 

You are not allowed to post comments on this tracker with your current authentication level.

bug #46716: Protective MBR partition is not marked as bootable

Submitter:  Alexander E. Patrakov <patrakov>
Submitted:  Sat 19 Dec 2015 11:37:38 AM UTC
   
 
Category:  Booting Severity:  Major
Priority:  5 - Normal Item Group:  None
Status:  Fixed Privacy:  Public
Assigned to:  None Originator Name:  Alexander E. Patrakov
Open/Closed:  Closed Release:  2.02~beta1
Release:  Reproducibility:  Every Time
Planned Release:  2.03+

Sat 19 Dec 2015 02:39:10 PM UTC, comment #4: 

As requested, further discussion is in the mailing lists.

https://lists.gnu.org/archive/html/bug-grub/2015-12/msg00029.html

Alexander E. Patrakov <patrakov>
Sat 19 Dec 2015 01:05:46 PM UTC, comment #3: 

Protective MBR is not expected to contain any other partitions either.

In any case - it is not really a bug to fix in GRUB. MBR is crearedtby xorriso; and what /should/ be created here is better discussed on grub-devel for wider exposure.

Andrei Borzenkov <arvidjaar>
Group Member
Sat 19 Dec 2015 12:54:48 PM UTC, comment #2: 

OK, Tiano Core validates the protective partition as follows:

  //
  // Verify that the Protective MBR is valid
  //
  for (Index = 0; Index < MAX_MBR_PARTITIONS; Index++) {
    if (ProtectiveMbr->Partition[Index].BootIndicator == 0x00 &&
        ProtectiveMbr->Partition[Index].OSIndicator == PMBR_GPT_PARTITION &&
        UNPACK_UINT32 (ProtectiveMbr->Partition[Index].StartingLBA) == 1
        ) {
      break;
    }
  }
  if (Index == MAX_MBR_PARTITIONS) {
    goto Done;  // i.e. not valid
  }

So here is an alternative suggestion: don't mark the protective partition, create another dummy MBR partition of type 0x00, mark it as bootable.

Alexander E. Patrakov <patrakov>
Sat 19 Dec 2015 12:42:22 PM UTC, comment #1: 

Well, changing this byte also makes the iso unbootable from flash drive in OVMF (i.e. in QEMU in UEFI mode).

Alexander E. Patrakov <patrakov>
Sat 19 Dec 2015 11:37:38 AM UTC, original submission:  

Some old BIOSes (including the one in Intel DG965SS desktop board) refuse to treat a USB drive as bootable if it has no bootable MBR partitions. This applies to all iso images that are created by grub-mkrescue and written to a USB flash drive with dd.

Changing the byte at offset 0x1be to 0x80 in the resulting iso makes it bootable on such boards.

Images produced by xorriso with isolinux as recommended at http://www.syslinux.org/wiki/index.php/Isohybrid do have 0x80 at offset 0x1be, so I think it is a bug in GRUB, not in xorriso.

Alexander E. Patrakov <patrakov>

 

(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

No files currently attached

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -email is unavailable- added by phcoder (Updated the item)
  • -email is unavailable- added by arvidjaar (Posted a comment)
  • -email is unavailable- added by patrakov (Submitted the item)
  •  

    There are 0 votes so far. Votes easily highlight which items people would like to see resolved in priority, independently of the priority of the item set by tracker managers.

     

    Follow 3 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2016-03-02 phcoder StatusNone Fixed
        Open/ClosedOpen Closed
    2016-03-02 phcoder Planned ReleaseNone 2.03+

    Back to the top

    Powered by Savane 3.13-f8d8.
    Corresponding source code