2

I created a bootable USB with Ubuntu 20.04 on it and I wanted to test it on a working Ubuntu 20.04 Laptop whether it works. This was apparently not a good idea, because I get dozens of SQUASHFS-errors and I cannot do anything at the moment (I pressed the on-off-button several times, but the laptop still won't turn off). I am pretty sure by now (since I already removed the flash drive and checked it on another computer) that the flash drive is corrupted.

This is not a huge problem, what does annoy me is that I cannot use my laptop. I cannot take the battery from the notebook (it isn't removable), so what can I do (it probably still has around 5 - 10 hours battery life-time, and I wouldn't mind having my laptop soon)?

5
  • The best way to force shutdown in my opinion is via keyboard commands directly to the kernel (ie. SysRq keys)
    – guiverc
    Jul 12, 2020 at 11:15
  • @guiverc I am afraid that giving keyboard commands directly to the kernel is not possible (nothing happens when I type "SysRq", for instance). Jul 12, 2020 at 11:25
  • Alt-SysRq followed by letters (SysRq is a key on the keyboard (also usually same key as PrintScreen; SysRq with Alt usually, some laptops require a Fn key combination). To reboot it's Alt+SysRq (holding down Alt) then followed by REISUB - ie en.wikipedia.org/wiki/Magic_SysRq_key or other resource)
    – guiverc
    Jul 12, 2020 at 11:32
  • @guiverc Thanks! It was Alt + SysRq + b for me that changed the state of the kernel!! If you write your comment as an answer, I will immediately accept it. :-) Jul 12, 2020 at 11:35

1 Answer 1

2

To tell the kernel to reboot you can use

ALT+SysRq REISUB continue holding down ALT key as you type all letters

From Wikipedia the REISUB the the kernel

unRaw (take control of keyboard back from X),
tErminate (send SIGTERM to all processes, allowing them to terminate gracefully),
kIll (send SIGKILL to all processes except init, forcing them to terminate immediately),
Sync (flush data to disk),
Unmount (remount all filesystems read-only),
reBoot.

To shutdown the machine instead of reboot, you can replace the B with a "O". All keystrokes are worth it to ensure a clean system (sync or flush buffers to disk & umount protecting data on your system prior to reboot or power-off. SysRq keys are far safer than trying to use the power-off or pulling a power cable on a box as the kernel can cleanly shutdown the system (or obey other commands, refer wikipedia page for clues)

PS: I'd not recommend the Alt-SysRq + B as it won't leave a clean file system; REISUB is safer.

2
  • 1
    Okay, then there is sth I must ask: What is "REISUB"? Is it really the key-combination of "R" + "E" etc.? Jul 12, 2020 at 11:58
  • 1
    REISUB are the keys you press whilst still holding down the ALT key, after hitting SysRq. R kills X, E asks all processes to die gracefully etc (see question or wikipedia link I like) The S & U are what I consider essential, but prior keys help S & U to work (ie processes are killed allowing sync & umount) You don't hit all keys at the same time, one after the other whilst holding down ALT. ps: the wikipedia article has some ways to and help you remember REISUB (like every good boy deserves fruit is taught learning to play piano/organ etc)
    – guiverc
    Jul 12, 2020 at 12:04

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .