Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save mspalex/262144bde795d88de2b4d2d16b9ab143 to your computer and use it in GitHub Desktop.
Save mspalex/262144bde795d88de2b4d2d16b9ab143 to your computer and use it in GitHub Desktop.
$reboot
bash: /sbin/reboot: Input/output error
$shutdown -r now
bash: /sbin/shutdown: Input/output error
#
# if the above reboot commands doesn't work try either forced reboot or shutdown
#
# force reboot
$echo 1 > /proc/sys/kernel/sysrq
$echo b > /proc/sysrq-trigger
# force shutdown
$echo 1 > /proc/sys/kernel/sysrq
$echo o > /proc/sysrq-trigger
#
# this basically does the same as REISUB (just the reboot part, the B), it reboots immediatelly
# got from here: https://linoxide.com/how-tos/inputoutput-error-bad-blocks-how-to-restart-linux/
#
@UnconventionalMindset
Copy link

This is awesome. Saved my day.

@davebdb
Copy link

davebdb commented Jan 16, 2024

I agree with UnconventionalMindset. Saved myself and/or the actual sysadmin of one of our servers a trip to the datacenter (each of us its about an hour drive and its -10F outside [-23.3C] right now).

@jaimehrubiks
Copy link

Awesome. This saved me from waking up and going to the living room to press the restart button, but still was a great learning!

@devrique
Copy link

This is great, it will help me while I figure out why Arch has some weird I/O errors that force me to shutdown with the server button. Thanks a lot!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment