[Bug 1240366] Re: Use the same key to interrupt autoboot under legacy and EFI
Steve Langasek
steve.langasek at canonical.com
Tue Nov 19 23:05:18 UTC 2013
There's a lot here that's already configurable, though I don't think
it's very well documented. If an OEM wants to consistently wait for 1
second before booting, I believe it's sufficient to set
GRUB_HIDDEN_TIMEOUT=1 in /etc/default/grub (or perhaps in a custom
/etc/grub.d/00_before_header script). After running 'update-grub', this
should give you /boot/grub/grub.cfg with a 1 second timeout everywhere:
if [ "x${timeout}" != "x-1" ]; then
if sleep --interruptible 1 ; then
set timeout=0
fi
fi
Maybe this meets your requirements, without changes to the grub2
package?
--
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