6

I had a remote server running Debian Sarge that experienced some HDD failure and I meant to reboot it hoping that fsck could repair the errors automatically. I eventually drove out there and replaced the faulty disks...

But I was wondering: What other ways are there to force a Linux system to reboot that do not require hard drive access?

What I had tried:

  • shutdown -r now Did not work, as shutdown is a program that would have to be loaded from disk, the error shown in the terminal was bash: /sbin/shutdown: Input/output error
  • init 6 same as above
  • telinit q same as above
  • kill -2 1 This did not print an error, but did not work either. (However, it is possible that the Sarge init did not implement SIGINT, the sarge manpages did not mention it. So it could work in a more recent version of Debian)
  • This guide on PCFreak.net. However, this failed at sysctl, which was not in memory either.
9
  • Alt + SysRq + B -- This is basically the last ditch effort to force a reboot of a hung system.
    – jmreicha
    Oct 17, 2012 at 14:39
  • 'Rebooting without accessing the HDD' - wow, weird one. Every time I think of a solution I end up hitting the HDD. The only real 'give' you've got is if there are any ramdisks to play with.
    – PhonicUK
    Oct 17, 2012 at 14:40
  • @jmreicha - that won't work over SSH, that'd reboot your local machine!
    – PhonicUK
    Oct 17, 2012 at 14:40
  • 3
    @PhonicUK If you're working with a remote system, I hope you've got a KVM available, and from there you could remotely press those keys :) Which, that's how you remotely reboot a system that has a misconfigured network stack. Let's not go into details why I know this. >.> Oct 17, 2012 at 14:43
  • 1
    Found this, it is basically the keyboard combo through command prompt. rackerhacker.com/2009/01/29/….
    – jmreicha
    Oct 17, 2012 at 14:47

2 Answers 2

3

You mention it is a remote server...Which means it is a prime candidate for a ILO, DRAC etc.

Check the documentation to see if such a card is installed.

If it is you can connect to the OS on that card and remotely take over the keyboard, screen and powerswitch etc without even touching the main OS. Thus you can do a hard reboot, and keep (remotely) watching the screen as your server runs though BIOS, boot and fsck.

If it is not installed and it is a significant distant to drive to it I really recommend adding such a card or installing some other remote KVM connection.

1

I guess there is no solutions for rebooting without having a harddisc connected or the necessary software loaded on ramdisk. If it's a virtual machine, reboot it on the hypervisor. Otherwise I hope you have a PDU / IPMI or similar.

1
  • 1
    The question is about ways to remotely reboot a Linux system, not to resolve a (already resolved) situation.
    – dualed
    Oct 17, 2012 at 15:58

You must log in to answer this question.

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