### More in the series of bizarre UEFI bugs

11:49 pm
A (well, now former) coworker let me know about a problem he was having with a Lenovo Thinkcentre M92p. It booted Fedora UEFI install media fine, but after an apparently successful installation refused to boot. UEFI installs on Windows worked perfectly. Secure Boot was quickly ruled out, but this could still have been a number of things. The most interesting observation was that the Fedora boot option didn't appear in the firmware boot menu at all, but Windows did. We spent a little while comparing the variable contents, gradually ruling out potential issues - Linux was writing an entry that had an extra 6 bytes in a structure, for instance[1], and a sufficiently paranoid firmware implementation may have been tripping up on that. Fixing that didn't help, though. Finally we tried just taking the Windows entry and changing the descriptive string. And it broke.

Every UEFI boot entry has a descriptive string. This is used by the firmware when it's presenting a menu to users - instead of "Hard drive 0" and "USB drive 3", the firmware can list "Windows Boot Manager" and "Fedora Linux". There's no reason at all for the firmware to be parsing these strings. But the evidence seemed pretty strong - given two identical boot entries, one saying "Windows Boot Manager" and one not, only the first would work. At this point I downloaded a copy of the firmware and started poking at it. Turns out that yes, actually, there is a function that compares the descriptive string against "Windows Boot Manager" and appears to return an error if it doesn't match. What's stranger is that it also checks for "Red Hat Enterprise Linux" and lets that one work as well.

This is, obviously, bizarre. A vendor appears to have actually written additional code to check whether an OS claims to be Windows before it'll let it boot. Someone then presumably tested booting RHEL on it and discovered that it didn't work. Rather than take out that check, they then addded another check to let RHEL boot as well. We haven't yet verified whether this is an absolute string match or whether a prefix of "Red Hat Enterprise Linux" is sufficient, and further examination of the code may reveal further workarounds. For now, if you want to run Fedora[2] on these systems you're probably best off changing the firmware to perform a legacy boot.

[1] src/include/efi.h: uint8_t padding[6]; /* Emperically needed */, says the efibootmgr source code. Unhelpful.
[2] Or Ubuntu, or Suse, or…
Page 1 of 2 << [1] [2] >>

#### Plan of action

Date: 2012-11-15 07:06 am (UTC)
From: (Anonymous)
What option do we have, how can we address that as a community?

#### Re: Plan of action

Date: 2012-11-15 07:29 am (UTC)
From: (Anonymous)
Maybe annnoying/DDoSing the sloppy vendor with all the different variations of things they broke with that helpful check (like, "I've tried these Linux distributions: [liiiist] and not a single one [but RHEL] worked after successful installation in UEFI mode while all of these work on an [HP/SONY/ASUS item]")...

That takes hardware and patience though, no use to cheat.

--
Michael Shigorin

#### Re: Plan of action

From: (Anonymous) - Date: 2012-11-15 04:53 pm (UTC) - Expand

#### Re: Plan of action

From: (Anonymous) - Date: 2012-11-16 03:22 pm (UTC) - Expand

#### Re: Plan of action

From: (Anonymous) - Date: 2012-11-15 10:31 am (UTC) - Expand

#### Re: Plan of action

From: (Anonymous) - Date: 2012-11-15 05:24 pm (UTC) - Expand

#### Re: Plan of action

From: (Anonymous) - Date: 2012-11-15 06:08 pm (UTC) - Expand

#### driving up revenue

From: (Anonymous) - Date: 2012-11-15 09:43 pm (UTC) - Expand

#### Re: driving up revenue

From: - Date: 2012-11-17 08:42 am (UTC) - Expand

#### Re: Plan of action

From: (Anonymous) - Date: 2013-02-24 10:16 pm (UTC) - Expand

#### no subject

Date: 2012-11-15 07:14 am (UTC)
From: (Anonymous)
I'd wager it'd be more likely they wanted to check off a box and say RHEL was supported in the most obtuse, shortsighted way possible rather than a 'bug fix'.

#### Legacy boot not a solution

Date: 2012-11-15 10:56 am (UTC)
From: (Anonymous)
Many of us have UEFI machines with no legacy boot option at all. So the legacy boot workaround is not a solution. Fortunately, my Dell Alienware X51 added Fedora 17 to the boot menu fine. I got nowhere trying to test F18 however.

#### OMG

Date: 2012-11-15 11:28 am (UTC)
From: (Anonymous)
So the webdev that have been thrown out for breaking website with buggy and stupid useragent checks, are now doing UEFI dev, fan-ta-stic, the world is going to be beautiful… not.

#### Re: OMG

Date: 2012-11-15 03:13 pm (UTC)
From: (Anonymous)
this explains why parts of UEFI are implemented in php nowdays...

#### Re: OMG

From: (Anonymous) - Date: 2012-11-16 02:01 am (UTC) - Expand

#### Don't wait for Lenovo to fix this

Date: 2012-11-15 01:14 pm (UTC)
From: (Anonymous)
I wouldn't hold my breath waiting for Lenovo to fix this - I have a Thinkpad W520 which has a similar problem - I have to use legacy boot for it to work.

This problem has been discussed for at least the last year and several BIOS revisions haven't helped.

#### Re: Don't wait for Lenovo to fix this

Date: 2012-11-16 07:54 pm (UTC)
From:
That's strange...my W520 doesn't have that problem (although it has a plethora of others). It couldn't care less about what I call the UEFI entries, be it "Fedora 18", "Windows Boot Manager", or "My Computer Always Breaks".

Could you post a link to the relevant websites/forums on the issue? Maybe I can help :)

#### Re: Don't wait for Lenovo to fix this

From: (Anonymous) - Date: 2013-02-01 11:42 pm (UTC) - Expand

#### Here we go

Date: 2012-11-15 01:19 pm (UTC)
From: (Anonymous)
I understand your politeness in calling this a bug, like "oops, I hardcoded
the name >>Windows 8<< here and there in firmware, I wanted to ....".

#### Breach of MS guidelines?

Date: 2012-11-15 06:03 pm (UTC)
From: (Anonymous)
If this was a badged Win8 device, does this not breach MS's guidelines for the x86 platform allowing the suer to run any other OS?

I'm staggered that such behaviours is not a breach of the UEFI standard.

#### Re: Breach of MS guidelines?

From: (Anonymous) - Date: 2012-11-15 06:24 pm (UTC) - Expand

#### Re: Breach of MS guidelines?

From: (Anonymous) - Date: 2012-11-16 11:07 am (UTC) - Expand

#### Re: Breach of MS guidelines?

From: (Anonymous) - Date: 2012-11-16 03:46 pm (UTC) - Expand

#### Re: Breach of MS guidelines?

From: (Anonymous) - Date: 2012-11-26 10:23 pm (UTC) - Expand

#### Error

Date: 2012-11-15 08:17 pm (UTC)
From: (Anonymous)

Thx!

#### database of badly behaving systems

Date: 2012-11-15 10:38 pm (UTC)
From: (Anonymous)
Do we plan on maintaining a database listing badly behaving systems like that one, so we can choose not to buy such a system?

#### Simple solution

Date: 2012-11-15 11:06 pm (UTC)
From: (Anonymous)
Why not just rename the Fedora entry to "Red Hat Enterprise Linux"?

Not sure why they added that boneheaded check though, is there perhaps a support contract that only supports Windows and RHEL?

#### Re: Simple solution

Date: 2012-11-16 01:04 am (UTC)
From: (Anonymous)
What a dumb, short‐term, near‐sighted solution.

#### Lenovo's not the only one

Date: 2012-11-16 02:57 am (UTC)
From: (Anonymous)
I encountered the same problem with an MSI A55M-P35 motherboard I purchased last year. Except AFAIK there was no exception for RHEL, it was "Windows Boot Manager" or bust. Thankfully the latest firmware fixes the bug.

#### no subject

Date: 2012-11-16 07:08 am (UTC)
From: (Anonymous)
Might this be a case of trying to enable certain quirks for Windows 8 without testing what happens for other EFI bootloaders?

#### Languages

Date: 2012-11-16 07:57 am (UTC)
From: (Anonymous)
Does Windows always use that same string no matter which language version you install? ie does a German user and a Chinese user also always have the text "Windows Boot Manager"? Presumably when only Windows is installed it is rare to see the string.

#### Re: Languages

From: - Date: 2012-11-16 08:03 pm (UTC) - Expand

#### Re: Languages

From: (Anonymous) - Date: 2013-08-29 10:43 am (UTC) - Expand

#### Confused

Date: 2012-11-16 08:07 am (UTC)
From: (Anonymous)
I just bought a lenovo k410 desktop. It looks like I have ami aptivo ufei. I was about to install arch linux. I am confused by what is said above. Is it possible for me to 'identify' the os as rhel and boot arch instead? If so can somebody provide more explicit instructions?

this stinks!

#### Re: Confused

Date: 2012-11-16 08:05 pm (UTC)
From:
Absolutely :) Just run: sudo modprobe efivars sudo efibootmgr --create --loader '\path\to\arch's\bootloader.efi' --label "Red Hat Enterprise Linux" and that's it :) Just press F12 when booting and choose the appropriate entry.

#### BIOS "fix"

Date: 2012-11-16 09:27 am (UTC)
From: (Anonymous)
BIOS programmers are used to this sort of "workarounds". This is a part of a DSDT table from my Dell Vostro 1310 :

http://pastebin.com/LkFMYP3J

#### Re: Lenovo W530

From: (Anonymous) - Date: 2013-05-24 05:31 pm (UTC) - Expand

#### Re: Lenovo W530

From: (Anonymous) - Date: 2013-05-26 11:13 am (UTC) - Expand
Page 1 of 2 << [1] [2] >>

Matthew Garrett