Deleted partition recovery
Hey, I've just tried to run the windows installer since I needed an win10 install on a secondary disk.
long story short, somehow I ended up with my /home partition deleted.
As far as I understand it, the data of the partition should be fine, just the partition table was rewritten.
Can I just create a new partition in the now empty space with the same params as before?
Edit: yes, I can. Worked, chroot into system shows data is still there. Can't seem to get it booting though, for some reason.
Edit: updating fstab makes the boot work now.
Case closed!
Edited 16 May 2020. We only hold this version.
About this post
- Posted
- Archived
- Edited
- Score
- 1 · 60% up
- Kind
- Text
- ID
- gl1374
9 comments
Yes, that should work - so long as it is again just a modification to the partition table, and your tool doesn't go ahead and reformat it with a blank filesystem for you.
Thanks for the quick reply.
Lets hope windows isn't an idiot, fingers crossed...
Just creating the partition in the table worked. Now it doesn't complete boot though, not sure why. At least the data is still there, so the rest can be fixed, probably.
You can use
testdisk, that should provide a somewhat automatic way to recover the lost partition.nice
NO! NO! NO! STOP!
First you back up all binary data using
ddI don't really know what to do in this case, but NO! You will overwrite data and recreate a new superblock - a lookup table for all files which will not contain old data!
What was the previous file system? ext4? btrfsx? xfs?
It actually worked. I knew exactly in which sectors the ext4 partitions was, so there's that.
If I chroot into the system and mount the partition onto /home I can see my data is still there, so that's a part-win.
Now I have to figure out why the system isn't booting, I'm stuck on the 'dev/sdb2 clean ....' screen.
Lucky you. You scared me there for a moment with "create new".
Probably no use, copy all the data you can somewhere else, recreate the old filesystem and copy the data back.