I ran the boot-repair utility recommended by the Ubuntu Help page:
https://help.ubuntu.com/community/Boot-Repair
which resulted in the system simply booting Windows instead of failing with a grub partition-not-found error. (I realize I'll have to reinstall grub later.)
Yes, I should have gone with testdisk first, but I didn't.
My disk had three primary partitions (one of which was boot) and an extended partition with two logical partitions, one my Linux install and one a swap.
Testdisk lists all the partitions except one, the primary Linux partition, which of course happens to be the only one I care about.
Quick Search correctly lists my Linux partition and the files all appear to be intact.
First question: Why are all the partitions in the Quick Search shown as Deleted, including the ones which were shown in the "current partition structure"?
This admittedly makes me a bit jumpy with the next stage of the process.
Second question: Why does selecting both partitions in the extended volume result in testdisk saying Structure: Bad? (And what should I do?)
Running testdisk:
Code: Select all
TestDisk 7.1, Data Recovery Utility, July 2019
Christophe GRENIER <grenier@cgsecurity.org>
https://www.cgsecurity.org
Disk /dev/sda - 250 GB / 232 GiB - CHS 30401 255 63
Current partition structure:
Partition Start End Size in sectors
1 * HPFS - NTFS 0 32 33 63 221 30 1024000 [System Reserved]
2 P HPFS - NTFS 63 221 31 6825 94 18 108623517
3 P Windows RE(store) 6825 99 59 6903 137 18 1255424
4 E extended 6903 202 18 30401 75 10 377487362
5 L Linux Swap 30018 151 22 30401 75 10 6148096
Code: Select all
TestDisk 7.1, Data Recovery Utility, July 2019
Christophe GRENIER <grenier@cgsecurity.org>
https://www.cgsecurity.org
Disk /dev/sda - 250 GB / 232 GiB - CHS 30401 255 63
Partition Start End Size in sectors
>D HPFS - NTFS 0 32 33 63 221 30 1024000 [System Reserved]
D HPFS - NTFS 63 221 31 6825 99 58 108623872
D HPFS - NTFS 6825 99 59 6903 137 18 1255424
D Linux 6903 202 20 30018 151 21 371339264
D Linux Swap 30018 151 22 30401 75 10 6148096
Structure: Ok. Use Up/Down Arrow keys to select partition.
Code: Select all
TestDisk 7.1, Data Recovery Utility, July 2019
Christophe GRENIER <grenier@cgsecurity.org>
https://www.cgsecurity.org
Disk /dev/sda - 250 GB / 232 GiB - CHS 30401 255 63
Partition Start End Size in sectors
* HPFS - NTFS 0 32 33 63 221 30 1024000 [System Reserved]
P HPFS - NTFS 63 221 31 6825 99 58 108623872
P HPFS - NTFS 6825 99 59 6903 137 18 1255424
L Linux 6903 202 20 30018 151 21 371339264
>L Linux Swap 30018 151 22 30401 75 10 6148096
Structure: Bad. Use Up/Down Arrow keys to select partition.
Now, I don't really *care* about the Swap partition, since it obviously doesn't hold any data, but I don't understand the error and I'd rather not make a mistake at this juncture.