# [solved] Simple Gentoo kernel question

## GenProm

Hi 

Im new to gentoo. In fact i did not even install it yet. But i read the manual 2 times now and im aware that i have to fix the stage3 tarball for successful install. But i digress. 

When i install the kernel during install, how can i later add another one (same version) with different config.

kernel22

kernel22 (different config)

I read the guide here on the forum and the handbook. But i ubuntu you have to add some extra tag so the other kernel is not overwritten.

Like:

kernel1

kernel1-another-config

I don't see this is any gentoo guide. So i assume that then when you do a recompile of the kernel, you just have that one and you overwrite the original one when you install it right?

Thanks for clarifying this to me 

PS: would it be practical to use the forums during install and ask questions or would be irc the place to go for install advice ?

----------

## eccerr0r

The kernel module system and for the most part, hot tunable options have never forced me to keep two versions of the same release...  Usually one kernel is enough for everything I need.  (I guess I also have previous versions to fall back on, which is kind of hard for new installs...)

Since you're dealing with kernels of the same version, make sure the kernel can tell itself from other kernels.  There's an option to "append a string" in the config, make sure they're different for each kernel version you have.  This way the modules can be in their own directory for each .config.

Then the matter of booting them.  I think the default bootloader is still Grub, simply add a second section in /boot/grub/menu.lst (or wherever your bootloader config file is installed) with a new title, root line, kernel line with options, and anything else you need for the bootloader.  Note that you can also make title-root-kernel sections for different versions, which is what I do to have fallbacks on older kernels in case new ones fail to boot.

That should do it!

[grr... more clarifications...]Last edited by eccerr0r on Thu Aug 18, 2011 7:06 pm; edited 2 times in total

----------

## Etal

What you name your kernel does not matter at all. You can name your kernel /boot/GentProms-super-kernel-3000 if you want, you just have to make sure that the bootloader configuration points to it  :Wink: 

----------

## NeddySeagoon

GenProm,

What eccerr0r says works most of the time but the in kernel versioning string is not always respected by third party kernel modules.

If you want to keep the kernel sources separate, make a complete copy of your kernel and in the copy run

```
make clean
```

In the copy, edit the Makefile.

At the top you will find something like

```
VERSION = 3

PATCHLEVEL = 0

SUBLEVEL = 1

EXTRAVERSION = -gentoo

NAME = Sneaky Weasel
```

Edit the EXTRAVERSION= to whatever you like.  Be sure it does not end with whitespace.

----------

## GenProm

Ok so 

It like compiling a kernel in the good old Debian days and not with these new Ubuntu versioning stuff. I like that.

So i giuess i have to check the link to /usr/src/linux to us the right version and copy kernel22 to kernel23 and set the link accordingly.

Will this give me troube cause in the configs in knerel23 is still kernel22 present ? if so wich files schould i edit to get around that?

----------

## thalcave

From where You get kernel 22 and 23? Kernel version is 2.6.39 or 3.0

----------

## NeddySeagoon

GenProm,

The /usr/src/linux symlink is only used at build time and then only by things that build against the kernel.

Thats mostly external kernel modules.

You can use 

```
eselect kernel
```

 to manage the symlink.

----------

## GenProm

@thalcave

The numbers are an example. Im too lazy to write the full kernel version. besides i dont know which one gentoo uses atm.

----------

