When trying to reboot a Linux server I got the typical 'System going down for reboot now', but the server has not rebooted. I have tried:

reboot
shutdown -r now

The runlevel command returns 5. Any other options for getting this server to reboot? This is a remote machine, so I don't want to just shut it down if I can avoid that.

I am trying to reboot because of a journal abort on /, so / is read-only. Most commands now return 'bus error'

link|improve this question

78% accept rate
A bus error is typically a result of a corrupted binary. One place I worked people would complain that the system was broken because their long running simulation would crash with a bus error whenever they compiled another simulation. "What did you call the simulation?" "huh" "okay -- what do you type to run the simulation?" "a.out" "okay, maybe you should rename your programs before you run them..." sigh. – chris Aug 24 '09 at 13:29
Oh -- except for netscape. For that, bus error was one of two common ways it exited. It was about 2/1 segfault vs bus error, but they changed it up to keep the internet fun... – chris Aug 24 '09 at 13:30
feedback

6 Answers

up vote 7 down vote accepted

Kyle, I'm not quite sure if this is what you're looking for (since it's like pressing the reset button), but this has helped me in situations where a server refused to reboot:

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

The first line is for enabling SysRq, and the second one is for rebooting.

See emergency reboot or shutdown with magic commands for more details.

link|improve this answer
Nice to know! Thanks! – Bart Silverstrim Aug 24 '09 at 13:42
This seems pretty harsh -- the kind of thing you'd only do if you don't have console and physical access to the box. I'm not sure I'd expect a box that's so wedged that reboot doesn't work to come up again and be available remotely. Thank goodness for kvm switches and remote managed power strips. – chris Aug 24 '09 at 18:52
Chris, I completely agree with you, and I think that you offered a very good advice in your answer. But, after exhausting every possibility, and if you really have no other choice, as a last resort you can try using the sysrq-trigger. Obviously, being able to reboot gracefully in those cases would be nice, and having a KVM over IP device and managed power strips would be even nicer. – mfriedman Aug 24 '09 at 20:35
Well, in my case it came back up, did its fsck, and was back up and running. Guess I am lucky ^_^ – Kyle Brandt Aug 24 '09 at 21:58
feedback

What does the end of dmesg output?

From the description is sounds like you may have a serious hardware issue that will prevent you from being able to reboot, as the commends you've given should have done the job for you already.

Otherwise the only think I know of is issuing commands directly to init using telinit, but I thought that that was what shutdown and reboot both basically did anyway.

link|improve this answer
Flooded with rejecting I/O to offline device – Kyle Brandt Aug 24 '09 at 13:18
Ouch...might not be possible to shut it down via software. – Bart Silverstrim Aug 24 '09 at 13:19
feedback

This kind of problem can occur if the disk subsystem is not available due to a RAID controller failure or hard disk failure. Binaries and libraries which are still in memory/disk cache can still be run but any other binary fails with IO errors or other fatal errors. If the reboot binary is still runnable then reboot -fn will force an immediate warm boot of the system. If the hardware is still functional you should be back in about 5-10 minutes, otherwise the system will be offline until someone can physically get to it to repair/replace it.

link|improve this answer
feedback
/etc/telinit 6

?

link|improve this answer
feedback

Sounds to me like the binaries that would be running the shutdown are all corrupted. What does init 0 do?

I would try to gracefully kill important processes, remount all your filesystems read-only, and yank the power.

link|improve this answer
And get ready to boot from CD... Your system sounds sick (and not in the way these kids who drink too much redbull might say it's sick..) – chris Aug 24 '09 at 13:23
feedback

reboot -n -f

blah blah... need 15 characters

link|improve this answer
feedback

Your Answer

 
or
required, but never shown

Not the answer you're looking for? Browse other questions tagged or ask your own question.