Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Grub -> 2 kernel choices in one install?
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Kernel & Hardware
View previous topic :: View next topic  
Author Message
Ric95
Tux's lil' helper
Tux's lil' helper


Joined: 10 Apr 2007
Posts: 94
Location: Alberta Can.

PostPosted: Sun Feb 22, 2009 10:41 pm    Post subject: Grub -> 2 kernel choices in one install? Reply with quote

I'm having fun thrashing my computer:: I'm sure it now hates me :wink:
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
View user's profile Send private message
alex.blackbit
Advocate
Advocate


Joined: 26 Jul 2005
Posts: 2397

PostPosted: Sun Feb 22, 2009 11:02 pm    Post subject: Reply with quote

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


Joined: 05 Jul 2003
Posts: 54234
Location: 56N 3W

PostPosted: Sun Feb 22, 2009 11:22 pm    Post subject: Reply with quote

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


Joined: 17 May 2008
Posts: 180
Location: France

PostPosted: Mon Feb 23, 2009 12:01 am    Post subject: Reply with quote

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. :roll:
_________________
Laptop : Gentoo ~amd64
(remote) Server : Gentoo amd64
Back to top
View user's profile Send private message
NeddySeagoon
Administrator
Administrator


Joined: 05 Jul 2003
Posts: 54234
Location: 56N 3W

PostPosted: Mon Feb 23, 2009 12:03 am    Post subject: Reply with quote

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
View user's profile Send private message
Ric95
Tux's lil' helper
Tux's lil' helper


Joined: 10 Apr 2007
Posts: 94
Location: Alberta Can.

PostPosted: Mon Feb 23, 2009 12:32 am    Post subject: Reply with quote

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
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Kernel & Hardware 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