Recovering Home folder after failure to boot
Solution 1:
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.
Solution 2:
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: