# kernel 2.6.5

## sobers_2002

hi all,

       i just compiled my new kernel......by getting "gentoo-dev-sources" and then self configuring........now how do i make gentoo understand that it is also having the newer kernel????? actually the prob starts from this.....

 *Quote:*   

> root@dennis> emerge -p shorewall                                              ~
> 
> These are the packages that I would merge, in order:
> 
> Calculating dependencies ...done!
> ...

 

this shows that is is compiling things for 2.4 kernel........which isnt supposed 2 be how things should be i gues....

and this is even more strange......

 *Quote:*   

> root@dennis> emerge -p alsa                                                   ~
> 
> These are the packages that I would merge, in order:
> 
> Calculating dependencies ...done!
> ...

 

----------

## neonik

ALSA is provided by your current 2.6 series kernel.

You also have to build the kernel. Last step assuming you're using GRUB as your system loader, else skip the last step and in case using LILO you can simply make install -C /usr/src/linux. If you yet use the example below, ensure you have the right values for root (hd2,0) and kernel (hd0,0). Replace the hd values with the appropriate ones.

```
# rm /usr/src/linux ; ln -s /usr/src/linux-2.6.5-gentoo &&

make menuconfig -C /usr/src/linux &&

make -C /usr/src/linux &&

make modules_install -C /usr/src/linux &&

mount /boot &&

cp /usr/src/linux/arch/i386/boot/bzImage /boot/vmlinuz-2.6.5-gentoo &&

echo "title=Gentoo Linux (kernel-2.6.5-gentoo)

root (hd2,0)

kernel (hd0,0)/boot/vmlinuz-2.6.5-gentoo" >> /grub/menu.lst &&

$EDITOR /boot/menu.lst
```

Then reboot.

----------

## sobers_2002

no no..........the problem isnt concerning alsa.......i have built it in.........what i wanted to say was that the package was being compiled for 2.4.......and when i asked 4 emerge alsa(just randomly) it wanted 2 remove kernel sources

----------

## neonik

"R" means not "Remove" but "Reinstall". What you want is alsa-libs, alsa-tools. alsa-driver is in kernel and alsa is provided by it. What package should have been compiled agaisnt kernel 2.4?

----------

## neonik

Ok, I undersntad what you mean now.

See this:  *iproute-20010824-r5.ebuild wrote:*   

> DEPEND=">=virtual/os-headers-2.4.21
> 
>     >=sys-apps/sed-4
> 
>     doc? ( virtual/tetex )"

 

the package net-firewall/shorewall requires sys-apps/iproute which requires >=virtual/os-headers-2.4.21.

Actually that kernel should have provided virtual/os-headers...

Nonetheless, I wouldn't advise you to build stuff against 2.6 series headers since they're anyway unstable. If you yet want to build against 2.6 series headers, simply do following:

```
# [ ! -d /etc/portage ] && mkdir /etc/portage ; echo =sys-kernel/linux-headers-2.6.5 >> /etc/portage/packages.unmask
```

Edit:

1. modified a bit so it does the directory creation automatically if it doesn't exist.

----------

## sobers_2002

actually i found out something.....my /usr/src/linux points to 2.4 i think pointing it to 2.6 should be all........how do i do it??????

----------

## neonik

 *sobers_2002 wrote:*   

> actually i found out something.....my /usr/src/linux points to 2.4 i think pointing it to 2.6 should be all........how do i do it??????

 

```
# rm /usr/src/linux ; ln -s /usr/src/linux-2.6.5-gentoo /usr/src/linux
```

----------

## Riftwing

Yea, theres no real advantage of using 2.6 headers unless you like unstability. Just continue using the 2.4 headers with a 2.6 kernel.

----------

## sobers_2002

this might seem a bit silly but   :Embarassed:   :Embarassed:  i think now i dont really understand the functionality of this 

```
ln -s 
```

 usage.....some one please explain in detail what all it does.....

----------

## neonik

It soft-links something to something. For example a directory can only be soft-linked. It simply creates a link upon usage of which you will be directed to a directory it is linking to. You can also use link to link and unlink to unlink instead.

Imagine you write an application and want it to perform some tasks in /usr/src/linux (read some headers from there). You do not know what kernel versions exactly are installed there, those can be /usr/src/linux-2.4.20 or /usr/src/linux-2.6.2. This is what now links for. You simply create a reference directory to an exact directory (the reference directory links to the exact directory). This way you can direct the application to use kernel headers of your choice. It is like a variable. You can have /usr/src/linux for your current kernel, /usr/src/linux-2.4 for a 2.4 series kernel, /usr/src/linux-2.6 for a 2.6 series kernel, /usr/src/linux-dev for the development series kernel (and so forth - you decide).

It is also very useful when you need a file/directory to have more than one name and be accessible via them.

I hope that's enough without too much technical stuff, if not request more!  :Smile: 

----------

## sobers_2002

hey thankz 4 that!!!! no it wasnt beyond me   :Wink:   :Wink:   :Wink:  what i exactly wanted 2 know was whether this creates ny impact on the running kernel???? i mean as identified by the system..

----------

## neonik

The presently running kernel is determined by the bzImage file in /boot/ (kernel compressed image). Its modules are located in /lib/modules/`uname -r`/. Those in /usr/src/ are only sources that have no direct impact on your loaded kernel. After building it does still contain all the builds in the appropriate format which you can re-install on purpose; and it also contains headers that are referred to as userspace kernel headers (if I'm not wrong on that).

You will however need to have the right link set (read: /usr/src/linux linking to your current kernel sources) when you build any kernel modules/drivers like nvidia-kernel or firewalls dependent on kernel modules.

----------

## sobers_2002

hey thankz a lot!!!!!!!! a few more doubts  :Embarassed:   :Embarassed: 

when comp boots in 2.6.5 i get the following errors

1.> calculating module dependencies....failed

2.> unable to locate setfont executable(common 2 both kernels)

also the eth0 doesnt load up ....... but works fine when i restart it from init.d.....

(nvidia networking controller   :Rolling Eyes:   :Rolling Eyes:  )

----------

## forceflow2

 *sobers_2002 wrote:*   

> 
> 
> when comp boots in 2.6.5 i get the following errors
> 
> 1.> calculating module dependencies....failed
> ...

 

```
nano /etc/modules.autoload.d/kernel-2.6
```

(or whatever you use to edit files) then add what modules you need loaded (and remove those that you don't). I am pretty sure that will take care of that.

As for the second error, I think you need to update kbd.  See if there is an update for it in portage. (got from decibels in this post :: https://forums.gentoo.org/viewtopic.php?t=115096)

----------

## sobers_2002

Hi, 

thankz 4 that help! the problem with modules is that i dont have any extra modules that i need, all the essential ones i have built in to the kernel  :Confused:   :Confused:   :Confused:  so what exactly should i be loading?????

----------

## neonik

You have to reconfigure your kernel, then rebuild it (that in case I understand you right: you say you have no needed modules installed - did you also run modules_install when installing your kernel?).

To make your life easier, make sure you enable the module autoloader-4 when configuring the kernel, it will load the modules you need automatically.

That /etc/modules.autoload.d/kernel-2.6 is like stated above to be modified accordingly.

What do you mean with eth0 not loading up? Does it fail to load or does it not load at all? Case latter, then simply 

```
# rc-update add net.eth0 default
```

 In case it fails to load, then I'd need some more info on your config and hardware...

And to solve your issue with setfont, run following: 

```
# emerge -v sys-apps/kbd
```

Hope the above will help.  :Smile: 

----------

## sobers_2002

nooo............i have all the things i need..........th thing is that they are built in as a part of the kernel and not as modules........(all the required things)....so effectively i have no modules to load   :Confused:   :Confused:  now what?

----------

## neonik

You need to load the kernel image file in that case only then.

What boot manager/loader do you use (e.g. GRUB/LILO)?

----------

## sobers_2002

grub

----------

## neonik

This should do the trick then (replace with the correct values - compare with your current /boot/grub.conf):

```
mount /boot &&

cp /usr/src/linux/arch/i386/boot/bzImage /boot/vmlinuz-2.6.5-gentoo &&

echo "title=Gentoo Linux (kernel-2.6.5-gentoo)

root (hd2,0)

kernel (hd0,0)/boot/vmlinuz-2.6.5-gentoo" >> /grub/menu.lst &&

$EDITOR /boot/menu.lst
```

Values to modify (replace with the ones in /boot/grub/grub.conf of your current kernel):

1. in the string ^root modify the value of (hd2,0)

2. in the string ^kernel modify the value of (hd0,0) and root

----------

