View previous topic :: View next topic |
Author |
Message |
mattsavigear Apprentice
Joined: 08 Jan 2003 Posts: 224 Location: Wales, UK
|
Posted: Mon Mar 24, 2003 10:45 pm Post subject: Changing kernel sources |
|
|
I'm considering dropping my vanilla-sources kernel and trying a gentoo-sources one instead. This has popped up a few questions:
1. It it best to unmerge vanilla-sources before emerging gentoo-sources?
2. What happens if I don't unmerge vanilla? Will I get 2 directories, with the 'linux' link pointing to the last one I emerged?
3. If I copy .config out of the source directory and copy it back in for the new kernel sources, will it still work? I understand that I'll need to trawl through and look for other changes to the config menus, but will it retain the settings I have used to date? I'd hate to have to remember them or write them out.
I have a feeling I need to look into having multiple kernel versions installed as well - in case the new one fails - but I'll see what docs I can find on that before taking up people's time.
TIA... _________________ Matt.
"Ninjas aren't dangerous. They're more afraid of you than you are of them." - The Tick. |
|
Back to top |
|
|
bsolar Bodhisattva
Joined: 12 Jan 2003 Posts: 2764
|
Posted: Mon Mar 24, 2003 11:02 pm Post subject: Re: Changing kernel sources |
|
|
mattsavigear wrote: | I'm considering dropping my vanilla-sources kernel and trying a gentoo-sources one instead. This has popped up a few questions:
1. It it best to unmerge vanilla-sources before emerging gentoo-sources? |
There are no problems in keeping the old kernel. Actually if you keep it you are sure to have a working kernel if the new one won't work.
Quote: | 2. What happens if I don't unmerge vanilla? Will I get 2 directories, with the 'linux' link pointing to the last one I emerged? |
You'll get the two directories, but I think the symlink will still point to the old kernel. You can remove it and create a new one pointing to the new kernel. It's used mainly by packages like alsa-driver or xfree-drm, that need to install kernel modules.
Quote: | 3. If I copy .config out of the source directory and copy it back in for the new kernel sources, will it still work? I understand that I'll need to trawl through and look for other changes to the config menus, but will it retain the settings I have used to date? I'd hate to have to remember them or write them out. |
It might work but I suggest you to review the kernel configuration in menuconfig since i.e. you might miss some new features[/quote]
Quote: | I have a feeling I need to look into having multiple kernel versions installed as well - in case the new one fails - but I'll see what docs I can find on that before taking up people's time.
TIA... |
To have multiple kernels, just copy it in /boot under a different name, i.e. bzImage-gentoo, being bzImage the old vanilla kernel. Then add an entry in your bootloader specifiying the different bzImage name. _________________ I may not agree with what you say, but I'll defend to the death your right to say it. |
|
Back to top |
|
|
mattsavigear Apprentice
Joined: 08 Jan 2003 Posts: 224 Location: Wales, UK
|
Posted: Mon Mar 24, 2003 11:09 pm Post subject: |
|
|
Thanks for that, looks like it could be a good experiment. As a follow up question:
When I used to use RedHat, new kernels created new directories under /lib/modules to store the compiled modules (it was automated in the make scripts somewhere I think). Different kernels could not use modules compiled at a different time. Therefore, do I need to specify some place to store the modules created during compilation in order to have access to the _old_ ones should I need to boot under the old kernel? _________________ Matt.
"Ninjas aren't dangerous. They're more afraid of you than you are of them." - The Tick. |
|
Back to top |
|
|
Carlos Guru
Joined: 07 Aug 2002 Posts: 458 Location: Providence, RI
|
Posted: Tue Mar 25, 2003 2:14 am Post subject: |
|
|
mattsavigear wrote: | Therefore, do I need to specify some place to store the modules created during compilation in order to have access to the _old_ ones should I need to boot under the old kernel? | Nope; no need. When you "make modules_install", the modules automatically get put in /lib/modules/kernel_release, and whenever you boot with the corresponding kernel you'll be able to use the modules you compiled for it. _________________ Man must shape his tools lest they shape him. |
|
Back to top |
|
|
Jimboberella Guru
Joined: 19 Jun 2002 Posts: 358 Location: Brisbane/Australia
|
Posted: Tue Mar 25, 2003 4:07 am Post subject: |
|
|
Except for ALSA and Nvidia modules (and perhaps lm_sensors) I have found so far they require rebuilding (I (re)run emerge) after a kernel source change/rebuild.
So i make the new kernel and modules, move bzImage to /boot. reboot and then re emerge nvidia lm_sensors and alsa, reboot and it all works again. |
|
Back to top |
|
|
mattsavigear Apprentice
Joined: 08 Jan 2003 Posts: 224 Location: Wales, UK
|
Posted: Tue Mar 25, 2003 8:24 am Post subject: |
|
|
Ahh, excellent. I love it when a system makes things easy! Thanks for your help folks. Time to get downloading... _________________ Matt.
"Ninjas aren't dangerous. They're more afraid of you than you are of them." - The Tick. |
|
Back to top |
|
|
Regor Guru
Joined: 06 Aug 2002 Posts: 545 Location: 39° 2' 48" N, 120° 59' 2" W
|
Posted: Tue Mar 25, 2003 10:02 am Post subject: Re: Changing kernel sources |
|
|
mattsavigear wrote: | 3. If I copy .config out of the source directory and copy it back in for the new kernel sources, will it still work? I understand that I'll need to trawl through and look for other changes to the config menus, but will it retain the settings I have used to date? I'd hate to have to remember them or write them out. |
There is a built-in easy way to deal with this. Copy .config from the old kernel directory to the new one and "make oldconfig". All your current settings will be kept and it will only ask you about things that are different between the two kernels. This way you don't miss new options and drivers. _________________ Sometimes the appropriate response to reality is to go insane.
-Philip K. Dick, Valis |
|
Back to top |
|
|
mattsavigear Apprentice
Joined: 08 Jan 2003 Posts: 224 Location: Wales, UK
|
Posted: Tue Mar 25, 2003 10:15 am Post subject: Re: Changing kernel sources |
|
|
Regor wrote: | There is a built-in easy way to deal with this. Copy .config from the old kernel directory to the new one and "make oldconfig". All your current settings will be kept and it will only ask you about things that are different between the two kernels. This way you don't miss new options and drivers. |
Gah! I just built one, but your trick just showed me some more things I missed. I'll "make mrproper" go again! Thanks. _________________ Matt.
"Ninjas aren't dangerous. They're more afraid of you than you are of them." - The Tick. |
|
Back to top |
|
|
|