# I want to keep 2.4.x kernel instead of 2.6.x [SOLVED]

## deoren

On the desktop system I'm using I'm not ready to upgrade to 2.6.x, and I am most certainly NOT wanting to upgrade to the 2.6.x kernel for the server I'm using.

I came across something which said how to make sure your system wasn't upgraded to the 2.6.x kernel when doing an emerge -uvpD world, but I didn't jot it down.  Unfortunately I was under the mistaken belief that I could find it again when the developers changed the default sources to 2.6.

Well, that day seems to have come and I don't know how to keep the 2.4 kernel around along with the appropriate kernel headers.

Here is what I have:

```
freiheit root # qpkg -I -v sys-kernel
```

 *Quote:*   

> sys-kernel/gentoo-sources-2.4.28-r8 *
> 
> sys-kernel/linux-headers-2.4.22-r1 *

 

Here is what portage is forcing on me:

```
freiheit root # emerge -uvpD world
```

 *Quote:*   

> These are the packages that I would merge, in order:
> 
> Calculating world dependencies ...done!
> 
> [ebuild     U ] sys-kernel/linux-headers-2.6.8.1-r2 [2.4.22-r1] 34,870 kB
> ...

 

Help?Last edited by deoren on Mon Mar 28, 2005 3:45 pm; edited 1 time in total

----------

## DijiTao

I'm pretty sure it would work like any other application.

/etc/portage/package.keywords

```

=sys-kernel/gentoo-sources-2.4.28-r8

=sys-kernel/linux-headers-2.4.22-r1

```

----------

## kimchi_sg

Also put >=gentoo-sources-2.6 and >=linux-headers-2.6 in your package.mask.

----------

## moocha

 *deoren wrote:*   

> On the desktop system I'm using I'm not ready to upgrade to 2.6.x, and I am most certainly NOT wanting to upgrade to the 2.6.x kernel for the server I'm using.

 So mask the 2.6 line out.

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

echo ">sys-kernel/linux-headers-2.4.9999" >> /etc/portage/package.mask
```

I don't see any problem.

----------

## deoren

 *moocha wrote:*   

>  *deoren wrote:*   On the desktop system I'm using I'm not ready to upgrade to 2.6.x, and I am most certainly NOT wanting to upgrade to the 2.6.x kernel for the server I'm using. So mask the 2.6 line out.
> 
> ```
> echo ">sys-kernel/gentoo-sources-2.4.9999" >> /etc/portage/package.mask
> 
> ...

 

That's what I was looking for, but I guess I didn't know how to phrase it.  Thanks!

----------

## moocha

Addendum: Please make that >=sys-kernel etc etc (add an equal sign after the greater-than), otherwise transitional empty packages may interfere. My bad.

----------

## deoren

I just wanted to update this thread with information I found in another thread:

 *Quote:*   

>   As you can see, in the above example there is a 2.4 subdirectory. This means that the current profile uses the 2.6 kernel; if you want a 2.4-based system, you need to relink your make.profile symlink:
> 
> Code Listing 9: Relinking the profile
> 
>   # ln -snf /usr/portage/profiles/default-linux/x86/2005.0/2.4 /etc/make.profile 

 

The "magic" command is: 

```
ln -snf /usr/portage/profiles/default-linux/x86/2005.0/2.4 /etc/make.profile
```

----------

## asiobob

indeed that is the magic command rather than using package.keywords or unmask.

----------

