# can i install 2.4 and 2.6 kernel <solved>

## redwing26

Hi I have just installed gentoo with a 2.4 kernel ........the reason I did this was to see if it made any difference with the ati drivers .....anyway I no want to install a 2.6 kernel but I want to have it so I have both my 2.4 and 2.6 kernels and initrds in boot and I just choose which one to boot via grub ........I would have went ahead with it but what concerns me is the fact that gentoo docs have the 2.4 kernel src in /usr/src/linux ....so where would I put the 2.6 source? its just what will i do about the usr/src/linux symlink ? Im very new to all this so if I was going to hope of doing it succesfully I would need some advice or referred to relevant docs if possible 

Thanks

DavidLast edited by redwing26 on Sat Feb 11, 2006 6:04 pm; edited 1 time in total

----------

## tukachinchila

It's fine to have both kernels installed on the same partition and boot the kernel of your choice using Grub (or Lilo). The only problem I can forsee is if you use alsa-driver, or nvidia-kernel. To get around the problem with alsa-driver, you could compile the alsa modules directly into the kernel instead. nvidia-kernel has to be compiled against the kernel you are using, which means you'd have to point the symlink to whichever kernel you plan to use, and re-emerge nvidia-kernel every time you want to change kernels. That's not very practical, but I don't know of any way around it. If you don't use nvidia-kernel, then I don't see any huge problems with dual-booting.

----------

## Catch-22

all your currently emerged sources are in /usr/src/ - you don't have to "put it" anywhere

the /usr/src/linux symlink should point towards the kernel that you are *currently using*

why? well some emerges need to see your kernel source (eg. ati drivers)

and yes, you can keep as many kernels as your boot partition has the space for

/edit

tukachinchila beat meLast edited by Catch-22 on Thu Feb 02, 2006 12:00 am; edited 1 time in total

----------

## redwing26

hi thanks for the reply .......that sounds good also will emerge be smart enough to no the change and its the ati-driver I use do you think I will have the same issue you have with nvidia?

----------

## igrat

well the symlink is supposed to point to the "current" kernel sources. you can change it for the time you need to the new kernel-directory.

but as far as i know it's only relevant if emergeing/building stuff like the nvidia-driver, alsa-driver, lsm-realtime and ?? glibc  :Rolling Eyes:  ?? They will be build for the kernel in /usr/src/linux/ and in case of modules be installed in /lib/modules/<version of kernel in /usr/src/linux>.

it's not really relevant for booting...

so build the new kernel change symlink, emerge stuff like additional modules...and try to boot

well you will run into other problems though trying to switch between 2.4 and 2.6...

modutils for example...read http://www.gentoo.org/doc/en/migration-to-2.6.xml"

greetings...

----------

## tukachinchila

igrat's link is broken. This document (without the trailing " should work).

You could run into the same problem with the ati-driver as you would with nvidia. As a general rule, anything that can't be compiled into the kernel proper could potentially cause a problem. Luckily, there aren't too many of these third party modules out there.

----------

## redwing26

Thanks for the replies ........mentioning about changing the symlink was key and thanks for the links I managed to install 2 kernels succefully on my last install so I am going to mark this  as solved now

cheers  :Smile: 

David

----------

