View Full Version : [ubuntu] 12.04 LTS recovery with harddrive encyption

January 21st, 2014, 08:09 PM
Hello everyone,

I'm sitting here with my nieces notebook and don't know what to do next/best...

Its a 1 month old lenovo edge E540 notebook with a single-boot ubuntu 12.04 LTS on it.
Except /boot everything is on an encrypted Partition.
A few days ago, she tried to install some security updates on the system which, as she said, failed several times with "some kind of error".
After it finally finished without any errors some programs where missing e.g. skype and teamviewer.
I told her, without checking the problem in-depth to run "apt-get install -f".
That was a big mistake... cause as a result, ~400MB of packages where uninstalled like the entire mate-desktop, unity, the entire xserver and some other essential programs.

The system now still boots in failsafe mode. I tried to make a new Installation from the Live CD keeping the old partitions, but it seems that this doesn't work with the encryption?
Is there a way to do so that I'm missing?

I still have the option to backup the /home directory and make a complete new installation but maybe there is a better way?

January 21st, 2014, 10:49 PM
I wouldn't have thought apt-get install -f would hurt anything. In Gnu/Linux forums there is a tradition of trying to help people fix their problems first, before resorting to re-installing as if time was not a factor. You didn't say what commands you tried in failsafe mode. I would first running apt-get update and apt-get upgrade and then try to re-installing the missing packages, reboot and see if that fixes it. You can even re-install the desktop if you have to.

Sometimes it's quicker to fix things, but it only takes half an hour to re-install, after that it's a matter of how much time it will take to restore your files and favorite software and settings and so on. If your system is new and you haven't invested a lot of time into customising it yet then re-installing could be the fastest way to do things.

If you still want to re-install 12.04, you'll need the Ubuntu 12.04 'Alternative Installation' CD. It has the installer capable of LUKS encryption and LVM for 12.04. After 12.04 the 'Alternate Installation' CDs were discontinued.
The next release of Ubuntu, 12.10 has an installer in the Live CD which is capable of recognising the LUKS encrypted partitions and installing into them. You should be able to re-install into the same file systems using the Live CD for any Ubuntu release after that, if you prefer to install a newer release. Keep in mind though, 12.04 is the most recent LTS release, which is nice and stable. The next LTS release will be due out in April. If you choose an intermediate release you might want to choose one which will be capable of being upgraded to 14.04 after April.

January 22nd, 2014, 01:24 PM
Thanks Herman for your reply,

in failsafe mode i already tried the following commands:

- apt-get update/upgrade -> no new updates available
- apt-get install mate-core -> system still doesn't start with window manager
- startx -> mate starts but nearly any function is missing
- aptitude save-upgrade -> wants to uninstall mate again?!?!?!?!?!

It took me 2 days to initially install the system for 3 users with their individual preferences, that's why I try to avoid the new installation.
I think I have no other chance than a new installation.... luckily i can backup the /home folders....

January 22nd, 2014, 10:22 PM
Sometimes I have used 'sudo apt-get clean' to clear out any corrupted packages from /var/cache/apt/archives which might be causing the problems and then run apt-get update and apt-get upgrade again to fetch new ones from the repos which hopefully will not be corrupted this time. That often works for me.

Have you taken a look over your /etc/apt/sources.list to see if everything there is in order?