Restart/shutdown linux with magic (REISUB)

To restart your system, press alt + Printscreen/SysRq. Then, while holding those keys, slowly type the keys  R E I S U B (one key at a time, requires QUERTY keyboards). You can find a list of all SysRq keys here which includes key presses for other keyboard layouts.

To define the mode of SysRq you should edit the file: /etc/sysctl.d/10-magic-sysrq.conf . That file includes details of various levels of SysRq.

Here is an example of it’s contents:

# 0 - disable sysrq completely
# 1 - enable all functions of sysrq
# >1 - enable certain functions by adding up the following values:
# 2 - enable control of console logging level
# 4 - enable control of keyboard (SAK, unraw)
# 8 - enable debugging dumps of processes etc.
# 16 - enable sync command
# 32 - enable remount read-only
# 64 - enable signalling of processes (term, kill, oom-kill)
# 128 - allow reboot/poweroff
# 256 - allow nicing of all RT tasks

A recommended value is 64 because it permits you to use oom kill which is very useful.

Here is a short explanation for reboot (not all keys will work, as it depends on the value you have defined in  /etc/sysctl.d/10-magic-sysrq.conf file) :

  • R: Switch the keyboard from raw mode to XLATE mode
  • E: Send the SIGTERM signal to all processes except init
  • I: Send the SIGKILL signal to all processes except init
  • S: Sync all mounted filesystems
  • U: Remount all mounted filesystems in read-only mode
  • B: Immediately reboot the system, without unmounting partitions or syncing

Here is a short explanation for shutdown:

  • R: Switch the keyboard from raw mode to XLATE mode
  • E: Send the SIGTERM signal to all processes except init
  • I: Send the SIGKILL signal to all processes except init
  • S: Sync all mounted filesystems
  • U: Remount all mounted filesystems in read-only mode
  • O: Immediately shutdown the system, without unmounting partitions or syncing

Here is a cool mnemonic:

  • R – Reboot
  • E – Even
  • I – If
  • S – System
  • U – Utterly
  • B – Broken

References:

http://blog.kember.net/articles/reisub-the-gentle-linux-restart/

https://en.wikipedia.org/wiki/Magic_SysRq_key

 

Moodle links

Useful links:

  1. Best practices for quiz questions  🏅

Useful plugins:

  1.  Question types:
    1. All or nothing multiple choice question type
  2. Question behaviours:
    1. Deferred feedback – all or nothing
  3. Filters:
    1. Generico filter 🏅
      1. Generico Atto Icon 🏅
    2. Prettify 🏅
      1. Prettify moodle forum discussion (#1 #2) (direct link)
      2. Prettify themes gallery
  4. Atto editor:
    1. Generico toolbar Icon 🏅
    2. Toggle preview 🏅
    3. Full screen 🏅
    4. More font colors
    5. Cloze editor

Multiboot: BIOS+MBR vs UEFI + GTP

Acronyms:

  • BIOS: Basic Input Output System
  • UEFI: Unified Extensible Firmware Interface
  • MBR: Master boot record
  • GPT: Globally Unique Identifier Partition Table = GUID Partition Table

Multiboot configuration

The most effective combinations are either BIOS+MBR or UEFI+GPT. You could go around that, but it is not recommended at all.

The most compatible combination is

UEFI + GPT + Fast startup disabled + Secure boot disabled

Continue reading Multiboot: BIOS+MBR vs UEFI + GTP