# Is it possible to swap kernel sources?

## dechah

I recently installed Gentoo with XFS filesystems on a couple of my partitons.  I faithfully followed the installation guide and I am currently running the kernel compiled from the "xfs-sources".  I recently discovered that the latest "gentoo-sources" has XFS filesystem support included.

If it is not too much trouble, I would prefer to switch to this kernel source.

Can I simply grab the lastest gentoo-sources package, compile it with the correct settings and then replace my existng bzImage in the /boot partition with the new bzImage created from the gentoo-sources package.

I am not experienced enough to know if this is going to break anything in my current Gentoo install.  I guess I should just try it and see, but if anyone has already gone down this path before me, I would love to know if there are any tips or tricks I should consider first.

Regards

Dechah

----------

## FINITE

I would just dive right in  :Very Happy:   I would seriously. It shouldn't hurt anything at all. You would need to update your boot loader to be able to boot your new kernel. Otherwise you should have no problems.

----------

## rac

One thing to watch out for if you are trying to keep your existing kernel bootable in case of problems is the modules directory.  If you try to install two versions of the same kernel version, you may end up overwriting the /lib/modules/ subdirectory and cause yourself some grief.

----------

## rommel

you know i did that and got a kernel panic...but because xfs was performing so pathetically i didnt even try to figure it out i just blew the install and started over...you should be careful...and i think unless you want something specific that the vanilla-xfs kernel doesnt support you should just leave well enough alone

----------

## AutoBot

 *rommel wrote:*   

> you know i did that and got a kernel panic...but because xfs was performing so pathetically i didnt even try to figure it out i just blew the install and started over...you should be careful...and i think unless you want something specific that the vanilla-xfs kernel doesnt support you should just leave well enough alone

 

Actually I run gentoo so I don't have to leave well enough alone  :Very Happy: 

Here are some easy steps you can follow dechah:

```

su -

emerge rsync

emerge gentoo-sources

# copy the .config to whatever the gentoo-sources dir is currently

cp /usr/src/linux/.config /usr/src/linux-2.4.19-r7

# point the /usr/src/linux symlink to gentoo sources, same rule above applies

ln -s /usr/src/linux-2.4.19-r7 /usr/src/linux

cd /usr/src/linux

make menuconfig

make dep && make bzImage clean modules modules_install

mount /boot

mv /boot/bzImage /boot/bzImage.old

cp /usr/src/linux/arch/i386/boot/bzImage /boot

# make sure there is a bzImage.old and a bzImage

ls /boot

umount /boot

# edit grub or lilo to reflect the .old kernel if needed then

reboot

```

----------

## DArtagnan

 *AutoBot wrote:*   

>  *rommel wrote:*   you know i did that and got a kernel panic...but because xfs was performing so pathetically i didnt even try to figure it out i just blew the install and started over...you should be careful...and i think unless you want something specific that the vanilla-xfs kernel doesnt support you should just leave well enough alone 
> 
> Actually I run gentoo so I don't have to leave well enough alone 
> 
> Here are some easy steps you can follow dechah:
> ...

 

 *Quote:*   

> 
> 
> umount /boot
> 
> # edit grub or lilo to reflect the .old kernel if needed then
> ...

 

First edit grub and then umount the /boot  :Smile: 

----------

## AutoBot

Good call pacman, it's 3 A.M. and I am slipping into a upright coma lol.

----------

## DArtagnan

 :Smile: 

Go sleep and gimme your username/password `s root to your linux box :p

----------

## dechah

Thanks for all your assistance people

 *AutoBot wrote:*   

>  *rommel wrote:*   you know i did that and got a kernel panic...but because xfs was performing so pathetically i didnt even try to figure it out i just blew the install and started over...you should be careful...and i think unless you want something specific that the vanilla-xfs kernel doesnt support you should just leave well enough alone 
> 
> Actually I run gentoo so I don't have to leave well enough alone 
> 
> Here are some easy steps you can follow dechah:
> ...

 

----------

