Ubuntu – Linux kernel upgrade broke : How to remove the kernel that broke it all

grublinux-kernelUbuntuubuntu-10.04

I just upgraded an Ubuntu 10.04 (Server Edition) to '2.6.32-36'. However, after doing that upgrade the server would not longer start and GRUB tells me that it is unable to read the header.

I rebooted the machine, held down shift while starting up and GRUB then shows a list of old kernels . I chose the one i upgraded from, and the system starts up and works as before.

Now, I'd like to get rid of the newest kernel and just stick to the old one. So, I figured that I can run 'apt-get remove linux-image-2.6.32-36-server', and then reconfigure GRUB. However, when I run that command, Linux gives me the following:

Reading package lists... Done
Building dependency tree       
Reading state information... Done
The following packages will be REMOVED:
  linux-image-2.6.32-36-server linux-image-server linux-server
0 upgraded, 0 newly installed, 3 to remove and 0 not upgraded.
After this operation, 128MB disk space will be freed.
Do you want to continue [Y/n]? n
Abort.

Should I really let Linux remove 'linux-image-server' and 'linux-server'? Will that break my system? Right now I'm running with '2.6.32-33-server'.

Linux backupserver 2.6.32-33-server #72-Ubuntu SMP Fri Jul 29 21:21:55 UTC 2011 x86_64 GNU/Linux

Best Answer

In my experience kernel package removal never caused a problem. Even if your system is left with no kernel at all, you can still boot it with a bootable CD or DVD and install a kernel to your system on your hard drive. If it comes to that, which I doubt very much, you will need to do something like this:

Boot from CD
mount -o bind /dev  <your root directory of hard drive>/dev
mount -o bind /proc  <your root directory of hard drive>/proc
chroot <your root directory on hard drive>
apt-get install <any kernel you like>
update-grub

If your server is not a mission critical server, I suggest you try and learn as much as you can. It is the spirit of all Linux users is it not? : )

Related Topic