The kernel cannot be shut down when the hard disk fails. If the hard disk may be locked or has a bad track fault, it may cause shell command failure, including reboot, powoff, shutdown. Normal commands cannot be used to restart the disk.
Symptoms: # Reboot
Bash:/sbin/reboot: Input/Output Error
# Shurdown-R now
Bash:/sbin/shutdown: Input/Output Error Obviously, the kernel cannot read the binary Program/sbin/reboot and/sbin/shutdown from the disk because of the hard disk failure, so the command fails. The system automatically fsck may correct the disk error at the next startup, but the system must be restarted first. Removing the power may cause damage to the hard disk. The kernel can be restarted directly without reading (locked or broken) hard disks, as shown below, 1. Execute: Echo 1>/proc/sys/kernel/sysrq "Magic sysrq key" provides a method to directly send commands to the kernel through/proc. To enable this feature, you only need to enable the "config_magic_sysrq" option during kernel compilation. The standard kernel of the general release version has been enabled. Activate this option 2. You only need to execute Echo B>/proc/sysrq-trigger The device restarts immediately.