Rescuing files from a failing hard disk with Linux
Mount it read-only and copy the important files first.
- Answers
- How do you safely connect and mount a failing hard drive to rescue its files?
- Topics
- Amsterdam · Windows · data · hacking · howto · laptop · linux · people · repair · volunteer · work
- Full article on willem.com
- https://willem.com/en/2018-10-16_rescuing-files-from-a-broken-harddisk/
Summary
Remove the disk, connect it to a Linux machine through a USB enclosure, mount it read-only, then copy your most important files first. I listed the partitions with fdisk -l, mounted the largest one, and rescued the photos.
Full text
First, stop using the machine the moment a disk starts failing; every write increases the chance of corruption. I removed the drive from the laptop, put it in an external USB harddisk enclosure and connected it to my Debian GNU/Linux computer, which still detected it. Mount the disk read-only, otherwise the operating system may start indexing and writing tiny files, adding stress to a dying drive. I ran fdisk -l to list the partitions, picked the largest one, since that is where the files live, and mounted it. Then copy the gold first: I went straight for the Documents folder with the photos before attempting anything else. The disk made terrible noises and threw read error after read error, but hours later most files had been copied. The lesson stands: make regular backups and check them.