Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
How to install safely a new Kernel
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Other Things Gentoo
View previous topic :: View next topic  
Author Message
nickp
n00b
n00b


Joined: 03 Feb 2003
Posts: 52

PostPosted: Tue Feb 04, 2003 3:48 pm    Post subject: How to install safely a new Kernel Reply with quote

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
View user's profile Send private message
rtn
Guru
Guru


Joined: 15 Nov 2002
Posts: 427

PostPosted: Tue Feb 04, 2003 3:56 pm    Post subject: Reply with quote

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
View user's profile Send private message
-JeaN-
Apprentice
Apprentice


Joined: 25 Nov 2002
Posts: 211
Location: PaRiS :D

PostPosted: Tue Feb 04, 2003 3:57 pm    Post subject: Reply with quote

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
View user's profile Send private message
nickp
n00b
n00b


Joined: 03 Feb 2003
Posts: 52

PostPosted: Tue Feb 04, 2003 4:23 pm    Post subject: new Kernel Reply with quote

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
View user's profile Send private message
rtn
Guru
Guru


Joined: 15 Nov 2002
Posts: 427

PostPosted: Tue Feb 04, 2003 4:26 pm    Post subject: Re: new Kernel Reply with quote

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
View user's profile Send private message
nickp
n00b
n00b


Joined: 03 Feb 2003
Posts: 52

PostPosted: Tue Feb 04, 2003 5:47 pm    Post subject: install rebuild modules Reply with quote

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
View user's profile Send private message
rtn
Guru
Guru


Joined: 15 Nov 2002
Posts: 427

PostPosted: Tue Feb 04, 2003 5:57 pm    Post subject: Reply with quote

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
View user's profile Send private message
pjp
Administrator
Administrator


Joined: 16 Apr 2002
Posts: 20067

PostPosted: Tue Feb 04, 2003 6:34 pm    Post subject: Reply with quote

Moved from Installing Gentoo.
_________________
Quis separabit? Quo animo?
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Other Things Gentoo All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum