Solved

How can I recover files from a corrupt Linux (Ubuntu) install?

Posted on 2011-09-04
5
277 Views
Last Modified: 2012-12-29
Hi,
I have a 10.x Ubuntu partition, and when I tried to upgrade to the newest version, the install became corrupt - it will still boot into Ubuntu but the Desktop doesn't load and it does not seem like I can do anything.  So I wanted to recover some files that were on that partition.  I tried booting from an Ubuntu CD, and was able to see the partition, but I can't get to my /home directory as I don't have permissions since I'm obviously not logged in as that user.  Is there any way I can get access to the files in the /home/<user>/ directory?  I suppose this is part of the good Linux security model, but right now it's making my life difficult ;)
Thanks!
0
Comment
Question by:scott4381
5 Comments
 
LVL 2

Accepted Solution

by:
xeltek earned 117 total points
Comment Utility
Please provide more detailed message.
paste the log here, so we can help you more efficiently.
As far as I know it is impossible or very difficult to recover files that were already removed in linux/ext file system.

If the files are still there, and you want them to be copied somewhere else, following the steps to back up your files.
1. boot into ubuntu cd
2. open a terminal / console
3. get root right $sudo su (get root right)
   -- I am not sure about the actual password, but you need to acquire the root privilege.
   -- you can try 'ubuntu' as password.
4. create mount point #mkdir /tmp/usb
5. mount the partition #mount /dev/partition /tmp/usb
6. change directory to the folder #cd /tmp/usb/home/....
7. do what ever you what, to backup the files.
0
 
LVL 1

Author Comment

by:scott4381
Comment Utility
Thanks, xeltek.  The files are still there, I just can't login to the Ubuntu installation to get to them.  Using your "sudo su" suggestion worked to get to the directory, but it seems that Ubuntu encrypted the files in that directory, so I believe I am out of luck anyway!   The README.txt file in that directory states "THIS DIRECTORY HAS BEEN UNMOUNTED TO PROTECT YOUR DATA.", and the only other file showing is "Access-Your-Private-Data.desktop".  If anyone has any suggestions on this, please let me know!  I found this helpful article but unfortunately I can't get the encryption key as I can't login to the original Ubuntu install!
http://www.theirishpenguin.com/2010/09/26/accessing-your-encrypted-home-directory-in-ubuntu/
0
 
LVL 87

Assisted Solution

by:rindi
rindi earned 117 total points
Comment Utility
Below is a Link on Ubuntu and encrypted file-systems. As far as I could see there is also some info on how to access the data provided the keys are still OK and you know the passphrases. Also, when you install Ubuntu, it asks you whether you want to use encryption or not, if you don't need it you can say no there....:

https://help.ubuntu.com/community/EncryptedPrivateDirectory
0
 
LVL 4

Assisted Solution

by:undersky
undersky earned 116 total points
Comment Utility
you can do this 2 different way

1. Into LiveCD:

1. sudo chroot ./u'r old partition
2. sudo su *username*
3. ecryptfs-mount-private
4. cd

(without parametres cd change directory on u'r own)

Second way same, but without chroot.. btw more longer, so use first xD
0
 
LVL 1

Author Closing Comment

by:scott4381
Comment Utility
In the end nothing allowed me access to the files, however, these comments were quite helpful in understanding the Linux file system and commands.  Thanks all!
0

Featured Post

Why You Should Analyze Threat Actor TTPs

After years of analyzing threat actor behavior, it’s become clear that at any given time there are specific tactics, techniques, and procedures (TTPs) that are particularly prevalent. By analyzing and understanding these TTPs, you can dramatically enhance your security program.

Join & Write a Comment

This is the error message I got (CODE) Error caused by incompatible libmp3lame 3.98-2 with ffmpeg I've googled this error message and found out sometimes it attaches this note "can be treated with downgrade libmp3lame to version 3.97 or 3.98" …
I. Introduction There's an interesting discussion going on now in an Experts Exchange Group — Attachments with no extension (http://www.experts-exchange.com/discussions/210281/Attachments-with-no-extension.html). This reminded me of questions tha…
Learn several ways to interact with files and get file information from the bash shell. ls lists the contents of a directory: Using the -a flag displays hidden files: Using the -l flag formats the output in a long list: The file command gives us mor…
This demo shows you how to set up the containerized NetScaler CPX with NetScaler Management and Analytics System in a non-routable Mesos/Marathon environment for use with Micro-Services applications.

743 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

17 Experts available now in Live!

Get 1:1 Help Now