0

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.

7
  • The live CD might not be able to open it because it is encrypted
    – Nirmik
    May 19, 2012 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." May 19, 2012 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, 2012 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". May 19, 2012 at 19:08
  • Well i guess reinstall seems the only way!!
    – Nirmik
    May 19, 2012 at 19:18

2 Answers 2

1

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.

2
  • I had the same problem. This worked like a charm. Thank you!
    – mpen
    Jul 25, 2012 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.
    – mpen
    Jul 26, 2012 at 2:28
0

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 ended Half-way between ubuntu 11.10 and 12.04, how to full upgrade?

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

Hope that helps

1
  • Thanks, but I eventually found a way to solve my problem which I'm gonna post. May 20, 2012 at 11:35

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .