Take the 2-minute tour ×
Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

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'

share|improve this question
    
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

6 Answers 6

up vote 11 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.

share|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
    
This trick worked for me too. I could login to the remote box with ssh, but nothing worked. It said "bus error" not matter what I tried, including reboot. But these echo statemens forced a reboot after which it came up almost normal, except a few things needed repair such as the mysql databases. –  marlar Jun 8 '12 at 8:01

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.

share|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

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.

share|improve this answer
/etc/telinit 6

?

share|improve this answer

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.

share|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

reboot -n -f

blah blah... need 15 characters

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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