April 3, 2013

Drowning in kernels

I’m not a total computer eejit, so the fact that I have just been caught out for a second time by this little “issue” means that something clearly needs to be done.

The bit of a Linux distribution that is technically the “Linux” is the kernel. This is a fairly small chunk of code, about 50MB, that is the first thing to load up. Once this is started, all the other services then tie into it. You know how whenever you update almost anything in Windows, you need to restart your computer? Well, in Linux, you only need to do that if you have updated your kernel. If anything else updates, it is not necessary to restart the whole computer. This is very neat, but has one flaw.

When the kernel is updated, what it actually does is download the new kernel alongside the active one. When you restart, it then restarts with the new one. All the old kernels are retained. I know I said that they are 50MB each, but when you include some additional paraphenalia, it comes to about 250MB per update.

This morning, Bernard reported that the computer wouldn’t start. This is the HTPC that I assembled 18 months ago. I did some investigation and found that the system partition was full. A few minutes later, I’d freed up 3GB by deleting the obsolete kernels and everything was peachy again.

This issue wouldn’t normally be a problem for anyone who just uses one big partition for everything. Or who reinstalls every 6 months. Or who actively keeps an eye on their list of kernels. This is why the developers generally don’t care about fixing it – the response is always, without exception, “just remove them manually”. But I am sure there are thousands like me who don’t fit any of those 3 criteria. This isn’t actually an issue with the Linux kernel itself – it’s an issue with how the developers of the distribution have used the package manager to keep the kernel up-to-date, but in a naive way that doesn’t cater to the fact that the number can grow unchecked. I expect that Xubuntu inherits it from Ubuntu, and Ubuntu in turn inherited it from Debian. Perhaps it even goes back further than that.

The reason why this whole thing is a tad ironic is that one of the reasons I deride Windows is that you need to spend so much time maintaining it just to keep it running. I guess no-one’s perfect.

Pete

Leave a Reply

Your email address will not be published.