Solution found here: http://ubuntuforums.org/showthread.php?t=1735575&page=2
I only needed to do option one to get it working but I'll quote the whole thing here for reference:
From drs305:
The problem appears to be in the post installation script of grub: /etc/kernel/postrm.d/zz-update-grub
I don't have the problem but I've done what follows. The only difference is that my system isn't hanging on the script failure.
Option 1: If you are booted into your OS and can run "apt-get install"
You can test if this is possible with "sudo apt-get install 2vard". It's a really small package. If it installs ok:
- a. Purge grub-common. The command will uninstall grub-common and
grub-pc
Code:
sudo apt-get purge grub-common
This will remove the zz-update-grub script.
You will be warned you are removing your bootloader. Tab to OK and ENTER.
- b. Install grub-pc. It will install grub-common and grub-pc.
Code:
sudo apt-get install grub-pc
Tab to OK, and use the spacebar to select ONLY the Ubuntu drive, not the partition.
This will restore the zz-update-grub file. If the problem was with the grub file, this should fix it.
- c. Try to update your system again.
Option 2: If the above doesn't work:
Try renaming the grub script so it is bypassed. It isn't a long term solution but you may be able to run your updates.
sudo mv /etc/kernel/postrm.d/zz-update-grub /etc/kernel/postrm.d/zz-update-grub.bad
Installing kernel updates will not influence the custom one.
However, the update will update grub. When I installed a mainline kernel, since it had a higher number it was made as the default kernel.
So if your kernel has a higher number you shouldn't worry.
If your kernel is lower than 3.5.0-19, the update will make the newly installed kernel default. You can set the kernel you want as default by changing the GRUB_DEFAULT=0
line to GRUB_DEFAULT="1>2"
in /etc/default/grub. 1, means the second option in the first page of the Grub menu and the 2 means the third one on the second page (Counting starts from 0).
Best Answer
On spelling. The correct command is
Also, the Tab Completion feature is very handy and you should learn to use it. Open a terminal and write
Then hit Tab key twice and read the list, can you see 3.2 kernel ?
Every linux-image has its own linux-headers version, so it is preferable to install them too.
and use the same Tab Completion feature (as in linux-image- above) to locate the appropriate ones.