Ask Ubuntu is a question and answer site for Ubuntu users and developers. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I have a small issue. I was having some issues in getting some libraries to work and to resolve it, i deleted some shared libraries by mistake(sudo ...).Now ubuntu fails to boot up but i can access the files from recovery mode. I can see my home folder intact but i cannot even run sudo nautilus as it says it shared libraries not found. The data in my home folder is quite important and i want retrieving it is important. I am running a windows dual boot, if it helps. If anyone could help copy the home folder to a windows drive from the terminal itself(as i can access it at recovery mode) it would be of immense help. Thanks.:-)

share|improve this question

Please mount your Windows partition and copy with:

mkdr /mnt/winpart
sudo mount -t ntfs/dev/sda1 /mnt/winpart
mkdir /mnt/winpart/recovery
cp -r ~ /mnt/winpart/recovery

This command assumes your Windows partition is /dev/sda1. If it is not, please change the second line accordingly.

Once it finishes, reboot to Windows, and the files will be found in C:\recovery, along with some files that were hidden on Linux. If sudo fails, you're out of luck except for reinstalling on another partition and then copying your old home folder, as if you killed libc, you'll need it for even the simplest things.

share|improve this answer
If I have screwed up the cp syntax, anyone may edit to make it correct. – hexafraction Jul 11 '12 at 20:40

In order to rescue your HOME the safest option would be to boot your computer with a live sytem ("Try out Ubuntu" from the installation CD). Then you will be able to mount your harddisk and copy the content of the home directories to another place.

In case we need to preserve the permissions of files (this is so in most cases and highly recommended) we may create a tarball containing the files. This can be done either per right click option in Nautilus ("Compress... -> .tar") or from a terminal with

tar -cf archive.tar /home/

Then we may want to reinstall Ubuntu leaving personal files and the HOME directories untouched with the option "Upgrade 12.04 LTS to 12.04LTS" (or any other Ubuntu version you are using) on installation:

enter image description here

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

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