View previous topic :: View next topic |
Author |
Message |
nickp n00b
Joined: 03 Feb 2003 Posts: 52
|
Posted: Tue Feb 04, 2003 3:48 pm Post subject: How to install safely a new Kernel |
|
|
Hi
I think about compiling and installing a new kernel. What is the best way
to get started. I know how to compile and install a kernel but this time I do
not just want to override the existing kernel - want to keep my current system (kernel) and
in addition to that I want to have my new ( test ) kernel installed so that at boot
time ( GRUB) I can decide which kernel will be used to start the system.
I also would like to have the opportunity to run X ( with the nvidia driver) under whatever Kernel.
Thanks for any help
Nick |
|
Back to top |
|
|
rtn Guru
Joined: 15 Nov 2002 Posts: 427
|
Posted: Tue Feb 04, 2003 3:56 pm Post subject: |
|
|
You can just create a new stanza in your grub.conf for the new kernel.
You can maintain as many entries in the grub.conf as you want (I assume,
never really tried more then 5...)
Code: | title=gentoo
root (hd0,2)
kernel /boot/bzImage root=/dev/hda6
title=gentoo.old
root (hd0,2)
kernel /boot/bzImage.old root=/dev/hda6
title=gentoo 2.4.20 vanilla
root (hd0,2)
kernel /boot/bzImage-2.4.20 root=/dev/hda6
|
I've found it's always a good idea to backup a kernel that you know works
well, so it makes recovery from a broken kernel build MUCH easier.
--rtn |
|
Back to top |
|
|
-JeaN- Apprentice
Joined: 25 Nov 2002 Posts: 211 Location: PaRiS :D
|
Posted: Tue Feb 04, 2003 3:57 pm Post subject: |
|
|
Hello nickp,
I think it would be possible to compile your kernel, then rename the bzImage you obtained to bzImage_test, copy it on your boot folder/partition and do this in your grub.conf : ( assuming you provide the good name and drives number, but if you have a working boot you could just copy paste it to make it double )
Code: | title=Your working kernel
root (hd0,0)
kernel /boot/bzImage root=/dev/hda3
title=Your test kernel
root (hd0,0)
kernel /boot/bzImage_test root=/dev/hda3 |
|
|
Back to top |
|
|
nickp n00b
Joined: 03 Feb 2003 Posts: 52
|
Posted: Tue Feb 04, 2003 4:23 pm Post subject: new Kernel |
|
|
Hi.
thanks for all you answers but what do I need to do with the modules?
How can I make sure that the new Kenrel uses the "new" modules?
Thanks
Nick |
|
Back to top |
|
|
rtn Guru
Joined: 15 Nov 2002 Posts: 427
|
Posted: Tue Feb 04, 2003 4:26 pm Post subject: Re: new Kernel |
|
|
nickp wrote: | Hi.
thanks for all you answers but what do I need to do with the modules?
How can I make sure that the new Kenrel uses the "new" modules?
Thanks
Nick |
If the kernel version is different, there will be different subdirs under /lib/modules
for each kernel version.
If the kernel version ISN'T different, then if you do a make modules_install from
your kernel src dir, it will overwrite your old modules.
It should also be noted that if you're using packages other then the kernel
that install kernel modules, you will almost certainly have to rebuild them
when you install a new kernel. nvidia-kernel comes to mind...
--rtn |
|
Back to top |
|
|
nickp n00b
Joined: 03 Feb 2003 Posts: 52
|
Posted: Tue Feb 04, 2003 5:47 pm Post subject: install rebuild modules |
|
|
Hi
where will the rebuilt modules be stored. for example the nvidia
modules:
Lets assume there are two kernel versions installed this means there will be two /lib/module directories - right?
the nvidia mudules are already setup and installed for my old kernel.
would that mean if I booted the system with the new kernel and
configure and make install the nvidia driver the modules would
be stored in the /lib/module/new kernel directory so that it does
not affect the old kernel modules at all? Does that mean what ever
Kernel I use to boot my system - the system woul pick the right modules from what ever /lib/modules directory?
Thanks
Nick |
|
Back to top |
|
|
rtn Guru
Joined: 15 Nov 2002 Posts: 427
|
Posted: Tue Feb 04, 2003 5:57 pm Post subject: |
|
|
The kernel will load modules from /lib/modules/kernel_version_name, where
kernel_version_name is the output of `uname -r`. For example, if you were
running gentoo-sources-2.4.19-r10, then your module directory would be
/lib/modules/2.4.19-gentoo-r10.
If you were to emerge nvidia-kernel, it would install the NVdriver module into
that directory. However, if you use autoclean with emerge, it would remove
the old module from the previous kernel module path.
--rtn |
|
Back to top |
|
|
pjp Administrator
Joined: 16 Apr 2002 Posts: 20067
|
Posted: Tue Feb 04, 2003 6:34 pm Post subject: |
|
|
Moved from Installing Gentoo. _________________ Quis separabit? Quo animo? |
|
Back to top |
|
|
|