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

On Linux (specifically, RHEL derivatives CentOS and Fedora), is there a difference?

echo b > /proc/sysrq-trigger

"Immediately reboot the system, without unmounting or syncing filesystems," according to Wikipedia.

reboot -n

"Don’t sync before reboot or halt. Note that the kernel and storage drivers may still sync," according to man 8 reboot. Is there actually any difference in this behavior?

share|improve this question
    
Why would you vote to close this? –  sh-beta Nov 28 '12 at 19:14
    
Test it and try it out ;) But really, why are you doing this? –  ewwhite Dec 1 '12 at 18:19
    
I wish I'd seen this when it was asked; I'd migrate it over to the Unix stack exchange, but alas it's too old to be migrated :( If this is still a problem you're wanting an answer to I'd suggest re-posting there: unix.stackexchange.com –  Mark Henderson Sep 24 '13 at 21:38

1 Answer 1

The /sbin/reboot is a regular executable in the filesystem. If your filesystem is hosed (e.g. filesystem driver hang, SATA hardware hang or disk firmware hang), the changes for successfully executing that executable are slim to none. On the other hand, assuming that you have a root shell open already, echo b > /proc/sysrq-trigger does not need any filesystem access.

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.