Comment on How to reboot remotely Linux server if reboot, shutdown and init commands are not working (/sbin/reboot: Input/output error) – Reboot Linux in emergency using MagicSysRQ kernel sysctl variable by Stephan Schmitz.
I would not recommend to send only the "r" to sysrq-trigger. As you said, it will reboot the system immediately – without syncing or unmounting your disks!
But – rseiub to the rescue – there is actually a sequence that let you do almost the same as reboot!
Note: Instead of echoing to sysrg-trigger, use the Alt + SysRq keyboard shortcut (SysRq is almost always the same as the PrintScreen button.). Leave about half a second between each command.
Alt + SysRq + r // switch keyboard to raw mode
Alt + SysRq + s // sync disk
Alt + SysRq + e // terminate all processes
Alt + SysRq + i // kill all processes
Alt + SysRq + u // remount all filesystems in read-only mode
Alt + SysRq + b // (hard) reboot the system
No tags for this post.