You are not logged in.

#1 2008-10-19 20:12:47

Xyne
Administrator/PM
Registered: 2008-08-03
Posts: 6,965
Website

Kernel images

This is another one of those questions which shows how much of a linuxnoob I am. big_smile

My understanding of kernel compilation is that it generates a kernel image and that this is what the system loads to run. When updating the kernel with pacman, the primary and backup images are rebuilt and replaced. How could I create a third image that wouldn't get updated automatically? My idea is to have a second backup that I will update manually after I'm sure that the latest kernel is stable on my system.

If I've misunderstood something, please let me know what. Thanks.


My Arch Linux StuffForum EtiquetteCommunity Ethos - Arch is not for everyone

Offline

#2 2008-10-19 20:49:15

Jack B
Member
Registered: 2006-06-27
Posts: 107
Website

Re: Kernel images

It's a bit more complicated than that I'm afraid.

The kernel comes pre-compiled, you do not compile it.  The kernel comes in sections, not all of which are needed for all types of hardware.  The core components are always needed, then other sections, called modules, are loaded as necessary.  Some of these modules are needed to read the hard drive, to load modules, which presents a slight problem.  To get arround this problem, these modules are loaded into a special compressed image, which is loaded with the kernel's core components at the beginning of boot.
This mkinitcpio image is the one you see being built when pacman upgrades to a new kernel.  Unfortunatly there is no point keeping the old image when you upgrade to the new kernel, as they will not work together.

If you want to have a backup when upgrading your kernel, you will need a completly separate kernel package. 
Pacman can keep track of two kernels, as long as they have diffrent package names.  If you try to install two diffrent versions of the standard arch package, say kernel26 2.6.27.1 and 2.6.26.5, then pacman will remove the older one in favour of the new one.  You will have to create a different package, called kernel26-xyne, and make sure it doesn't conflict with the standard package anywhere.

The easiest way of doing so is to use ABS to get the PKGBUILD for the standard kernel, and modify the $Localversion, then compile and install the new package.  You could then keep this known-good package as a backup kernel.

More reading on Mkinitcpio: http://wiki.archlinux.org/index.php/Mkinitcpio or type "man mkinitcpio" in a terminal

HTH
Jack


Edit: I've just reaised how complicated that would sound to someone who's not used to messing with the boot process.  It really isn't too bad, maybe someone will come and explain better...

Last edited by Jack B (2008-10-19 20:52:41)

Offline

#3 2008-10-19 20:51:38

Kooothor
Member
From: Paname
Registered: 2008-08-02
Posts: 228

Re: Kernel images

What if you build your kernel and put it in /boot/ and then edit your /boot/grub/menu.lst to have it as an option at boot time ?


ktr

Offline

#4 2008-10-19 21:06:49

Xyne
Administrator/PM
Registered: 2008-08-03
Posts: 6,965
Website

Re: Kernel images

Thanks for the explanation, Jack B. It sounds fairly straight-forward actually. I'll try that as soon as a I have some extra time to fiddle with it.

Also, I should have said "build" instead of "compile".


My Arch Linux StuffForum EtiquetteCommunity Ethos - Arch is not for everyone

Offline

Board footer

Powered by FluxBB