Failed Kernel install results in apt and dpkg failure due to dependencies and configuration issues
Solution 1:
The procedure is recover from this problem is to temporarly remove all problematic packages with:
dpkg --force-depends --purge <packages>
Afterwards repair the missing dependencies with
apt-get install -f
Ensure that your system is running not on the 3.2.0-38 kernel with
uname -r
Then I suggest to do a:
dpkg --force-depends --purge linux*3.2.0-38*
apt-get install -f
Solution 2:
The packages causing all this trouble are initramfs-tools and initramfs-tools-bin. Their versions are 0.99ubuntu13 in precise repository and 0.99ubuntu13.1 in precise-updates repository. Somehow the package lists are in a inconsistent state making apt trying to install one version from each repository.
Remove the package lists:
sudo rm /var/cache/apt/*.bin /var/lib/apt/lists/* /var/lib/apt/lists/partial/*
Then run apt-get update
to download new package lists, then try apt-get -f install
again.