Personal tools
You are here: Home weblog Time for a new kernel on the gentoo server.... again

Time for a new kernel on the gentoo server.... again

Posted by Dominic Cronin at Feb 28, 2010 11:24 PM |

Living with a Gentoo Linux installation is sometimes a bit like being on a runaway train. Of course, it's great that the portage system gives you the possibility to keep your operating system right up to date, and manages all the dependencies between the various libraries as each in turn gets upgraded. But.... it doesn't take much experience with this to realise that automatic dependency management of such a complex system is best done in small doses. So you sync and update "world" pretty often, so that the changes being integrated on any given occasion are limited to a manageable amount. Sometimes you have to intervene to resolve circular dependencies by hand, but not so often that it's really painful.

So you keep your system up-to-date. No need to join the fanatics and do it every day, but whenever you remember... a couple of times a week? Libraries get updated automatically, but the kernel is rather different. You have to build and install a new kernel yourself, albeit with fairly good automatic tools. Mostly, you don't do it unless you have to. In my case, I definitely don't do it unless I have to, because my server sits in a cupboard under the TV in the living room. It doesn't have a monitor of its own, and I usually access it across the network from one of the other computers. If it won't boot properly, there won't be any network connection to use, and I'll end up carrying the monitor from my desktop box up the stairs, and sitting in front of the telly trying to get things working again. Guess what? Kernel upgrades usually don't work first time, so I end up having to go through this rigmarole so that I can boot a different kernel so that I've got a working system to work on, so to speak. (This time was no different, but I'll come to that.)

So you put it off.

I'd been upgrading the rest of my system for a while and living with a slightly out-of-date kernel, but then I started getting warnings that key features of the system needed a more recent kernel. Specifically, the udev sub-system, which takes care of dynamic device management, needed to have a very recent kernel. I built and installed the linux 2.6.31 kernel, and rebooted the machine.

I tried to connect to it after the reboot, and as I'd sort of expected, no joy. After the routine of humping the 19" CRT monitor up the stairs, I could see that the failure to boot was caused by a kernel "panic" (don't you love it?)... something to do with VFS... cannot open root device "hda3" or unknown block (2,0) - great eh? (So just for the record, when we say Linux is for "amateurs", we mean this literally!) My first thought was that I had failed to compile in kernel support for the file system of the boot partition, but no, that was fine. It turned out that with recent kernels, disks aren't called hda1, hda2 etc., but sda1, and so forth. Who knew? So I had to edit my boot configuration (grub.conf) to account for this change, and at the same time edit /etc/fstab to mirror the same changes. This was scary, because if the system hadn't come up this time, I'd have had a machine that wouldn't boot from either the old or the new kernel, and I'd have been fishing around with a livecd boot and a chroot shell (give me strength!).

Still - nothing to lose, and everything to gain, I tried it and it worked. I now have a working system again. (Kudos to NeddySeagoon of #gentoo, whose technical advice got me through with surprisingly little trauma.)

Then yesterday, I decided for a rare treat to lash out 10 euros on the March edition of Linux Journal. In the letters page there's some person called George banging on about how in the aforementioned letters page: "more often than not there is an end user who knocks Linux as being for 'computer specialists' and not ready for the mainstream". George finds this attitude unfortunate. News flash, George: It's not the attitude that's unfortunate, but the facts behind it. [And before anyone says Gentoo Linux is a masochist's distro (or whatever), the folks using Ubuntu have had exactly the same problems with hda/sda.]

Sure, there are Linux distros that can work pretty nicely for normal end users. Unfortunately for the rhetoric, the only normal people using Linux aren't well.. normal. That simple choice sets them apart. Normal people just go out and pay the fifty quid extra (I'm guessing) for an OEM license when they buy their computer, and just run Windows. Ironically, because most of those people aren't actually upgrading, one of the things they are paying for is an incredible upgrade experience.

What am I saying? OK - it isn't exactly abnormal to service your own car, or fix your own dishwasher, but it isn't mainstream. Neither is Linux. These days, you can't service your own car even if you want to, because instead of a distributor it's got some slab of solid-state mystery. At least with Linux, if you're daft enough, you can read the source code of the disk device drivers in the kernel. Good luck though. 

Anyway - for this amateur at least, no need to drag the monitor upstairs for another few months. I hope.

 

Document Actions
Add comment

You can add a comment by filling out the form below. Plain text formatting.

(Required)
Tell us your name.
(Required)
Enter your e-mail address.
(Required)
(Required)