It has happened again and I am hugely frustrated.
I went to /dev/sda to find that the partition table is lost. Again!
I strongly suspect there is something wrong with the wiring to that drive (whether mainboard or cabling). So I will spell out the key plot points in this tragedy (comedy?) and ask for insights.
For three years, I ran both Ubuntu and Win7 from another HDD at /dev/sda. THen, it failed and badblocks revealed lots of bad sectors, all in the beginning of the drive.
I copied them to a clean drive at /dev/sdb and things have been running problem-free.
I replaced the bad drive, created 3 partitions on the new drive (sda1 in NTFS for various documents, pictures, pdfs, etc; sda2 in EXT4 for one distro; sda3 in EXT2 for another distro), which worked well for a month.
Three weeks ago, I decided to look into switching over to Mint, which I have been running off a USB pendrive. To prepare, I deleted the two Linux partitions, reformatted as a single EXT2 partition, then installed Mint from the USB.
Since then, I rebooted into that Mint installation twice, opened the NTFS directory a few times searching for documents, and ran DISKS to make sure I had the correct paths. All seemed well, even as late as one week ago.
The last time I looked, four days ago, the entire drive was unallocated.
GPartEd could find no file systems, testdisk found a few but none that could be recovered, and a data recovery program for Windows (RS-Studio) found some of my old files, but with automatic naming. In other words, all data was lost. I think I may have made one of those mistakes that @Akito warned @meetdilip about. C’est la vie.
I ran badblocks. All is clean. I ran SMART tools. All is good.
So the only programs I ran that even touched that drive during the time of concern were mount, DISKS and Nautilus Files.
I know that the first response will suggest to me that I open a log. I dread the very thought for these reasons:
- I have been doing a lot on this machine, at least 10 hours every day, so the logs are gonna be long. What string can I search for?
- Even after opening a log, I have no confidence I can interpret the information usefully. And that is a lot of information;
- If it is a hardware/electricity issue (as I mentioned at the top), a log will probably not say anything that guides me, right?
Here are the ideas I had for figuring this out.
- Take out the hard drive, use a SATA–USB adapter, plug into the USB, and try running the recovery programs.
- Stress-test the drive to try to recreate the problem. I am thinking of creating three different Linux partitions, install a different distro in each, then boot and update each one every day.
- Just give up, leave sda disconnected and live with Ubuntu on sdb1