# Is it Possible to Go Back to an Older 2.6 Kernel?

## eno2001

I am building a new storage box and I have a Highpoint RocketRAID 2680 PCI-Express card.  I intend to use it as a JBOD for eight SATA disks.  The driver is built from source that the manufacturer provides, but it does not compile on the gentoo-sources 3.2.1 based kernel.  The kernel version detection code makes the assumption that the version of the kernel is always going to start with a '2' and then appends $((LINUX_VERSION_CODE /256 %256)) which is '2'.  So my 3.2.1 kernel looks like 2.2 to the Makefile.

I changed that code but then I got complaints about a missing linux/config.h file.  I can remove that and press ahead through each error.  But before I embark on that trip, I wanted to know, can I simply emerge gentoo-sources-2.6.25 for example and then just let it compile?  Or are those older kernels MASKED or not even in Portage anymore?

Failing that, can I just snag a mainstream kernel tarball and build it for a current Gentoo system or are there now dependencies on 3.x that would prevent that from working?  Hope this is the right place to be asking.

----------

## gorkypl

What architecture? On amd64 there is 2.6.32-r29 available, so something like:

```

emerge =sys-kernel/gentoo-sources-2.6.32-r29 && echo ">sys-kernel/gentoo-sources-2.6.32-r29" >> /etc/portage/package.mask && eselect kernel set linux-2.6.32-r29

```

should do the job.

Of course you need to compile the fresh kernel  :Wink: Last edited by gorkypl on Mon Jan 30, 2012 7:41 pm; edited 3 times in total

----------

## eno2001

 *gorkypl wrote:*   

> What architecture? On amd64 there is 2.6.32-r29 available, so something like:
> 
> ```
> 
> emerge =gentoo-sources-2.6.32-r29 && echo ">gentoo-sources-2.6.32-r29" >> /etc/portage/package.mask
> ...

 

Excellent!  Just what I needed and yes I am on amd64 arch.  I've been away from Gentoo for the past two years or so and couldn't remember how to find packages that won't show up with emerge --search.

----------

## gorkypl

 *eno2001 wrote:*   

> I've been away from Gentoo for the past two years or so and couldn't remember how to find packages that won't show up with emerge --search.

 

Try the excellent app-portage/eix (emerge eix && eix-update && eix gentoo-sources). 

Also I've updated my post because I forgot to add sys-kernel/ and eselect where needed.

----------

## eno2001

 *gorkypl wrote:*   

> Try the excellent app-portage/eix (emerge eix && eix-update && eix gentoo-sources).

 

Thanks again.  I'll check that out too.   :Smile: 

----------

## yoshi314

a word of caution - triple check that udev works with that kernel. you might have to downgrade it too.

at certain points udev cuts off compatibility with older kernels, i am not 100% sure whether portage will catch that.

----------

## VoidMage

That driver of yours seems significantly outdated - my first google result is this page which talks about removal from 2.6.19 kernel.

I'd say that's just ridiculous at this date.

----------

## Hu

 *gorkypl wrote:*   

> 
> 
> ```
> echo ">sys-kernel/gentoo-sources-2.6.32-r29" >> /etc/portage/package.mask
> ```
> ...

 If masking newer kernels, it would be much better to mask >=sys-kernel/gentoo-sources-2.6.33, so that any future updates to the 2.6.32 line are still unmasked.

----------

## Etal

Are you aware that you can make it pretend you're running Linux 2.6?

```
$ uname -sr

Linux 3.2.2

$ setarch x86_64 --uname-2.6

$ uname -sr

Linux 2.6.42
```

----------

