bugGNU GRUB - Bugs: bug #28142, grub2 fails to embed core.img in...

 
 

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

bug #28142: grub2 fails to embed core.img in bios-boot partition on GPT-labeled disk

Submitted by:  Carsten Dumke <cdumke>
Submitted on:  Tue 01 Dec 2009 09:51:15 AM UTC  
 
Category: Disk & PartitionSeverity: Major
Priority: 5 - NormalItem Group: Software Error
Status: InvalidPrivacy: Public
Assigned to: NoneOriginator Name: Carsten Dumke
Open/Closed: ClosedRelease: 
Release: 1.97Reproducibility: Every Time
Planned Release: None

Tue 01 Dec 2009 10:24:39 AM UTC, comment #1:

Such a GPT is invalid. GPT protective has to be the first entry in MBR

Vladimir Serbinenko <phcoder>
Project Administrator
Tue 01 Dec 2009 09:51:15 AM UTC, original submission:

I want to use grub2 (1.97.1) to boot OpenSuSE-ia32 (10.3) from a GPT-labeled disk. The disk was prepared using parted2 (GIT-20091124):

# parted2 /dev/sda print
Model: VMware, VMware Virtual S (scsi)
Disk /dev/sda: 42,9GB
Sector size (logical/physical): 512B/512B
Partition Table: gpt

Number Start End Size File system Name Flags
1 17,4kB 214MB 214MB ext3 primary boot
2 214MB 222MB 8225kB primary bios_grub
3 222MB 42,9GB 42,7GB primary lvm
-------- end of output -----------

Parted2 writes a protected MBR to the disk which shows up in fdisk:
# LANG=C fdisk -l /dev/sda

WARNING: GPT (GUID Partition Table) detected on '/dev/sda'! The util fdisk doesn't support GPT. Use GNU Parted.

Disk /dev/sda: 42.9 GB, 42949672960 bytes
255 heads, 63 sectors/track, 5221 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Disk identifier: 0x00000000

Device Boot Start End Blocks Id System
/dev/sda1 * 1 26 208828 83 Linux
/dev/sda2 27 27 8032 83 Linux
/dev/sda3 28 5222 41726145 83 Linux
/dev/sda4 1 1 0+ ee EFI GPT

Partition table entries are not in disk order
-------- end of output -----------

grub2-install produces the following error:

/usr/sbin/grub2-install --recheck --no-floppy /dev/sda --force
grub-setup: warn: This GPT partition label has no BIOS Boot Partition; embedding won't be possible!
grub-setup: warn: Embedding is not possible. GRUB can only be installed in this setup by using blocklists. However, blocklists are UNRELIABLE and its use is discouraged.
Installation finished. No error reported.
This is the contents of the device map /boot/grub2/device.map.
Check if this is correct or not. If any of the lines is incorrect,
fix it and re-run the script `grub-install'.

(hd0) /dev/sda
-------- end of output -----------

As shown in the parted2-output there is a BIOS Boot Partition on the disk (flag bios_grug), but grub2-install fails to detect it, because it only checks the first partition for the "EFI GPT" label.

I've attached a patch to fix this.

Carsten Dumke <cdumke>

 

Attached Files
file #19170:  grub2-fix-gpt-detect.patch added by cdumke (803B - application/octet-stream - patch fixes GPT-disk detection)

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -unavailable- added by phcoder (Posted a comment)
  • -unavailable- added by cdumke (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
    Tue 01 Dec 2009 10:24:39 AM UTCphcoderStatusNone=>Invalid
      Open/ClosedOpen=>Closed
    Tue 01 Dec 2009 09:51:16 AM UTCcdumkeAttached File-=>Added grub2-fix-gpt-detect.patch, #19170

    Back to the top


    Powered by Savane 3.1-cleanup1