[Bug 1240366] Re: Use the same key to interrupt autoboot under legacy and EFI

Yang Bai hamo at canonical.com
Wed Nov 20 03:03:12 UTC 2013


@Steve,

What we want is getting rid of "keystatus --shift" testing and using
only "sleep --interruptible" so on both legacy and UEFI platforms, we
can use "ESC" to interrupt auto boot.

I have tested your solution, it really works. Thanks VERY MUCH. On both
platforms, there will be only sleep testing now. I will try to fix this
issue based on your idea. Thanks again.

-- 
You received this bug notification because you are a member of Ubuntu
Foundations Bugs, which is subscribed to grub2 in Ubuntu.
https://bugs.launchpad.net/bugs/1240366

Title:
  Use the same key to interrupt autoboot under legacy and EFI

Status in GRand Unified Bootloader:
  New
Status in OEM Priority Project:
  New
Status in OEM Priority Project precise series:
  New
Status in “grub2” package in Ubuntu:
  New

Bug description:
  We have one change in ubuntu_quick_boot.patch, as:

  +if [ "x\${timeout}" != "x-1" ]; then
  +  if keystatus; then
  +    if keystatus --shift; then
  +      set timeout=-1
  +    else
  +      set timeout=0
  +    fi
  +  else
  +    if sleep$verbose --interruptible 3 ; then
  +      set timeout=0
  +    fi
  +  fi
  +fi

  This will first try keystatus command then try sleep.

  On Legacy system, keystatus is  implemented, so it will just detect the status of shift key.
  Keystatus is using to detect the status of modify keys.  This command is implemented by every term's getkeystatus function. On legacy system, getkeystatus function is implemented by bios_data_area.

  On EFI system, keystatus is not implemented, so it will fallback to sleep command.
  On EFI system, getkeystatus is not defined. Even we have a patch called ubuntu_sleep_shift, allow shift key to interrupt sleep. But EFI SIMPLE TEXT INPUT PROTOCOL (http://wiki.phoenix.com/wiki/index.php/EFI_SIMPLE_TEXT_INPUT_PROTOCOL) does not provide a way to test the mod key status. 

  So this will cause different ways to interrupt autoboot on different
  systems. shift key on legacy and ESC key on EFI.

  Easy way to fix this issue is removing the keystatus branch. But this
  will cause a 3-second addition to boot time.

To manage notifications about this bug go to:
https://bugs.launchpad.net/grub/+bug/1240366/+subscriptions



More information about the foundations-bugs mailing list