I Need To Make A Change With My IT Support! Call (225) 706-8414

Hard Reboot a Linux Server Remotely

You need to reboot a Linux server, but the ‘reboot’ and ‘shutdown’ commands aren’t working, perhaps because of pending disk writes, etc.

Solution

There is a rather ingenious solution for this. Cause a kernel panic in a way that forces a reboot. This should only be done if everything else fails and you simply can’t get the server to reboot.

  1. Log into the box as root
  2. Run the following commands:
    # echo 1 > /proc/sys/kernel/panic
    # cat /dev/zero > /dev/mem
  3. This will cause an immediate reboot.

What did we do here? We told Linux to reboot rather than halt on a kernel panic via panic sysctrl and then we blew away memory which the kernel detects and causes a kernel panic. And there you go!

 

Concerned About Cyber Attacks?

CLICK HERE >

Want to Migrate to the Cloud?

CLICK HERE >
Office 365

Ready to Experience Microsoft Office 365?

Want the latest IT news directly in your inbox? Subscribe now!