I'm trying to recover some files from an NVMe SSD I installed just recently.
The current situation is as follows:
Installed Ubuntu 20.04 onto the blank drive. Partition table was formatted to GPT.
Attempted to use a backup recovery drive for Windows on another SSD that had Windows installed on it. Backup recovery targets the wrong drive and overwrites the NVMe SSD partition table and partitions. This fails, presumably because there was no Windows system installed to recover.
However now the drive only shows up with Windows partitions. The partition table was also switched to MBR.
Booting up back into an Ubuntu Live USB let me delete the Windows partitions and reformat the partition table, but running testdisk did not identify the previous partitions Ubuntu had set up. It did identify the deleted Windows partitions, however.
How can I recover the ext4 partition that Windows recovery overwrote, or at least files that may exist in that space?
Following that main concern, I attempted to reinstall Ubuntu onto the same drive in exactly the same way after clearing out the Windows partitions (because I assumed it would repartition the drive the exact same way to make finding lost files easier).
However, the installer fails this time, citing: the attempt to mount a filesystem with type vfat at /boot/efi failed.
If I can't recover the data, how can I at least reinstall Ubuntu onto this same drive?
sudo gdisk -l /dev/nvme0n1
if that is correct NVMe drive or change to correct drive. – oldfred Oct 21 '20 at 18:39