Adrian Robertson wrote:

Jamie Dobbs wrote:

Hi

Can anyone point me to a simple howto on upgrading from Kernel 2.4.25 to
a 2.6 Kernel on Debian. I have attempted this in the past without any
success and would appreciate any help that I can find!

cheers

Jamie




The easy way is to use a Debian kernel image
'apt-cache search kernel image | grep 2.6' select the appropriate image then apt-get install it.
You will need to include a initrd statement in your bootloader.
In lilo it would look like this:
image=/vmlinuz
initrd=/initrd.img
label=Linux
read-only


Adrian


I know that's what most of the installers do, but I recommend that you keep the boot stuff together in the /boot directory, and then address them directly in the lilo/grub.conf. The files should also identity the kernel you're using.

I've just noticed my mailserver's at 2.4.20, so here's a log of the update

1. vi /etc/lilo.conf...

Near the top...

Default=Linux

image=/vmlinux
  label=Linux

Now reads...
Default=Linux-2.4

image=/boot/vmlinux-2.4.20-bf2.4
  label=Linux-2.4

( I was going to copy /vmlinux to /boot/vmlinux..., but the file already existed. )

run lilo, and make sure there are no error messages.

Reboot, and make sure it boots up on this kernel
(if there was an initrd file, then I would have copied it to/checked for the existance of /boot/initrd-2.4.25.img and modified that bit of lilo.conf as well. )


Then modify your lilo/grub.conf to that it boots these by default.
Reboot...! Make sure they work before you start.

Upgrade the kernel.
apt-get install kernel-image-2.6.7-1-686 kernel-headers-2.6.7-1 module-init-tools ( I had to use the 386 kernel as it's a VIA chip on this server )


This added a few more modules to the list, then told me I had to download 17MB of stuff...

Some time later...
I got a message during the install, asking me whether I wanted to stop, as lilo.conf needs to be updated. Reply No ( not the default ) to this.
Then do I want to make a symbolic link to /initrd... No way!
Install a boot block using the old lilo.conf... No
Throw away the current lilo.conf and install an new one? NO!


I now have files vmlinuz-2.6.7-1-i386 and initrd.img-2.6.7-1-i386 in /boot.

I'll now add a new block into /etc/lilo.conf, which is not the default boot block

The relevant bit of /etc/lilo.conf now reads...

default=Linux-2.4.20


image=/boot/vmlinuz-2.4.20-bf2.4
label=Linux-2.4.20
read-only


image=/boot/vmlinuz-2.6.7-1-386
initrd=/boot/initrd.img-2.6.7-1-386
label=Linux-2.6.7
read-only


run lilo
A * should come up against Linux-2.4.20 ( 25 in your case ), indicating it's the default, and no errors should occur. It should say it's added your Linux-2.6.7 definition.


Now's the acid test. Reboot time...!

As soon as the lilo prompt appears on the screen, press the shift key. Use the arrow keys to select the Linux-2.6.7 kernel from the list and hit return. If you're lucky, then the default kernel will work.

I'm glad to say, it did for me!

Grub will be slightly different, but the only fundamental difference is that there is no 'grub' command equivalent to 'lilo' to write the bootstrap changes to disk.

Hope this is of some use to you.

Cheers,


Steve



Reply via email to