Bug 731529

Summary: grub making uefi calls without aligning stack pointer
Product: [Fedora] Fedora Reporter: Adam Williamson <awilliam>
Component: grubAssignee: Peter Jones <pjones>
Status: CLOSED ERRATA QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: high Docs Contact:
Priority: unspecified    
Version: 16CC: jonathan, lkundrak, madhu.chinakonda, mads, mishu, pjones, tflink
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard: AcceptedBlocker
Fixed In Version: grub-0.97-79.fc16 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2011-10-03 17:57:53 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On:    
Bug Blocks: 713564    

Description Adam Williamson 2011-08-17 19:29:46 UTC
It appears that grub is making calls to the UEFI firmware when the stack pointer is not aligned to a 16-byte boundary (which is required by UEFI). This results in the system failing to boot if its firmware can't handle such calls.

Comment 1 Adam Williamson 2011-08-17 19:30:55 UTC
Proposing as a beta blocker under the criterion "The installer must boot and run on systems using EFI other than Apple Macs ". This is a showstopper for quite a lot of EFI systems.

Comment 2 Tim Flink 2011-09-01 17:37:47 UTC
Discussed in the 2011-08-26 blocker review meeting. Accepted as a Fedora 16 beta blocker as it violates the following beta release criterion [1]:

The installer must boot and run on systems using EFI other than Apple Macs

[1] https://fedoraproject.org/wiki/Fedora_16_Beta_Release_Criteria

Comment 3 Fedora Update System 2011-09-01 20:08:52 UTC
grub-0.97-77.fc16 has been submitted as an update for Fedora 16.
https://admin.fedoraproject.org/updates/grub-0.97-77.fc16

Comment 4 Fedora Update System 2011-09-06 18:09:54 UTC
Package grub-0.97-77.fc16:
* should fix your issue,
* was pushed to the Fedora 16 testing repository,
* should be available at your local mirror within two days.
Update it with:
# su -c 'yum update --enablerepo=updates-testing grub-0.97-77.fc16'
as soon as you are able to.
Please go to the following url:
https://admin.fedoraproject.org/updates/grub-0.97-77.fc16
then log in and leave karma (feedback).

Comment 5 Jurgen Kramer 2011-09-09 11:05:34 UTC
For me this has taken a turn for the worse.

Test with PreBeta TC2 DVD.

On regular PC, boots ok. When selecting an item from the grub menu it takes a long time to see something actually happening. It would appear the system hangs but after a long wait.

macmini 2011: legacy boot: works ok
macmini 2011: efi boot, no go, just hangs. Does not get to grub menu.
macbookair late 2010: legacy boot: works ok
macbookair late 2010: efi boot: long wait, double penguin logo (quiet removed from cmdline) ends up with garbled screen. Not usable

Comment 6 Mads Kiilerich 2011-09-09 12:16:40 UTC
(In reply to comment #5)
Can you tell the exact Mac versions? Such as "Macmini2,1", an identifier which can be found in dmesg or smolt or OS/X system info.

Exactly which image are you using? A 64-bit Fedora image? Which kernel and grub version?

> macmini 2011: legacy boot: works ok

> macmini 2011: efi boot, no go, just hangs. Does not get to grub menu.

FWIW a manually installed grub2-efi works for me on Macmini5,1

Did it work in previous Fedora versions? Can you try do downgrade grub and see if that helps?

> macbookair late 2010: legacy boot: works ok
> macbookair late 2010: efi boot: long wait, double penguin logo (quiet removed
> from cmdline) ends up with garbled screen. Not usable

Did it work in previous Fedora versions?

That does not look like a boot loader issue, so you should file a new kernel bug ... unless it already has been filed - it do look like Bug 650949. dmesg and smolt info from the legacy boot may be relevant.

Comment 7 Jurgen Kramer 2011-09-09 12:43:42 UTC
F16 EFI boot from x86_64 DVD prior to F16 Beta TC2 worked just fine. The upgraded grub seems to cause problems. I have a working F16 installation on my MacMini5,1 with a manual installed grub2-efi (BZ #730124).

My above results (comment #5) are, as mentioned, with the Fedora 16 Beta Test Compose 2 (TC2) x86_64 DVD.

wrt mba (MacBookAir3,1) garbled screen with EFI boot, that is indeed probably BZ #650949. Currently runs F15 x86_64 using legacy boot, graphics work just fine with nouveau. But that is another topic.

To recap my problems are with the current F16 Beta TC2 x86_64 DVD which uses the updated grub (grub-0.97-77.fc16).

Comment 8 Jurgen Kramer 2011-09-09 13:43:13 UTC
Another test with F16 Beta TC2 x86_64 DVD this time on a 2011 imac (iMac12,2).
Selecting EFI boot get me to the grub menu and anaconda starts to a black screen. Booting with nomodeset fails to start X but that's outside of grub.

So 3 types of macs, the newest (2011 macmini) now fails with EFI boot using the lastest grub legacy build. I will retest with the Beta TC1 DVD.

Comment 9 Mads Kiilerich 2011-09-09 14:23:34 UTC
I see almost the same with iMac11,2 and iMac11,3 with grub2-efi. The incorrect nomodeset X autodetection is bug 726159 - and WONTFIX. It is usable for me with nomodeset and xdriver=fbset . The KMS failure is bug 726143. I don't know how similar iMac12,2 is and if it has different issues.

Comment 10 Jurgen Kramer 2011-09-09 14:35:02 UTC
Retested with the F16 Beta TC1 x86_64 DVD which includes grub 0.97-75. I can conform that with this grub EFI boot still works on MacMini5,1 and grub 0.97-77 does not.

Comment 11 Adam Williamson 2011-09-15 04:59:54 UTC
pjones: have you had a look at the regressions here? they're not beta critical as we don't require Mac EFI to work, but obviously it would be best to fix them. should they be filed as a new report?

Comment 12 Jurgen Kramer 2011-09-15 17:09:57 UTC
Fixing Mac EFI would be really appreciated. 
Installing F16 in legacy mode on Macs with Lion is no longer an option. Lion already uses 3 partitions out of the 4 possible old style MBR ones. Fedora wants to create 3 additional ones which does not work with the MBR scheme. GPT is a must.

Comment 13 Peter Jones 2011-09-15 18:20:50 UTC
If what you're seeing is screen corruption, that is almost certainly not this bug, but rather the other changes to support some mac graphics better.  This is testable with -76, but should be addressed in a separate bug.

Comment 14 Jurgen Kramer 2011-09-15 18:34:45 UTC
pjones: I guess you replied to comment #9. For me the problem is not being able to do a EFI boot on the MacMini5,1. This worked with grub-0.97-75.

Comment 15 Adam Williamson 2011-09-15 19:08:13 UTC
jurgen: can you please file a new bug for your issue and link it here? thanks.

Comment 16 Jurgen Kramer 2011-09-16 07:45:49 UTC
OK, I've created BZ #738969 for the problem with EFI boot on MacMini5,1.

Comment 17 Adam Williamson 2011-09-16 18:05:13 UTC
setting VERIFIED, pjones affirms the initial bug is fixed.

Comment 18 Fedora Update System 2011-09-27 21:20:56 UTC
grub-0.97-78.fc16 has been submitted as an update for Fedora 16.
https://admin.fedoraproject.org/updates/grub-0.97-78.fc16

Comment 19 Fedora Update System 2011-09-28 18:54:08 UTC
Package grub-0.97-78.fc16:
* should fix your issue,
* was pushed to the Fedora 16 testing repository,
* should be available at your local mirror within two days.
Update it with:
# su -c 'yum update --enablerepo=updates-testing grub-0.97-78.fc16'
as soon as you are able to.
Please go to the following url:
https://admin.fedoraproject.org/updates/grub-0.97-78.fc16
then log in and leave karma (feedback).

Comment 20 Fedora Update System 2011-09-28 23:39:52 UTC
grub-0.97-79.fc16 has been submitted as an update for Fedora 16.
https://admin.fedoraproject.org/updates/grub-0.97-79.fc16

Comment 21 Tim Flink 2011-09-30 15:15:10 UTC
All of the EFI tests are pretty much working. Other issues would have likely surfaced by now; moving to VERIFIED.

Comment 22 Fedora Update System 2011-10-03 17:57:31 UTC
grub-0.97-79.fc16 has been pushed to the Fedora 16 stable repository.  If problems still persist, please make note of it in this bug report.