Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Recompile 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
thanksforfish
n00b
n00b


Joined: 24 Aug 2002
Posts: 29
Location: UK

PostPosted: Sun Aug 25, 2002 7:30 am    Post subject: Recompile Kernel Reply with quote

Hi - I would like to recompile my kernel. I have recently "emerge --update system" so I assume this means I will have the latest kernel sources. Can I recompile from within x (and mount /boot) or do I need to reboot from cd ?
I am planning to use the instructions from the install guide :

# cd /usr/src/linux
# make menuconfig
# make dep && make clean bzImage modules modules_install
# mv /boot/bzImage /boot/bzImage.orig [if bzImage already exists]
# cp /usr/src/linux/arch/i386/boot/bzImage /boot

is this allright - will menuconfig still have my originally selected options ?

Sorry if these are basic questions - thanks for any help.
Back to top
View user's profile Send private message
rac
Bodhisattva
Bodhisattva


Joined: 30 May 2002
Posts: 6553
Location: Japanifornia

PostPosted: Sun Aug 25, 2002 7:43 am    Post subject: Re: Recompile Kernel Reply with quote

thanksforfish wrote:
Can I recompile from within x (and mount /boot) or do I need to reboot from cd ?

Yes and no. No need to reboot from cd.

Quote:
will menuconfig still have my originally selected options ?

What exactly do you mean here? When you exit "make menuconfig", it gives you the option to save the settings you have chosen. If you say yes, it will overwrite your previous choices in the file /usr/src/linux/.config. If you then run "make menuconfig" again, it will use your previous choices in .config as a starting point. I hope this answers what you want to know.
_________________
For every higher wall, there is a taller ladder
Back to top
View user's profile Send private message
thanksforfish
n00b
n00b


Joined: 24 Aug 2002
Posts: 29
Location: UK

PostPosted: Sun Aug 25, 2002 7:51 am    Post subject: Reply with quote

Thanks very much for your reply, it does indeed answer my question. Yes I did mean "does menuconfig use your last config as a starting point".
Cheers. :)
Back to top
View user's profile Send private message
mksoft
l33t
l33t


Joined: 28 May 2002
Posts: 844

PostPosted: Sun Aug 25, 2002 10:01 am    Post subject: Reply with quote

Just make sure you're removing the old modules dir out of the way beofre running make modules_install.
_________________
There's someone in my head but it's not me - Pink Floyd
Back to top
View user's profile Send private message
thanksforfish
n00b
n00b


Joined: 24 Aug 2002
Posts: 29
Location: UK

PostPosted: Sun Aug 25, 2002 1:26 pm    Post subject: Reply with quote

Sorry - how do I remove old modules dir ?
Back to top
View user's profile Send private message
mksoft
l33t
l33t


Joined: 28 May 2002
Posts: 844

PostPosted: Sun Aug 25, 2002 1:39 pm    Post subject: Reply with quote

thanksforfish wrote:
Sorry - how do I remove old modules dir ?


Each kernel's modules are installed under /lib/modules/_kernel_version.
e.g my kernel is 2.4.19-gentoo-r7, so the directory will be named:
/lib/modules/2.4.19-gentoo-r7

If you're recompiling a previousley compiled and installed kernel, installing it to the same directory may lead to unresloved symbols in modules. So we move the dir to a backup dir before making modules_install so for example to move my old modules dir out of the way I wouldv'e done:
Code:
 mv /lib/modules/2.4.19-gentoo-r7 /lib/modules/2.4.19-gentoo-r7.bak


After installing the modules and making sure everything is OK, you can remove the backup dir.

Don't forget after reboot to recompile external kernel modules if you use them (e.g: vmware, alsa and nvidia's drivers).
_________________
There's someone in my head but it's not me - Pink Floyd
Back to top
View user's profile Send private message
thanksforfish
n00b
n00b


Joined: 24 Aug 2002
Posts: 29
Location: UK

PostPosted: Sun Aug 25, 2002 3:47 pm    Post subject: Reply with quote

Great - thank you.
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