# [Solved]How do I choose an older kernel from gentoo-sources?

## willie_wang

Hi everyone!

First Gentoo install and it's fun, but frustrating  :Razz: 

The latest gentoo kernel is 2.6.24-r4, but I want a kernel in 2.6.22 series. I don't know much about where to get the sources for 2.6.22... can someone direct/link me please?

Is there an easy command line option for this also? Something like:

emerge gentoo-sources-2.6.22-r4 ??

Please excuse the noobiness of these questions. I'm only starting out  :Smile: 

Thanks!Last edited by willie_wang on Sat Apr 05, 2008 11:58 am; edited 1 time in total

----------

## kds66

Take a look at the available versions at the following site:

http://packages.gentoo.org/package/sys-kernel/gentoo-sources

In order to emerge a particular version, just add '=' in front of the package, e.g.

```
emerge =sys-kernel/gentoo-sources-2.6.23-r9
```

If you want to install a testing version (shown as '~' at the above mentioned site), you need additionally a line in /etc/portage/package.keywords, e.g.

```
=sys-kernel/gentoo-sources-2.6.20-r10
```

----------

## willie_wang

you, my friend, are a gem! you may have just single handedly sorted out my woes of the past few days!  :Very Happy: 

thank you, thank you, thanking you!  :Smile: 

----------

## kds66

You're welcome. I am glad I could help  :Smile: 

----------

## katafitos

How is it possible to exclude a kernel version from 

emerge --depclean and 

emerge -P

----------

## kds66

 *Quote:*   

> How is it possible to exclude a kernel version from
> 
> emerge --depclean and
> 
> emerge -P

 

Let's say you don't trust any kernel version from 2.6.23. You would like to retain your 2.6.22 kernel even when newer stable become available and emerge -u would normally install the new version and remove your 2.6.22 kernel. In that case you could add the following line to /etc/portage/package.mask:

```
>=sys-kernel/gentoo-sources-2.6.23
```

----------

