Posted: . At: 1:16 PM. This was 9 years ago. Post ID: 8120
Page permalink. WordPress uses cookies, or tiny pieces of information stored on your computer, to verify who you are. There are cookies for logged in users and for commenters.
These cookies expire two weeks after they are set.

How to force a re-boot or shutdown if the traditional commands will not work.

If your machine has errors with the hard disk and your machine has booted with a read-only filesystem, these commands can force your machine to either shutdown or reboot.

Forced re-boot.

echo 1 > /proc/sys/kernel/sysrq
echo b > /proc/sysrq-trigger

Forced shutdown.

echo 1 > /proc/sys/kernel/sysrq
echo o > /proc/sysrq-trigger

Execute these commands at a root prompt and they will work instantly. Communicating directly with the kernel this way allows you to shutdown gracefully even if traditional commands will not work at all.

This is where I got these commands from: http://linoxide.com/how-tos/inputoutput-error-bad-blocks-how-to-restart-linux/.

Leave a Comment

This site uses Akismet to reduce spam. Learn how your comment data is processed.