54 lines
1.8 KiB
Text
54 lines
1.8 KiB
Text
10 Using GRUB with vendor power-on keys
|
|
***************************************
|
|
|
|
Some laptop vendors provide an additional power-on button which boots
|
|
another OS. GRUB supports such buttons with the 'GRUB_TIMEOUT_BUTTON',
|
|
'GRUB_TIMEOUT_STYLE_BUTTON', 'GRUB_DEFAULT_BUTTON', and
|
|
'GRUB_BUTTON_CMOS_ADDRESS' variables in default/grub (*note Simple
|
|
configuration::). 'GRUB_TIMEOUT_BUTTON', 'GRUB_TIMEOUT_STYLE_BUTTON',
|
|
and 'GRUB_DEFAULT_BUTTON' are used instead of the corresponding
|
|
variables without the '_BUTTON' suffix when powered on using the special
|
|
button. 'GRUB_BUTTON_CMOS_ADDRESS' is vendor-specific and partially
|
|
model-specific. Values known to the GRUB team are:
|
|
|
|
<Dell XPS M1330M>
|
|
121:3
|
|
<Dell XPS M1530>
|
|
85:3
|
|
<Dell Latitude E4300>
|
|
85:3
|
|
<Asus EeePC 1005PE>
|
|
84:1 (unconfirmed)
|
|
<LENOVO ThinkPad T410s (2912W1C)>
|
|
101:3
|
|
|
|
To take full advantage of this function, install GRUB into the MBR
|
|
(*note Installing GRUB using grub-install::).
|
|
|
|
If you have a laptop which has a similar feature and not in the above
|
|
list could you figure your address and contribute? To discover the
|
|
address do the following:
|
|
* boot normally
|
|
* sudo modprobe nvram
|
|
sudo cat /dev/nvram | xxd > normal_button.txt
|
|
* boot using vendor button
|
|
* sudo modprobe nvram
|
|
sudo cat /dev/nvram | xxd > normal_vendor.txt
|
|
|
|
Then compare these text files and find where a bit was toggled. E.g.
|
|
in case of Dell XPS it was:
|
|
byte 0x47: 20 --> 28
|
|
It's a bit number 3 as seen from following table:
|
|
0 01
|
|
1 02
|
|
2 04
|
|
3 08
|
|
4 10
|
|
5 20
|
|
6 40
|
|
7 80
|
|
|
|
0x47 is decimal 71. Linux nvram implementation cuts first 14 bytes
|
|
of CMOS. So the real byte address in CMOS is 71+14=85 So complete
|
|
address is 85:3
|
|
|