Kernel and Eyes

Whee! I’ve finally got this blasted 2.6.14-ck7 kernel working, without having to bugger about with an initrd.

The last time I tried to install kernel 2.6.14, I ran into difficulties when my usual method of configuring it was foiled. Generally I start with the .config file used in the default Arch Linux kernel, then run ‘make menuconfig’ to customise the kernel. This method allows me to make a few small changes (optimising for Pentium4 instead of i686, removing PC internal speaker support, etc) without having to go through the tiresome business of actually working out exactly which drivers I need, which options I need to select, and so on.

Unfortunately, as of Kernel 2.6.14, Arch has stopped compiling IDE drivers into the main kernel (they’re now compiled as modules) and using an initrd to get the system booted. While this does have some advantages, particularly from the point of view of the package maintainers (no need for separate IDE and SCSI kernels, for example), it means that those of us compiling custom kernels will have to either compile in the required modules for our hard disks, IDE chipsets and so on, or put together our own custom initrds.

When I tried this a few weeks ago, it led to several hours of compiling kernels that then wouldn’t boot (since there was some crucial driver required to get at the hard disk that I’d left out) and (briefly) trying to create an initrd, which then didn’t work. Eventually I realised I would need to either figure out what IDE chipset I was using or compile all of them into the kernel (which struck me as a clumsy, inelegant, brute-force approach) and, since it was gone 3am by that point, I gave up.

However, yesterday, I remembered Arch’s wonderful ‘hwd’ program. This is probably the coolest hardware auto-detection program there is. Rather than scanning your hardware and configuring it for you, it scans your hardware, then tells you what it is and how to configure it yourself by hand. I downloaded and installed this program, which was immediately able to tell me that I needed the ‘sis5513’ driver for my IDE bus. Compiling this driver into the kernel (along with a few others that I had already identified) then produced a kernel that worked just fine, with no need to bugger about with an initrd.

On a totally unrelated note, I had an eye test today, and for the first time ever, my vision has actually improved. I am apparently less short-sighted than I was two years ago.

I must try having eye tests more often. The new optician at Boots is a very nice lady indeed.

2 Comments

  1. Fortunately in Debian this is reasonably simple as there’s a rather useful script which runs hwdetect and then builds an initrd with the right modules in it. There’s also the option of sticking a list of modules you want into a config file and using that to autogenerate one.

  2. Arch has a script that is theoretically supposed to do that, too. But the initrd it generated didn’t work for me for some reason. Probably with a bit of tweaking it could have been persuaded to work properly, but as I can’t see any real advantage to me in using an initrd, I was more keen to get the right drivers into the kernel.

    As for listing the required modules in the config file, that’s all very well if you know which modules they are. But I was no more able to specify which modules were missing in mkinitrd.conf than I was in the kernel config.

Leave a Reply

Your email address will not be published.