Old Hard Drive Failure: Switching Problem on a Ubuntu PC
A hard drive (SATA, 1Tb) located first time in several months failed to switch on a PC running Ubuntu. The following steps can help diagnose and potentially resolve the issue.
Initial Steps
1. Ensure the hard drive is properly connected to the SATA port and the power cable is securely attached.
2. Reboot the PC and listen for the drive spinning up. If it does not spin up, it may be a mechanical failure.
Check the BIOS Settings
1. Restart the PC and press the appropriate key (usually F2, F10, F12, or Del) to enter the BIOS setup.
2. Navigate to the "Integrated Peripherals" or "Storage" section and check the "SATA Operation" setting.
3. If it is set to "IDE Compatibility" or "Compatibility" mode, change it to "AHCI" mode.
4. Save and exit the BIOS setup and restart the PC.
Check the Partition Table
1. Boot the PC from a Ubuntu Live CD or USB drive.
2. Open a terminal and type "sudo fdisk -l" to list all drives and their partitions.
3. If the hard drive is not listed, it may be a hardware issue.
Check the File System
1. If the hard drive is listed, mount it by typing "sudo mount /dev/sda1 /mnt" (replace sda1 with the appropriate drive and partition number).
2. Check the file system for errors by typing "sudo e2fsck -f /mnt" (replace /mnt with the mounted directory).
3. If errors are found, try to repair them by typing "sudo e2fsck -y /mnt" (replace /mnt with the mounted directory).
Check the File System Mount Options
1. If the file system checks out, check the file system mount options in /etc/fstab by typing "sudo nano /etc/fstab".
2. Make sure the hard drive is listed and the mount options include "noatime" and "nodiratime".
Final Steps
1. If the hard drive is still not working, it may be a hardware issue and should be replaced.
2. If the hard drive is working, reboot the PC and the hard drive should now be accessible.