# [SOLVED] How upgrade genkernel?

## pmam

I am quite new with genkernel and now after system updating, need to upgrade kernel source.

```
# eselect kernel list

Available kernel symlink targets:

  [1]   linux-4.12.5-gentoo

  [2]   linux-4.12.12-gentoo *
```

Please inform how to copy config from old kernel to new one?

Typo corrected in title. — JRG

----------

## mrbassie

```
# cp /usr/src/linux-4.12.5/.config /usr/src/linux/.config
```

----------

## fedeliallalinea

Genkernel save kernel config in /etc/kernels/, usually I run

```
# genkernel --kernel-config=/etc/kernels/kernel-config-x86_64-version_you_want all
```

----------

## The Main Man

You can also edit /etc/genkernel.conf and enable the use of oldconfig.

```
# Run 'make oldconfig' before compiling this kernel?

OLDCONFIG="yes"
```

----------

## pmam

 *Quote:*   

> Genkernel save kernel config in /etc/kernels/, usually I run
> 
> Code:	
> 
> # genkernel --kernel-config=/etc/kernels/kernel-config-x86_64-version_you_want all

 

That what was missing to me - I did not know why the kernel's config had not have the right parameters...

I used to work without genkernel, so there are some differences to care of.

```
# Run 'make oldconfig' before compiling this kernel?

OLDCONFIG="yes"
```

Can add this parameter with menuconfig or just manually in: /etc/kernels/kernel-config-x86_64-version_you_want?

And if OLDCONFIG="yes" is added, then need to run following commands?

```
make oldconfig

genkernel --menuconfig all
```

BTW: genkernel compilation takes much time than standard kernel... But works ok and save some configuration's time

Thanks

----------

## The Main Man

 *pmam wrote:*   

> And if OLDCONFIG="yes" is added, then need to run following commands?
> 
> ```
> make oldconfig
> 
> ...

 

You just need "genkernel --menuconfig all" , and if you enable this in the genkernel.conf :

```
# Run 'make menuconfig' before compiling this kernel?

MENUCONFIG="yes"
```

then you just need to run "genkernel all"

Note: I'm not sure (I can't remember), but when you enable OLDCONFIG="yes" it's gonna take effect next time you run it, because when you run it for the first time there's no old config available, but after first run it will be, it uses it's own location for config.

I'm running like this for a very long time and it's working fine.

Edit: Actually you might need this as well :

```
# Save the new configuration in /etc/kernels upon

# successfull compilation

SAVE_CONFIG="yes"
```

----------

## pmam

kajzer,

OK, I will try it.

Thanks

----------

