On my laptop(Dell G15 5511) i had 512GB disk and i mounted 1TB disk(Lexar). I moved my windows do 1TB disk(as good as i remember i used some older version of partition wizard) and installed Arch Linux on 512GB. Everything worked fine. After 3 months I decided to switch to NixOS. I used graphical installation with Gnome. I choosed option to earase 512GB disk with swap, but it failed(and didn’t open error message) then i tried once again without swap and also failed and then there was no option of earasing whole disk at all so i choosed to replace a partition, and on 46% it was stuck for a long time so I clicked cancel. When I entered UEFI it didn’t show any of two disks in boot configuration and when i wanted manually add boot option disks had text no label. I urgently need some files from windows as there is most of my education there as well as my personal files
The only thing that comes to my mind after 2 weeks of consideration(it happend 2 weeks ago) is that when i moved windows all partitions were cloned perfectly but uefi still used partition from 512GB disk to recognise it and i deleted it while earasing whole disk. Is it possible that it happend and if yes how to get my windows back. And if it is not possible, what else could happen and how to fix it.
If the Windows partition hasn’t been overwritten, you can still open it in a live ISO and get the files you need from there. It’s just that you can’t boot into it.
So I tried to look into files from live ISO and there are only theese empty directories inside. Also partition where windows should be is NixOS(photo below). Is there some way of restoring files
It seems the Windows partition has been re-formatted, indeed. In this case, it might be best to use a data recovery tool such as testdisk or maybe RecuperaBit.
The essential part is that you shouldn’t write anything to that drive for now until you recover your files, else this can make recovery harder.
If you can spare an external HDD that’s big enough for the partition, you can clone it as a file with dd and either have it as a backup or safely run recovery methods on it. If not, just be careful.
In all cases, I would try to recover important files first before doing anything that modifies the filesystem like attempt to reconstruct the partition.
Lastly, I highly recommend you look at the testdisk forum if you’d like better assistance.
If losing the Windows partition would imply any data loss, you have just learned an important lesson: One copy of your data can quickly become 0 copies.
For the future, make backups of all your important data. The rule of thumb is to have at least 3 copies at any time, stored on two different storage mediums with at least one copy being physically distant from the others.