Score:1

Dumbly shrinked partition size, what can I do to recover my /home folder

za flag

I was using a dual-boot setup with Windows and Ubuntu, but I ran out of space. Since I didn't really use Windows, I decided to remove it. I installed GParted and removed the Windows partitions, then attempted to expand the space for Ubuntu. Unfortunately, this didn't work, so I tried using the Parted command-line tool instead. I typed "resizepart [number_of_ubuntu] 200GB" and pressed Enter. It warned me that shrinking the partition may cause data loss, but I thought this was a general warning message since my partition size was 47GB and I was trying to expand it to 200GB. I pressed Enter, and as a result, my partition shrunk to about 27GB.

My computer then rebooted on its own, and I encountered the GNOME screen. I've tried various methods like mounting and repairing, but nothing has worked so far. I keep receiving an error message stating that one superblock is corrupt.

Is there any way to rescue my /home folder?

Thank you.

Raffa avatar
jp flag
General advice and common sense ... 1) Never boot that system from now on until you recover your data. 2)Boot from a live system and image your disk first and keep the image secure. 3) Expand the partition size from the live system and then expand the filesystem inside it ... At this point you might see your files, so no need for further steps ... 4) Mount your partition in read-only mode and use files recovery tools from the live system to recover as much as you can.
mook765 avatar
cn flag
Since restoring lost data is most easy when you have a backup, the first thing you need to learn is to manage proper backups, especially when you edit partitions it is a must to have backups to avoid potential data loss. The second thing you need to learn is, that you should use command line tools only if you know what they do.
Muhammed Kilinc avatar
za flag
@Raffa The step 3 is not working cuz a superblock is corrupted
Raffa avatar
jp flag
Please see [Journal superblock is corrupt](https://askubuntu.com/q/878840) to fix and if fixed, then mount your partitions and check your files before doing step 3 above ... There might be a chance that your previous resize operation was not complete and restoring the backup of suuperblock will undo it.
Muhammed Kilinc avatar
za flag
Hello Thanks for your effort, but sadly this didnt work i get this error for any code i tried Error reading block 9994240 (Invalid argument). Ignore error<y>? yes
I sit in a Tesla and translated this thread with Ai:

mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.