[dundee] Taaylug Weekly Articles 16 - OSBC

Andrew Clayton andrew at digital-domain.net
Mon Mar 31 15:37:45 BST 2008


On Sat, 29 Mar 2008 08:21:28 +0000, Arron M Finnon wrote:

> good call, andrew
> 
> Not being the most experienced of users and stability being a main
> issue, as this is the only computer i have and i need to use it for
> Uni, any chance you could write a howto, to best implement it
> 
> you can post it on the Linux Society or i'm sure Gordon would be happy
> to host it too.  Not too worry if you can't it was just an idea, i'm
> sure loads on here would love to help

OK, well, here's the basics.

Find somewhere to do the work (I have /scratch/src/)
(non git method, tarballs and patches)

Latest versions can be found from www.eu.kernel.org (currently you won't see a link for 2.6.26 seeing as there is a 2.6.24.4 patch. But the stable tree's are always linux-2.6.x.tar.bz2 from the same location as the 2.6.x.y patch).

$ cd /scratch/src
# Get the current stable kernel
$ wget http://www.eu.kernel.org/pub/linux/kernel/v2.6/linux-2.6.24.tar.bz2
# Get the latest rc release
$ wget http://www.eu.kernel.org/pub/linux/kernel/v2.6/testing/patch-2.6.25-rc7.bz2
# Get the last git snapshot
$ wget http://www.eu.kernel.org/pub/linux/kernel/v2.6/snapshots/patch-2.6.25-rc7-git6.bz2
$ tar -xvjf linux-2.6.24.tar.bz2
# I normally rename the directory to linux-2.6
$ mv linux-2.6.24 linux-2.6
# Apply the rc and git snapshot patches
$ cd linux-2.6
$ bzcat ../patch-2.6.25-rc7.bz2 | patch -p1
$ bzcat ../patch-2.6.25-rc7-git6.bz2 | patch -p1

You should now have a clean 2.6.25-rc7-git6 tree.

If you've never done a kernel configuration before then this could be pretty daunting. Fortunately for me I've been doing this since 1.2.x days and have kept pace with the increase in options.

Maybe the best advice is to run a make defconfig to get a default kernel configuration for your architecture, you can then tweak this with make menuconfig or one of the GUI configurators  

I don't use modules so for me it's simply bring forward my oldconfig and build the kernel
$ make oldconfig #answering y/n to any questions
$ make
$ cp arch/x86/boot/bzImage /boot/vmlinuz-2.6.25-rc7-git6 # I have write access to /boot 
$ sudo vi /etc/grub.conf

If your starting from scratch then you may do something like
$ make defconfig
# optionally 
$ make menuconfig

# Build kernel and modules
$ make

# make help for a list of all options.

# As root (unless you setup permissions right)
# If you have modules
# make modules_install

# copy the kernel image into /boot
# cp arch/$ARCH/boot/bzImage /boot/vmlinuz-2.6.25-rc7-git6

# You may need to build an initrd
# mkinitrd /boot/initrd-2.6.25-rc7-git6 2.6.25-rc7-git6
# vi /etc/grub.conf

There is a make install option (not tried) that may put the kernel image into the right place edit grub.conf and create an initrd.


If all that was successful then you want to try another version of the kernel. say 2.6.25-rc8 (when it's out)

$ cd /scratch/src 
$ wget http://www.eu.kernel.org/pub/linux/kernel/v2.6/testing/patch-2.6.25-rc8.bz2
$ cd linux-2.6
$ bzcat ../patch-2.6.25-rc7-git6.bz2 | patch -R -p1
$ bzcat ../patch-2.6.25-rc7.bz2 | patch -R -p1
$ bzcat ../patch-2.6.25-rc8.bz2 | patch -p1
$ make oldconfig
$ make
and so on.

I believe there are scripts which will do a lot of this kernel fetching and patching for you, ketchup? perhaps.


Andrew



More information about the dundee mailing list