[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Kernel Upgrade?

On Sunday 30 January 2005 16:18, Max wrote:
> Dear All,
> Is it possible to change the Linux kernel in a Debian installation without
> having to do a complete reinstall?

You can easily upgrade the kernel without reinstalling the whole operating 
system - a very common thing to do. I don't know what version of Debian you 
are using, but if you do;

apt-get update
apt-cache search kernel-source

you will get a list of 'debian-ified' kernels. Choose which one you want (if 
your after functionality go for a 2.6.x...) and do

apt-get install kernel-source-2.6.xx

This will install the kernel SOURCE into /usr/src

Install 'quick steps' (as root), make sure you have mkinitrd tools installed, 
and if you want to use your Knoppix config, find it and put it in /tmp. I 
would suggest you don't use this as it compiles modules for all sorts you 
probably don't need. A better solution would be to use the config when you 
first installed Debian, which is in /boot/config-x.xx.xx. Also, this assumes 
a 2.6 kernel;

cd /usr/src
tar xjvf kernel-source-2.6.xx
ln -s kernel-source-2.6.xx linux
cd linux

make mrproper
cp /boot/config-2.xx.xx .config (or your knoppix one?)
make menuconfig (add/delete modules etc then save & exit)
make modules_install
cd /boot
cp /usr/src/linux/arch/i386/boot/bzImage linuz-2.6.xx
cp /usr/src/linuz/System.map System.map-2.6.xx

The 'make modules_install' will place your modules into /lib/modules/2.6.xx

mkinitrd -o initrd.img-2.6.xx 2.6.xx 

Note the space before the last '2.6.xx'. This is looking at 
the /lib/modules/2.6.xx dir created earlier

Next you need to update your boot manager (I only know grub - if using lilo 
then maybe someone else can help)

edit /boot/grub/menu.lst and add the required fields, something similar to 
this, but every setup maybe different, read up on grub if required;

title           Debian GNU/Linux, kernel 2.6.xx
root            (hd0,1)
kernel          /boot/vmlinuz-2.6.xx root=/dev/hda2 ro
initrd          /boot/initrd.img-2.6.xx

Good look

> I have e version ok Knoppix to hand so I'm feeling quite brave.  I read a
> vague report that the kernel is just an ordinary file in some specific
> location, and it's possible to copy the old kernel to a backup directory
> for safe keeping, put a new kernel in said specific location, reboot and
> presto!
> Finally, is there anything I should be aware of before changing the
> kernel?  The only reason prompting me to change the kernel is that I have
> a bit of software the documentation of which states that the kernel should
> be v2.4 or later.  For instance, does a change in kernel usually go hand
> in hand with changing some other part of a system?
> Regards,
> --
> Muggles


Reply to: