Add support for running a 64-bit Linux kernel on a 32-bit EFI.

Bug #1591818 reported by Shih-Yuan Lee
28
This bug affects 3 people
Affects Status Importance Assigned to Milestone
OEM Priority Project
Fix Released
High
Unassigned
Trusty
Fix Released
Undecided
Unassigned
grub2 (Ubuntu)
Fix Released
High
Unassigned
Trusty
Fix Released
High
Unassigned
grub2-signed (Ubuntu)
Won't Fix
High
Unassigned
Trusty
Won't Fix
High
Unassigned

Bug Description

[Impact]

* Some platforms only have 32-bit EFI BIOS. When executing `grub-install` on them, it will make the system can not boot up again because of the wrong GRUB EFI payload and UEFI boot entry.

[Test Case]

* Executing `grub-install` on a 32-bit EFI platform should appear the following results.

$ sudo grub-install
Installing for i386-efi platform.
Installation finished. No error reported.

$ sudo efibootmgr -v
BootCurrent: 0000
Timeout: 0 seconds
BootOrder: 0000
Boot0000* ubuntu HD(1,GPT,b8d7d8e9-4ac4-46cc-8bd0-8d90d6df1df4,0x800,0x100000)/File(\EFI\ubuntu\grubia32.efi)

* Executing `grub-install` on a 64-bit EFI platform should appear the following results.

$ sudo grub-install
Installing for x86_64-efi platform.
Installation finished. No error reported.

$ sudo efibootmgr -v
BootCurrent: 0000
Timeout: 0 seconds
BootOrder: 0000
Boot0000* ubuntu HD(1,GPT,b8d7d8e9-4ac4-46cc-8bd0-8d90d6df1df4,0x800,0x100000)/File(\EFI\ubuntu\shimx64.efi) or \EFI\ubuntu\grubx64.efi if there is no grub-efi-amd64-signed installed.

[Regression Potential]

* This patch is directly backported from Ubuntu 16.04 so it should be OK without any regression.

[Other Info]

1) The release of Ubuntu you are using, via 'lsb_release -rd' or System -> About Ubuntu
Ubuntu 14.04

2) The version of the package you are using, via 'apt-cache policy pkgname' or by checking in Software Center
grub2 2.02~beta2-9ubuntu1.8

3) What you expected to happen
Executing `grub-install` will install platform files by i386-efi on 32-bit UEFI BIOS.

4) What happened instead
It installed platform files by x86_64-efi instead.

P.S. Ubuntu 16.04 doesn't have this issue.

Revision history for this message
Shih-Yuan Lee (fourdollars) wrote :

This patch is backported from Ubuntu 16.04.

description: updated
Jamie Chang (jamie315)
Changed in oem-priority:
importance: Undecided → High
description: updated
Steve Langasek (vorlon)
Changed in grub2 (Ubuntu):
status: New → Fix Released
Revision history for this message
Martin Pitt (pitti) wrote :

Please add a test case so that this can be verified. Particulary, please add some analysis about regression potential, as boot loader induced changes are highly sensitive to causing fatal regressions.

tags: added: verification-needed
Revision history for this message
Martin Pitt (pitti) wrote : Please test proposed package

Hello Shih-Yuan, or anyone else affected,

Accepted grub2 into xenial-proposed. The package will build now and be available at https://launchpad.net/ubuntu/+source/grub2/2.02~beta2-9ubuntu1.11 in a few hours, and then in the -proposed repository.

Please help us by testing this new package. See https://wiki.ubuntu.com/Testing/EnableProposed for documentation how to enable and use -proposed. Your feedback will aid us getting this update out to other Ubuntu users.

If this package fixes the bug for you, please add a comment to this bug, mentioning the version of the package you tested, and change the tag from verification-needed to verification-done. If it does not fix the bug for you, please add a comment stating that, and change the tag to verification-failed. In either case, details of your testing will help us make a better decision.

Further information regarding the verification process can be found at https://wiki.ubuntu.com/QATeam/PerformingSRUVerification . Thank you in advance!

Changed in grub2 (Ubuntu Trusty):
status: New → Triaged
Revision history for this message
Martin Pitt (pitti) wrote :

Sorry, the previous comment was meant to say "trusty", not "xenial".

Changed in grub2 (Ubuntu Trusty):
status: Triaged → Fix Committed
Mathew Hodson (mhodson)
Changed in grub2 (Ubuntu):
importance: Undecided → High
Changed in grub2 (Ubuntu Trusty):
importance: Undecided → High
description: updated
description: updated
tags: added: verification-done
removed: verification-needed
tags: added: verification-needed
removed: verification-done
Changed in grub2-signed (Ubuntu):
status: New → Fix Released
Revision history for this message
Adam Conrad (adconrad) wrote :

Hello Shih-Yuan, or anyone else affected,

Accepted grub2-signed into trusty-proposed. The package will build now and be available at https://launchpad.net/ubuntu/+source/grub2-signed/1.34.13 in a few hours, and then in the -proposed repository.

Please help us by testing this new package. See https://wiki.ubuntu.com/Testing/EnableProposed for documentation how to enable and use -proposed. Your feedback will aid us getting this update out to other Ubuntu users.

If this package fixes the bug for you, please add a comment to this bug, mentioning the version of the package you tested, and change the tag from verification-needed to verification-done. If it does not fix the bug for you, please add a comment stating that, and change the tag to verification-failed. In either case, details of your testing will help us make a better decision.

Further information regarding the verification process can be found at https://wiki.ubuntu.com/QATeam/PerformingSRUVerification . Thank you in advance!

Changed in grub2-signed (Ubuntu Trusty):
status: New → Fix Committed
tags: added: verification-done
removed: verification-needed
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package grub2 - 2.02~beta2-9ubuntu1.11

---------------
grub2 (2.02~beta2-9ubuntu1.11) trusty-proposed; urgency=medium

  * Add support for running a 64-bit Linux kernel on a 32-bit EFI.
    (LP: #1591818)

 -- Shih-Yuan Lee (FourDollars) <email address hidden> Wed, 08 Jun 2016 13:53:40 +0800

Changed in grub2 (Ubuntu Trusty):
status: Fix Committed → Fix Released
Revision history for this message
Martin Pitt (pitti) wrote : Update Released

The verification of the Stable Release Update for grub2 has completed successfully and the package has now been released to -updates. Subsequently, the Ubuntu Stable Release Updates Team is being unsubscribed and will not receive messages about this bug report. In the event that you encounter a regression using the package from -updates please report a new bug using ubuntu-bug and tag the bug report regression-update so we can easily find any regressions.

Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package grub2-signed - 1.34.13

---------------
grub2-signed (1.34.13) trusty; urgency=medium

  * Rebuild against grub-efi-amd64 2.02~beta2-9ubuntu1.11 (LP: #1591818)

 -- Martin Pitt <email address hidden> Mon, 04 Jul 2016 13:15:40 +0200

Changed in grub2-signed (Ubuntu Trusty):
status: Fix Committed → Fix Released
Mathew Hodson (mhodson)
Changed in grub2-signed (Ubuntu):
importance: Undecided → High
Changed in grub2-signed (Ubuntu Trusty):
importance: Undecided → High
Ara Pulido (ara)
Changed in oem-priority:
status: New → Fix Released
Revision history for this message
Phillip Susi (psusi) wrote :

This was not fixed in grub2-signed: it still does not produce a 32 bit signed package, only the amd64 one. This prevents the signed stub from being installed on a 32 bit EFI system, as in bug #1644915.

Changed in grub2-signed (Ubuntu):
status: Fix Released → Triaged
Changed in grub2-signed (Ubuntu Trusty):
status: Fix Released → Triaged
Revision history for this message
Ubuntu Foundations Team Bug Bot (crichton) wrote :

The attachment "grub2_2.02~beta2-9ubuntu1.9.debdiff" seems to be a debdiff. The ubuntu-sponsors team has been subscribed to the bug report so that they can review and hopefully sponsor the debdiff. If the attachment isn't a patch, please remove the "patch" flag from the attachment, remove the "patch" tag, and if you are member of the ~ubuntu-sponsors, unsubscribe the team.

[This is an automated message performed by a Launchpad user owned by ~brian-murray, for any issue please contact him.]

tags: added: patch
Revision history for this message
Phillip Susi (psusi) wrote :

A year and a half later and still there is no 32 bit signed grub.

Changed in grub2-signed (Ubuntu):
status: Triaged → Won't Fix
Changed in grub2-signed (Ubuntu Trusty):
status: Triaged → Won't Fix
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Duplicates of this bug

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.