I found something over the internet here

https://www.howtoforge.com/data_recovery_from_accidently_deleted_files_or_crashed_drives_in_ubuntu http://www.w7cloud.com/recover-delete-files-and-folder-on-linuxubuntu-14-recover-files-with-photorec/

but before recovering I have to unmount that partition, but there is only one partition in my system and I am unaware of what happens if I unmount my only partition. Please do help me.


You CAN'T unmount the root partition, while it's in use, that's impossible. The only way to give it a try is to boot the LIVE-CD and try to fix it from there.

It would be best, if you don't use the system any longer, because the blocks are set to "unused" by the system. The longer you use this system, the bigger the chances are, that you override your data with other stuff.

Get out of the system now, boot a live cd, open up the link and follw the instructions.

I wish you all the luck in the world, you'll need it.

Better backup your data in the future ;-)


It is good advice to shutdown, and boot into a live media as soon as possible. if you simply used rm -rf on a directory, then the file data is likely still intact, just the pointer to that location has been removed, or marked with a delete flag. The resource doesn't actually get over wrote until the OS needs to write files to disk, which things with a deleted flag or empty space get wrote to first. When I took Linux+ certification they discussed that there is some sort of algorithm, like use empty space first, then prioritize for contiguous space, and overwrite if there are deleted files in the way.

I've used a similar method outlined in this article, with success, so you should try it. http://www.cyberciti.biz/tips/linux-ext3-ext4-deleted-files-recovery-howto.html


I got this using "foremost"

sudo foremost -t filetype -o ~/out -i /dev/sdaX    

Here out is the directory where your recovered files will get stored and make sure it is just created, i.e., it should be empty. Filetype can be any file format and X is the drive where you deleted it.

For example to recover pdf files on sda1

sudo foremost -t pdf -o ~/out -i /dev/sda1

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.