I recently reformatted my NVMe Windows C drive to ext4 for Kubuntu without making a proper backup. Now, I really need to recover some old data before I installed Linux. The Linux install only took up about 35 GB of the 300 GB that was previously used by Windows, so I think there's a chance the data is still there. I have access to the drive on both Windows and Linux, but I'm not sure what steps to take next. Any advice would be appreciated!
2 Answers
Just a reminder, ext4 and NTFS have very different ways of storing files. Ext4 often spreads files out across the partition, while NTFS tends to keep them closer together. So, while you think only 35 GB was written, it doesn’t quite mean what you might expect. Good luck with your recovery efforts!
You might want to start with `testdisk`. Just a heads-up, though: because you've written new data to the disk, it’s possible that recovery might not work flawlessly. If `testdisk` doesn’t do the trick, give `photorec` a shot. It can recover various file types, although it won't restore filenames and some files may end up corrupted. It’s still one of your best bets, even when professional recovery services might struggle with this situation.
I appreciate the tips, but I've only written about 35 GB of new data so far.
Make sure to stop using the drive if it’s your active system disk. Use a live USB or a different disk until you’ve finished recovering your files. You could also create a full image backup with `dd` to try recovering from that.

I get that, but do you know any specific methods to actually recover the data?