5
1
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, asshutdown
is a program that would have to be loaded from disk, the error shown in the terminal wasbash: /sbin/shutdown: Input/output error
init 6
same as abovetelinit q
same as abovekill -2 1
This did not print an error, but did not work either. (However, it is possible that the Sarge init did not implementSIGINT
, 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.
Alt + SysRq + B -- This is basically the last ditch effort to force a reboot of a hung system. – jmreicha – 2012-10-17T14:39:09.250
'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 – 2012-10-17T14:40:24.960
@jmreicha - that won't work over SSH, that'd reboot your local machine! – PhonicUK – 2012-10-17T14:40:46.223
Yes you're right, heh, I should have mentioned you have to have local access to do this. – jmreicha – 2012-10-17T14:42:41.460
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. >.> – Darth Android – 2012-10-17T14:43:05.113
1
Found this, it is basically the keyboard combo through command prompt. http://rackerhacker.com/2009/01/29/linux-emergency-reboot-or-shutdown-with-magic-commands/.
– jmreicha – 2012-10-17T14:47:42.360@jmreicha This seems to be the same as the guide on PCFreak.net, for which I had to enable the kernel
sysrq
capabilities withsysctl
... which sadly is a program and not a builtin. Though I have to admit now, that I did not really check whethersysrq
was already enabled – dualed – 2012-10-17T15:49:12.313possible duplicate of Remotely turning on or rebooting a frozen computer
– Ƭᴇcʜιᴇ007 – 2013-12-18T17:20:32.227@techie007 I totally forgot about this question, sorry; No I don't think that is a duplicate, though it is similar. The question was about what you can do after things messed up, not before. However I found that in current Debian versions
init
is always in memory and thusinit 6
would work. Not sure if it's possible forinit
to be paged now – dualed – 2013-12-19T16:03:30.043