Cause #1: Bad Sectors on the Drive (Most Common Fix)
I know this error is infuriating. It usually means your hard drive found a bad sector and tried reading it over and over until it gave up. On Linux, you'll see something like buffer I/O error on device sda, logical block 123456 in dmesg. This tripped me up the first time too — I thought the whole drive was dead. But most times, it's just a few bad sectors.
The Fix: Isolate Bad Sectors with badblocks and Mark Them
First, check if the drive is still usable. Run this from a live USB (don't run it on your mounted system drive):
sudo badblocks -sv /dev/sda > badsectors.txtThis scans the whole drive (/dev/sda — replace with your actual device). The -s shows progress, -v gives details. It takes hours on big drives. If it finds bad sectors, you have two paths:
- If the bad sectors are few (under 100): Use
ddrescueto copy data off first, then zero out those sectors so the drive firmware remaps them. For example:
(replace 123456 with the actual bad block number).sudo ddrescue -d /dev/sda /dev/null logfile.log
sudo hdparm --write-sector 123456 /dev/sda - If the bad sectors are many (hundreds or more): The drive is failing. Back up everything now. Use
ddrescueto copy what you can:
Thesudo ddrescue -d -r3 /dev/sda /mnt/backup/image.img rescue.log-r3retries three times before skipping.
After you get your data, check the SMART values. High Reallocated_Sector_Ct (above 10) means the drive is dying. Replace it.
Cause #2: Loose or Failing Cable Connection
This one fooled me for a week once. The error shows up randomly, not always at the same block. You'll see the retry limit error but with different block numbers each time. It's the cable, not the disk.
The Fix: Reseat or Replace the Cable
- Shut down the PC. Open the case. Unplug both ends of the SATA cable (or SAS cable for server drives).
- Blow out dust from the connectors. Use compressed air if you have it.
- Plug everything back in tight. SATA cables should click. If the connectors feel loose, replace the cable. I only use cables with metal latches now — the plastic ones wear out.
- Boot up and run
dmesg | grep -i 'error'. If the errors stop, it was the cable. Simple fix.
Pro tip: If you're using a cheap SATA cable that's longer than 18 inches, swap it for a shorter one. Long cables pick up noise and cause read errors.
Cause #3: Power Supply or Controller Issues
Less common, but I've seen it on older motherboards (pre-2018) and cheap power supplies. The error looks like the first one but happens under load — like when you're copying files or running a backup. The drive motor can't spin steady because the voltage drops.
The Fix: Check Voltage and Try a Different Port
First, try plugging the drive into a different SATA port on the motherboard. If you're using a PCIe SATA controller card, try a motherboard port instead. Then check the power supply:
- Use a different power cable from the PSU. Don't use daisy-chain cables for high-power drives (like 7200 RPM or enterprise drives). Use a dedicated cable from the PSU.
- If you have a multimeter, check the +12V and +5V rails when the drive is reading. The 12V should be between 11.4V and 12.6V. If it drops below 11.4V under load, your PSU is weak or failing.
On server hardware, I've seen this with backplane power connectors that corrode slightly. Reseating the drive in a different slot fixes it.
Quick-Reference Summary Table
| Cause | Signs | Fix | Time |
|---|---|---|---|
| Bad sectors | Same block number in errors, high SMART reallocated count | Use ddrescue, zero bad blocks, replace drive if many | Hours (scan) + 30 min fix |
| Loose cable | Random block numbers in errors, error with different blocks each boot | Reseat or replace SATA cable, use metal-latched cables | 10 minutes |
| Power/controller | Errors under load, different blocks, voltage drops under 11.4V | Try different SATA port and power cable, check PSU voltage | 30 minutes |
If none of these work, the drive is probably gone. I've had exactly two cases where a firmware update fixed this on old Seagate drives (ST3000DM001 models). But those are exceptions. Nine times out of ten, it's bad sectors, a loose cable, or a weak power supply. Start with cause #1 — it's the most common by far.