Skip to content

Instantly share code, notes, and snippets.

Revisions

  1. @alexpais alexpais created this gist Jun 18, 2019.
    22 changes: 22 additions & 0 deletions force linux reboot when "Input output error"
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,22 @@
    $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/
    #