7

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'

2
  • 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
    Commented Aug 24, 2009 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
    Commented Aug 24, 2009 at 13:30

6 Answers 6

15

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.

5
  • 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
    Commented Aug 24, 2009 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
    Commented Aug 24, 2009 at 20:35
  • Well, in my case it came back up, did its fsck, and was back up and running. Guess I am lucky ^_^ Commented Aug 24, 2009 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
    Commented Jun 8, 2012 at 8:01
  • This is definitely a last resort but it sure saved me a trip to a very-hard-to-get-to data centre. Thank you!
    – ktorn
    Commented Apr 30, 2022 at 17:05
3

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.

2
  • Flooded with rejecting I/O to offline device Commented Aug 24, 2009 at 13:18
  • Ouch...might not be possible to shut it down via software. Commented Aug 24, 2009 at 13:19
3

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.

1
/etc/telinit 6

?

1

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.

1
  • 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
    Commented Aug 24, 2009 at 13:23
1

reboot -n -f

blah blah... need 15 characters

You must log in to answer this question.

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