DevHeads.net

GPT and Fedora 17

In Fedora 16 we changed to using GPT as the default disklabel for new
installs. In a few cases, mostly limited to Lenovo hardware, we found
that some BIOS's would not boot from GPT. We blacklisted Lenovo, falling
back to msdos labels in order to solve this.

Thanks to Matthew Garrett we found that switching on the boot flag of
the GPT's protective MBR these BIOS's would then boot from GPT. Matthew
wrote a patch for parted to allow controlling this flag using the
disk_set pmbr_boot command in parted. This is in parted-3.0-7

In anaconda-17.6 I have reverted the Lenovo blacklist and changed things
so that pmbr_boot is always set on GPT labeled installs. This should
ensure that thing boot correctly.

If this still causes problems the symptom will be that grub never starts
and the bios may complain about not being able to find an OS. If you
have problems with this please open a bug with the output from dmidecode

You can still force usage of msdos partitions by passing nogpt on the
kernel cmdline.

Comments

Re: GPT and Fedora 17

By =?ISO-8859-1?Q?... at 02/06/2012 - 19:19

On 02/06/2012 10:40 PM, Brian C. Lane wrote:
Hmm, I tried that workaround I think on my Lenovo T520 with BIOS 1.29,
and it didn't help. I.E. point (1.) from the link referenced here:
<a href="https://bugzilla.redhat.com/show_bug.cgi?id=735733#c31" title="https://bugzilla.redhat.com/show_bug.cgi?id=735733#c31">https://bugzilla.redhat.com/show_bug.cgi?id=735733#c31</a>

Fingers crossed I just missed something at the time.
I'll try out again tomorrow maybe.

cheers,
Pádraig.

Re: GPT and Fedora 17

By Adam Williamson at 02/06/2012 - 20:54

On Mon, 2012-02-06 at 23:19 +0000, Pádraig Brady wrote:
Yes, I remember that. Please do test the change out and let us know the
results, we'd definitely like to know.

Brian, this change takes effect from Alpha TC2 (whenever we spin it),
it's not in Alpha TC1, correct?

Re: GPT and Fedora 17

By =?ISO-8859-1?Q?... at 03/02/2012 - 13:37

On 02/07/2012 12:54 AM, Adam Williamson wrote:
Yep as expected F17 alpha is broken in the same way on my laptop.

cheers,
Pádraig.

Re: GPT and Fedora 17

By Adam Williamson at 03/02/2012 - 17:42

On Fri, 2012-03-02 at 17:37 +0000, Pádraig Brady wrote:
So it seems the boot flag on protective MBR does not, in fact, fix all
Lenovos, Brian...

Re: GPT and Fedora 17

By Chris Murphy at 03/02/2012 - 15:09

Your laptop is what hardware? Any install media kernel parameters used? What installation type? Can you provide both an fdisk and parted (or gdisk) listing of the post-installation disk?

Chris Murphy

Re: GPT and Fedora 17

By =?ISO-8859-1?Q?... at 03/02/2012 - 17:20

On 03/02/2012 07:09 PM, Chris Murphy wrote:
For earlier in the thread:

"Hmm, I tried that workaround I think on my Lenovo T520 with BIOS 1.29,
and it didn't help. I.E. point (1.) from the link referenced here:
https://bugzilla.redhat.com/show_bug.cgi?id=735733#c31"
You can see the boot flag is set to no avail in the disk
and parted output below:

Disk /dev/sda: 500.1 GB, 500107862016 bytes
255 heads, 63 sectors/track, 60801 cylinders, total 976773168 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x00000000

Device Boot Start End Blocks Id System
/dev/sda1 * 1 976773167 488386583+ ee GPT

Model: ATA ST9500420AS (scsi)
Disk /dev/sda: 500GB
Sector size (logical/physical): 512B/512B
Partition Table: gpt
Disk Flags: pmbr_boot

Number Start End Size File system Name Flags
1 1049kB 2097kB 1049kB bios_grub
2 2097kB 526MB 524MB ext4 ext4 boot
3 526MB 500GB 500GB lvm

I've confirmed that installing with the "nogpt" flag is OK.

cheers,
Pádraig.

Re: GPT and Fedora 17

By Chris Murphy at 03/02/2012 - 17:35

On Mar 2, 2012, at 2:20 PM, Pádraig Brady wrote:

1.
What happens if you remove the GPT boot flag from sda2?

2.
What happens if you add the GPT legacy_boot flag to sda2?

3.
While I wouldn't recommend supporting such a solution, but I'm curious what happens if you use gdisk to create a hybrid MBR, and add only partition 3 (lvm), set it as bootable instead of the PMBR. GPT fdisk (gdisk) can do this. It's now on the F17 LiveCD. Menu 'r' option 'h'.

Chris Murphy

Re: GPT and Fedora 17

By Brian C. Lane at 02/06/2012 - 21:11

On Mon, Feb 06, 2012 at 04:54:01PM -0800, Adam Williamson wrote:
Correct.

Re: GPT and Fedora 17

By Chris Murphy at 02/06/2012 - 19:09

On Feb 6, 2012, at 3:40 PM, Brian C. Lane wrote:
Is this happening only for Lenovo hardware? Or all hardware? I ask because my Apple hardware fails to boot any OS including pre-existing Mac OS, if the protective MBR (MBR entry 1) has an active (boot) flag set.

Chris Murphy