Bisecting a linux kernel

Categories: Linux

I recently tried to use the S-video out port of my laptop for the very first time, to play video on a TV. While it did work, there was a fair bit of ugly flickering.

Well, I thought, why not update to the latest Linux kernel and see if things are better. Not so much - in fact, graphics didn’t work at all. Looks like I’ll have to do a “git bisect” and find the responsible patch.

Unfortunately, google turned up some rather unhelpful pages. There is plenty of good information about doing the “git bisect” part itself, but none about how to efficiently install the resulting kernel.

This page from Debian recommends using fakeroot+dpkg+update-initramfs. This one from Ubuntu recommends a similar procedure.

Using the package-manager to install a kernel is appropriate for a kernel that is going to be used for a long time. For one that is going to be discarded on the very next bisect step, it is vastly overcomplicated and unnecessarily slow.

Simply using “make modules_install; make install” in the linux build dir is far better than the advice from debian or ubuntu - but still can be improved on.

After some experimenting, I came up with a reasonably low-overhead way of installing “temporary” kernels, which I have documented here.

There may be better ways, but if so I can’t find them with Google..