# genkernel for one source-kernel

## gentoorockerfr

I have 3 sources(rt-source zen-source gentoo-source) on my desktop and i want to use genkernel to one of them(zen)Which is the right command to do that?

Thank you

----------

## John R. Graham

Along with several other packages, genkernel depends on the /usr/src/linux symlink to locate the kernel source. You need to set that to your zen-sources directory, like so:

```
cd /usr/src

rm linux

ln -s <zen-sources-directory> linux

genkernel all
```

If you've already got a .config file in there, then genkernel will erase it and use one of its own by default. You can prevent that by including the --oldconfig command line option.

- John

----------

## gentoorockerfr

so is it the same with eselect command?

eselect kernel 3?(zen is the 3rd)

then first

eselect kernel set 3 

second 

genkernel all  ?

----------

## John R. Graham

Yep, that too will work.   :Wink: 

- John

----------

## gentoorockerfr

ok thank you i was afraid to run it without confirmation

----------

## toralf

works too :

```
genkernel --kerneldir=/usr/src/linux-..../
```

----------

