View previous topic :: View next topic |
Author |
Message |
Ric95 Tux's lil' helper
Joined: 10 Apr 2007 Posts: 94 Location: Alberta Can.
|
Posted: Sun Feb 22, 2009 10:41 pm Post subject: Grub -> 2 kernel choices in one install? |
|
|
I'm having fun thrashing my computer:: I'm sure it now hates me
I used genkernel to compile a kernel with some mild optimizations (AMD64 march=native) and I want to rename the kernal and install it in /boot beside the generic kernel. Then enter the option in menu.lst or grub.conf.
What problems would this cause?
Will apps compiled with the optimized kernel still run on the generic kernel? |
|
Back to top |
|
|
alex.blackbit Advocate
Joined: 26 Jul 2005 Posts: 2397
|
Posted: Sun Feb 22, 2009 11:02 pm Post subject: |
|
|
there are only a few packages that are built directly against the kernel and do only work on one particular image, like virtualbox-modules, vmware-modules, kqemu.
emerge -p @module-rebuild (needs portage-2.2) and module-rebuild help you out here. |
|
Back to top |
|
|
NeddySeagoon Administrator
Joined: 05 Jul 2003 Posts: 54234 Location: 56N 3W
|
Posted: Sun Feb 22, 2009 11:22 pm Post subject: |
|
|
Ric95,
This is best done with kernels that have different names as shown by uname -r.
This ensures their modules are kept apart, since modules go in /lib/modules/`uname -r`/...
If you want to use the same kernel version for several kernels like this, make a copy of the entire tree then edit the Makefile.
At the top you will find Code: | VERSION = 2
PATCHLEVEL = 6
SUBLEVEL = 28
EXTRAVERSION = -gentoo | change the EXTRAVERSION to change the uname -r of the resulting kernel.
This will allow you to have a module built in in one version and modular in another without either losing functionality or getting strange error messages.
You must build your out of kernel modules against each kernel ... point the linux symlink to it.
Everything else will be ok _________________ Regards,
NeddySeagoon
Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail. |
|
Back to top |
|
|
Gef Apprentice
Joined: 17 May 2008 Posts: 180 Location: France
|
Posted: Mon Feb 23, 2009 12:01 am Post subject: |
|
|
Quote: | CONFIG_LOCALVERSION |
- under "General Setup" section - is just nice imho for multiple compiles of the same kernel.
edit : silly me.This does not answer the question. _________________ Laptop : Gentoo ~amd64
(remote) Server : Gentoo amd64 |
|
Back to top |
|
|
NeddySeagoon Administrator
Joined: 05 Jul 2003 Posts: 54234 Location: 56N 3W
|
Posted: Mon Feb 23, 2009 12:03 am Post subject: |
|
|
Gef,
That didn't used to work if you had out of kernel modules because they didin't all check it. _________________ Regards,
NeddySeagoon
Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail. |
|
Back to top |
|
|
Ric95 Tux's lil' helper
Joined: 10 Apr 2007 Posts: 94 Location: Alberta Can.
|
Posted: Mon Feb 23, 2009 12:32 am Post subject: |
|
|
Thanks guys. I'm sure learning a lot today. ( eg: what the hard way was like...)
I'll build on that and try it this way with a fresh install. |
|
Back to top |
|
|
|