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

Submitter:  Carsten Dumke <cdumke>
Submitted:  Tue 01 Dec 2009 09:51:15 AM UTC
   
 
Category:  Disk & Partition Severity:  Major
Priority:  5 - Normal Item Group:  Software Error
Status:  Invalid Privacy:  Public
Assigned to:  None Originator Name:  Carsten Dumke
Open/Closed:  Closed Release:  1.97
Release:  Reproducibility:  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>
Group 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>

 

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

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
  • -email is unavailable- added by phcoder (Posted a comment)
  • -email is unavailable- added by cdumke (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
    2009-12-01 phcoder StatusNone Invalid
        Open/ClosedOpen Closed
    2009-12-01 cdumke Attached File- Added grub2-fix-gpt-detect.patch, #19170

    Back to the top

    Powered by Savane 3.13-f8d8.
    Corresponding source code