ctrl-x does not work in grub-efi

Bug #722950 reported by Phillip Susi
48
This bug affects 10 people
Affects Status Importance Assigned to Milestone
grub2 (Ubuntu)
Fix Released
Medium
Unassigned
Xenial
Fix Released
Undecided
dann frazier
Zesty
Won't Fix
Undecided
Unassigned
Artful
Fix Released
Undecided
Unassigned
grub2-signed (Ubuntu)
New
Undecided
Unassigned
Xenial
Fix Released
Undecided
Unassigned
Zesty
Won't Fix
Undecided
Unassigned
Artful
Fix Released
Undecided
Unassigned

Bug Description

[Impact]
On some UEFI platforms, useful key combinations fail to work over the serial console. In particular, ^x/F10 - one of which is needed to boot after interactively editing the boot menu. This leaves end users without a sane way to tweak command line arguments, and potentially other system recovery tasks.

[Test Case]
Boot such a UEFI system to the GRUB menu. Press 'e' to edit the commandline, then attempt to continue the boot using "^x".

[Regression Risk]
The proposed fix is a cherry-pick from upstream that we've been shipping in Ubuntu since 17.10 w/o any any known regressions. However, it is possible that such regressions exist - e.g. if a platform's firmware has a buggy implementation fo the EFI_SIMPLE_TEXT_INPUT_EX protocol.

Revision history for this message
Janosch Maier (phylu) wrote :

Similar problem on Ubuntu 10.04 Server version.

Revision history for this message
Igor Mitrenko (igor-mitrenko) wrote :

Ctrl+x doesn't work in grub2 version, shipped with Ubuntu 11.04. As well as other ctrl+<...> hotkey doesn't work.

It won't insert "x" and other symbols like ctrl is not pressed, it just does nothing. Whereas alternative hot keys like F10 and others work well.

Phillip Susi (psusi)
Changed in grub2 (Ubuntu):
importance: Undecided → Medium
status: New → Triaged
Revision history for this message
Janne Snabb (snabb) wrote :

I am affected by this issue on Ubuntu 15.04 x86_64. I have AMI BIOS/UEFI. Ctrl-X does not work (but F10 works). In my case 'x' is inserted as if I did not press Ctrl key.

I found a discussion and a potential patch at: https://lists.gnu.org/archive/html/grub-devel/2013-08/msg00003.html

Possibly related question at StackExchange: https://unix.stackexchange.com/questions/103989/pressing-ctrl-x-or-f10-does-not-boot-linux

Revision history for this message
Dan Mick (dmick-m) wrote :

This is fixed in the upstream by commit 9e5f70174ec960a0077f20bb74cb9f4da9b57e7b (and a warning removed by 5fcde03bf1e8cf74c186bcef6d705734f2d002c5). Grub also just recently tagged grub-2.02-beta3 with many more fixes. I think this one is major enough that, if the risk of a full transition to beta3 is considered high until more testing is done, then the above two commits should be pulled in as a patch.

This is a complete disabler for those trying to boot EFI over serial-redirected console, as it's likely F10 doesn't work, and neither does ^X.

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

Status changed to 'Confirmed' because the bug affects multiple users.

Changed in grub2 (Ubuntu Artful):
status: New → Confirmed
Changed in grub2 (Ubuntu Xenial):
status: New → Confirmed
Changed in grub2 (Ubuntu Zesty):
status: New → Confirmed
dann frazier (dannf)
Changed in grub2 (Ubuntu Artful):
status: Confirmed → Fix Released
dann frazier (dannf)
Changed in grub2 (Ubuntu):
status: Triaged → Fix Released
Changed in grub2 (Ubuntu Xenial):
status: Confirmed → In Progress
assignee: nobody → dann frazier (dannf)
Changed in grub2 (Ubuntu Zesty):
status: Confirmed → Won't Fix
dann frazier (dannf)
description: updated
Revision history for this message
Łukasz Zemczak (sil2100) wrote : Please test proposed package

Hello Phillip, 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-36ubuntu3.16 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 on 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-xenial to verification-done-xenial. If it does not fix the bug for you, please add a comment stating that, and change the tag to verification-failed-xenial. In either case, without details of your testing we will not be able to proceed.

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

Changed in grub2 (Ubuntu Xenial):
status: In Progress → Fix Committed
tags: added: verification-needed verification-needed-xenial
Changed in grub2-signed (Ubuntu Artful):
status: New → Fix Released
Changed in grub2-signed (Ubuntu Zesty):
status: New → Won't Fix
Changed in grub2-signed (Ubuntu Xenial):
status: New → Fix Committed
Revision history for this message
Łukasz Zemczak (sil2100) wrote :

Hello Phillip, or anyone else affected,

Accepted grub2-signed into xenial-proposed. The package will build now and be available at https://launchpad.net/ubuntu/+source/grub2-signed/1.66.16 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 on 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-xenial to verification-done-xenial. If it does not fix the bug for you, please add a comment stating that, and change the tag to verification-failed-xenial. In either case, without details of your testing we will not be able to proceed.

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

Revision history for this message
dann frazier (dannf) wrote :

Tested on a Cavium Sabre system - was able to enter the menu (e) and boot manually (^x).

tags: added: verification-done verification-done-xenial
removed: verification-needed verification-needed-xenial
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package grub2 - 2.02~beta2-36ubuntu3.16

---------------
grub2 (2.02~beta2-36ubuntu3.16) xenial; urgency=medium

  [ dann frazier ]
  * Use EFI_SIMPLE_TEXT_INPUT_EX to support key combinations.
    (LP: #722950)

  [ Mathieu Trudel-Lapierre ]
  * util/grub-install.c: Use MokManager EFI binary name without
    the .signed extension now that shim handles signing via sbsigntool
    natively. (LP: #1708245)
    - debian/patches/install_signed.patch
  * debian/control: Breaks shim << 13 due to the renamed MokManager binary.

 -- dann frazier <email address hidden> Wed, 10 Jan 2018 17:04:34 -0700

Changed in grub2 (Ubuntu Xenial):
status: Fix Committed → Fix Released
Revision history for this message
Łukasz Zemczak (sil2100) 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.66.16

---------------
grub2-signed (1.66.16) xenial; urgency=medium

  * Rebuild against grub2 2.02~beta2-36ubuntu3.16. (LP: #722950, #1708245)

 -- dann frazier <email address hidden> Thu, 11 Jan 2018 10:04:44 -0700

Changed in grub2-signed (Ubuntu Xenial):
status: Fix Committed → Fix Released
Revision history for this message
Aapo Rantalainen (aapo-rantalainen) wrote :

Ctrl+x not working in grub editing mode with ubuntu-18.04(-alpha).
grub2-common:
  Installed: 2.02-2ubuntu7

grub-efi-amd64-signed:
  Installed: 1.92+2.02-2ubuntu7

Might relate platform, device is: MacBookPro14,3

These works:
Ctrl+a = home
Ctrl+e = end
Ctrl+c = command line

(At least) These are not working with ctrl: o,n,p,i,u,f,b,h,k,l

I try patch to ctrl+a starting boot.

--- grub2-2.02.orig/grub-core/normal/menu_entry.c
+++ grub2-2.02/grub-core/normal/menu_entry.c
@@ -1346,6 +1347,8 @@ grub_menu_entry_run (grub_menu_entry_t e

  case GRUB_TERM_CTRL | 'a':
  case GRUB_TERM_KEY_HOME:
- if (! beginning_of_line (screen, 1))
- goto fail;
- break;
+ run (screen);
+ goto refresh;

But still ctrl+a acts like home.

Also in grub-menu (grub-core/normal/menu.c) only ctrl+a, ctrl+e and ctrl+c are working.
Ctrl+p and ctrl+n (up/down) are not working.

Revision history for this message
Aapo Rantalainen (aapo-rantalainen) wrote :

Ctrl+x not working in grub editing mode with ubuntu-18.04(-alpha).
grub2-common:
  Installed: 2.02-2ubuntu7

grub-efi-amd64-signed:
  Installed: 1.92+2.02-2ubuntu7

Might relate platform, device is: MacBookPro14,3

These works:
Ctrl+a = home
Ctrl+e = end
Ctrl+c = command line

(At least) These are not working with ctrl: o,n,p,i,u,f,b,h,k,l

I try patch to ctrl+a to start boot.

--- grub2-2.02.orig/grub-core/normal/menu_entry.c
+++ grub2-2.02/grub-core/normal/menu_entry.c
@@ -1346,6 +1347,8 @@ grub_menu_entry_run (grub_menu_entry_t e

  case GRUB_TERM_CTRL | 'a':
  case GRUB_TERM_KEY_HOME:
- if (! beginning_of_line (screen, 1))
- goto fail;
- break;
+ run (screen);
+ goto refresh;

But still ctrl+a acts like home-key.

Also in grub-menu (grub-core/normal/menu.c) only ctrl+a, ctrl+e and ctrl+c are working.
Ctrl+p and ctrl+n (up/down) are not working.

Revision history for this message
dann frazier (dannf) wrote :

@Aapo - has this ever worked for you - e.g. in a previous Ubuntu release? If not, I'd suggest filing a new issue. This bug has been verified to fix an issue for some users, and maybe unrelated to what you are seeing.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

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