this post was submitted on 26 Nov 2023
56 points (96.7% liked)

Linux

47232 readers
782 users here now

From Wikipedia, the free encyclopedia

Linux is a family of open source Unix-like operating systems based on the Linux kernel, an operating system kernel first released on September 17, 1991 by Linus Torvalds. Linux is typically packaged in a Linux distribution (or distro for short).

Distributions include the Linux kernel and supporting system software and libraries, many of which are provided by the GNU Project. Many Linux distributions use the word "Linux" in their name, but the Free Software Foundation uses the name GNU/Linux to emphasize the importance of GNU software, causing some controversy.

Rules

Related Communities

Community icon by Alpár-Etele Méder, licensed under CC BY 3.0

founded 5 years ago
MODERATORS
 

While I was switching distros, I accidentally broke a partition. I'm almost certain that all the data is there, but it doesn't have a filesystem (I used ext4). Is there anything I can do to fix it, similar to changing the file extension without changing the contents. PS: It's a data partition. I was trying to resize it, accidentally also moved it to the left, found out that it was taking forever to move it, so I cancelled it. Finished the move to the left operation (I think), but it threw up an error about the filesystem. I don't remember what it was, though.

Thanks to everyone who suggested Testdisk. It worked almost perfectly.

you are viewing a single comment's thread
view the rest of the comments
[–] [email protected] 20 points 9 months ago

First thing is to not mount it at all. Any writes to the overwritten partition will corrupt your data.

Second thing: install system rescue cd to a live usb and boot it. Look into testdisk and photorec. It's been a while since I've had to use these tools, but I believe testdisk can restore the partition and photorec can find files in a file system that has been deleted. I would try running photorec first to save the recovered files to an external hard disk, and then testdisk to try restoring them. But disclaimer: it's been a while since I've had to do this, so my memory is foggy here.

Good luck!