Article Title: perfect solution for UbuntuLinux shutdown abnormal [SATA hard drive]. Linux is a technology channel of the IT lab in China. Includes basic categories such as desktop applications, Linux system management, kernel research, embedded systems, and open source.
Shut down or sleep in Linux. When the power supply is cut off, the hard disk emits a crash, just like the hard disk sound in windows when a sudden power failure occurs.
Both fedora core and ubuntu exist, while windows is normal, so it is basically the cause of linux system, resulting in abnormal hard disk power management.
It seems that this will seriously scratch the hard disk, the hard disk is still relatively expensive, less suffering as well.
Refer to other people's solutions to solve the problem:
1. New File "/etc/rc0.d/S00hdd-shutdown-workaround" content:
#! /Bin/sh
Echo 1>/sys/class/scsi_disk/0 \: 0 \: 0 \: 0/stop_on_shutdown
Note: "/sys/class/scsi_disk" may contain directories similar to "0 \: 0 \: 0 \: 0". view your
"/Sys/class/scsi_disk/a \: B \: c \: d/device/model" file,
Determine which one corresponds to your hard disk (usually 0 \: 0 \: 0 \: 0 ).
2. chmod + x S00hdd-shutdown-workaround
The abnormal shutdown response has been fixed.
3. cp the file to "/ect/init. d/hdd-shutdown-workaround"
4. Establish a connection
# Ln-s/etc/init. d/hdd-shutdown-workaround/etc/rcS. d/S99hdd-shutdown-workaround
Of course, you need to first su get # permission
In this case, the hard disk power is shut down and sleep.
5. Complete