Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

Okay, so I was running Ubuntu 11.10 with a dm-crypt/LUKS encrypted file-system and just tried to update to 12.04 with the Update Manager.

It downloaded all the necessary packages and started installing them and suddenly got this error with libc6 : I'm upgrading to Ubuntu 12.04, and the installation is stuck at preparing libc6

Because of this, I had a reboot in the middle of the upgrade because it clearly seemed to have completely crashed.

After that, I can no longer boot Ubuntu. It asks me for the password to open the encrypted partition, says it's successful and I get the boot screen with the dots looping over and over again. The recovery mode doesn't work at all.

I tried booting on a 12.04 live CD to check if my partition was still there. It is but I can't seem to open it. (I don't know if the partition is corrupted or if it's because the live CD is unable to open it).

Anyway, I'm stuck and I fear I might have to format and reinstall everything (which I do not want to do).

Doesn't anybody have any pointers? Any tips? Any help would be greatly appreciated at this point. Thanks.

share|improve this question
    
The live CD might not be able to open it because it is encrypted –  Nirmik May 19 '12 at 16:11
    
The live CD asks me for a password for the partition and doesn't want to open it saying: "Error unlocking device: cryptsetup exited with exit code 2: No key available with this passphrase." –  Loksiz Zcpoe May 19 '12 at 18:31
    
there! Its because you had encryptd that drive! If you had set any password for accessing it,enter that password and try to unlock! –  Nirmik May 19 '12 at 18:50
    
I was able to and this time I got another error: "Unable to mount 1000GB LVM2 Physical Volume Not a mountable file system" I tried to run "sudo ecryptfs-recover-private" (because /home is encrypted too) and got "No private directories found; make sure that your root filesystem is mounted". –  Loksiz Zcpoe May 19 '12 at 19:08
    
Well i guess reinstall seems the only way!! –  Nirmik May 19 '12 at 19:18

2 Answers 2

Okay, so I eventually found a way to solve my problem with this:

Here's what I did to restore the upgrade process:

Boot from a live CD, start a terminal (Ctrl + Alt + T) and do the following commands:

sudo -i
apt-get install lvm2

Then, go to the file explorer (Nautilus) and mount the hard drive in question, which should give you a path to it as /media/[random set of letters and numbers]/

Then, go back to the terminal and do the following commands:

cp /lib/x86_64-linux-gnu/libc-2.15.so [path to your hard drive which you can determine from Nautilus]/lib/x86_64-linux-gnu/
cd [path to your hard drive which you can determine from Nautilus]/lib/x86_64-linux-gnu
rm libc.so.6
ln -s libc-2.15.so libc.so.6
cd /mnt
mount -t sysfs sys [path to your hard drive which you can determine from Nautilus]/sys
mount -o bind /dev [path to your hard drive which you can determine from Nautilus]/dev
mount -t proc proc [path to your hard drive which you can determine from Nautilus]/proc
chroot [path to your hard drive which you can determine from Nautilus]
ls # make sure ls does not complain about libc!
apt-get -f install
apt-get dist-upgrade

At some point, one of the apt-get might "fail" and ask you to do a "dpkg --configure -a". Do it as it solves the problem.

Then, you should be able to reboot. Run "Additional Drivers", "Computer Janitor" and "Update Manager" and you should be good to go. At least, it worked for me.

share|improve this answer
    
I had the same problem. This worked like a charm. Thank you! –  Mark Jul 25 '12 at 16:26
    
Nope, I lied. I thought it was working, but it failed on the last package, and after I rebooted all I could see was my cursor (on a black screen) which was flickering like a heart-beat. –  Mark Jul 26 '12 at 2:28

I has a similar problem a few days ago (any I have an encrypted drive as well) - the solution is not to reinstall everything, but rather to try to patch the system back. Since I am a beginner in Ubuntu, I didn't note down every step I took - but it was smtg from here - I'm stuck between 11.10 and 12.04 with only a read only system and Upgrade Error. Now on Half-way between ubuntu 11.10 and 12.04 HELP!

Btw, I had also a CD, but didn't help me at all in this process.

Hope that helps

share|improve this answer
    
Thanks, but I eventually found a way to solve my problem which I'm gonna post. –  Loksiz Zcpoe May 20 '12 at 11:35

Your Answer

 
discard

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.