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

Submitted by:  Alexander E. Patrakov <patrakov>
Submitted on:  Sat 19 Dec 2015 11:37:38 AM UTC  
 
Category: BootingSeverity: Major
Priority: 5 - NormalItem Group: None
Status: FixedPrivacy: Public
Assigned to: NoneOriginator Name: Alexander E. Patrakov
Open/Closed: ClosedRelease: 
Release: 2.02~beta1Reproducibility: 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>
Project 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>

 

No files currently attached

 

Depends on the following items: None found

Items that depend on this one: None found

 

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

    Do you think this task is very important?
    If so, you can click here to add your encouragement to it.
    This task has 0 encouragements so far.

    Only logged-in users can vote.

     

    Please enter the title of George Orwell's famous dystopian book (it's a date):

     

     

    Follow 3 latest changes.

    Date Changed By Updated Field Previous Value => Replaced By
    Wed 02 Mar 2016 01:20:02 PM UTCphcoderStatusNone=>Fixed
      Open/ClosedOpen=>Closed
    Wed 02 Mar 2016 12:04:43 PM UTCphcoderPlanned ReleaseNone=>2.03+

    Back to the top


    Powered by Savane 3.1-cleanup1