# This gonna be a simple one: how to upgrade kernel

## EinsDrei

Well, I do have a 2.6, but it is like 500 years old :    /

Now the excellent administration and installation handbooks helped me a lot, and my system is pretty much up to date, safe for the kernel.

This is where I need help. How can I install a new 2.6 kernel, without hurting any of my data (except the former kernel, that is)

Also, I spose you can not "extend" a ReiserFS partition, can you? Cause right now I got 3 primaries, and some free space on the hd, and the only option would be to delete one partition and make it an extended or something. It would be great, if I could just stack the free space to my root partition. Everything else means reinstalling my system, but I guess it isn't possible, like with partition magic back in the fancy windows days-

----------

## oumpah-pah

Kernel upgrade is quite simple. First, you must download the new source :

```
emerge sync

emerge -vua gentoo-dev-sources
```

Of course you can change gentoo-dev-sources to whatever your kernel is.

Then you must edit the symlink so that it points to your new sources :

```
rm /usr/src/linux

ln -s /usr/src/linux-2.6.7-gentoo-r11 /usr/src/linux
```

Now you can just copy the .config file from your old kernel in the source directory of the new one :

```
cp /usr/src/linux-2.6.3-gentoo-r1/.config /usr/src/linux
```

Then you build the kernel and copy the appropriate files in /boot :

```
make && make modules_install

cp /usr/src/linux/arch/i386/boot/bzImage /boot/kernel-2.6.7
```

And you're done.

----------

## oumpah-pah

I forgot to tell you that if your kernel filename changed, you have to configure your bootloader accordingly (refer to grub or lilo man pages for details).

----------

## sgarcia

 *Quote:*   

> Now you can just copy the .config file from your old kernel in the source directory of the new one :
> 
> Code:
> 
> ```
> ...

 

That's a pretty streamlined procedure.  I'd at least do a 

```

make oldconfig

```

before I did the other makes.  I'm a little uncomfortable unless I do a full menuconfig and at least look at any changed options, but that's just me.

----------

## EinsDrei

What about if I just do a genkernel all, should do it, shouldn't it?

----------

