Magic SysRq key on Linux
Alt+SysRq+Key or Ctrl+Alt+SysRq+Key or AltGr+SysRq+Key
r (unRaw) – take control of keyboard back from X
k (Kill) – kill all processes on the current virtual console (like X, svga programs)
e (tErminate) – send SIGTERM to all processes, allowing them to terminate gracefully
i (kIll) – send SIGKILL to all processes, forcing them to terminate immediately
s (Sync) – flush data to disk
u (Unmount) - remount all filesystems read-only
b (reBoot) – Immediately reboot the system, without unmounting or syncing filesystems
o (shut Off) – turn off the system
Give control to the X server after Alt+SysRq+R:
$ sudo kbd_mode -s -C /dev/tty7
Restore text mode and make the console readable:
$ textmode
$ reset
How to show the Grub menu
Hold down the Shift key as the computer attempts to boot to display the GRUB 2 menu. In certain circumstances, if holding the Shift key method does not display the menu pressing the Esc key repeatedly may display the menu.
If that doesn't work, then using Boot Repair to reinstall and fix Grub. To restore the Grub bootloader, follow these steps. Open a terminal, and run the following commands:
$ sudo add-apt-repository ppa:yannubuntu/boot-repair
$ sudo apt-get update
$ sudo apt-get install -y boot-repair
$ boot-repair
After a few seconds, Boot Repair's main window will open. Click on Recommended repair.
Frequently used keys to enter the BIOS or CMOS setup
F1, F2, Del, Esc, F10 (if F10 opens a boot menu, your setup key is likely F2)
Frequently used keys to enter the boot menu
F10, F12, Esc