View previous topic :: View next topic |
Author |
Message |
thanksforfish n00b
Joined: 24 Aug 2002 Posts: 29 Location: UK
|
Posted: Sun Aug 25, 2002 7:30 am Post subject: Recompile Kernel |
|
|
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 |
|
|
rac Bodhisattva
Joined: 30 May 2002 Posts: 6553 Location: Japanifornia
|
Posted: Sun Aug 25, 2002 7:43 am Post subject: Re: Recompile Kernel |
|
|
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 |
|
|
thanksforfish n00b
Joined: 24 Aug 2002 Posts: 29 Location: UK
|
Posted: Sun Aug 25, 2002 7:51 am Post subject: |
|
|
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 |
|
|
mksoft l33t
Joined: 28 May 2002 Posts: 844
|
Posted: Sun Aug 25, 2002 10:01 am Post subject: |
|
|
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 |
|
|
thanksforfish n00b
Joined: 24 Aug 2002 Posts: 29 Location: UK
|
Posted: Sun Aug 25, 2002 1:26 pm Post subject: |
|
|
Sorry - how do I remove old modules dir ? |
|
Back to top |
|
|
mksoft l33t
Joined: 28 May 2002 Posts: 844
|
Posted: Sun Aug 25, 2002 1:39 pm Post subject: |
|
|
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 |
|
|
thanksforfish n00b
Joined: 24 Aug 2002 Posts: 29 Location: UK
|
Posted: Sun Aug 25, 2002 3:47 pm Post subject: |
|
|
Great - thank you. |
|
Back to top |
|
|
|