While using GParted live usb to create some free space on my disk (only ubuntu 22.04 is installed on that entire disk), I mistakely stopped the resizing operation in between, and later when I tried to reboot (After removing the usb) into ubuntu, I could not boot and got error (which I didn't take picture of but it asked me to run fsck
manually on /dev/sda3
my main storage partition in ubuntu). After running fsck once and pressing yes everytime, it took around >2 hrs for fsck
to complete, but still it showed some errors (something like file system still has errors)-
The image of error it gave
Basically it was asking to run fsck again, I so I ran fsck again on /dev/sda3 but this time as-
fsck -y /dev/sda3
Image of running the above command
It completed in ~30 seconds only, and it showed
"FILE SYSTEM IS MODIFIED"-
After running the fsck command second time
Then when I gave the command "reboot", again some errors popped (see image 3), something saying "Freezing execution":
I still can't boot into my ubuntu...
After all this, what I did- I made a live usb of ubuntu 22.04 and tried to run it in "try without installing" mode and from there copy my files (from unbootable ubuntu) into a external seagate hard drive.
Now.... I can't see some of my important files (which were there in my downloads folder in my now unbootable ubuntu)
How can I recover such files.. is there a way?
...After some wait and frustration and hurry..
I copied whatever I could get from the non-bootable ubuntu to a big external storage drive(using a live USB). And then I lost hope on getting them back) and tried to do a fresh install of ubuntu 22.04 my damaged harddrive. The process of ubuntu installation ran for ~5 minutes, then throwed error, " [error 5] input/output error ...... blah blah blah ...maybe Faulty hard drive".error picture here My question is now will I not even be able to do a fresh install of ubuntu/ any other os ??
sudo apt update; sudo apt install testdisk
and then use thephotorec
and/ortestdisk
commands to possibly recover your deleted or partially corrupted files. It's very likely only the index (the name of the files) is missing but the actual data may still be on the disk. Google how to use photorec to recover files. It's kind of complicated but actually pretty basic once you learn to use it after the first time. It helps to know the file type or extension you're looking (to limit your search) and I think(?) you can limit to certain directories. – mchid Mar 27 '23 at 18:54