# genkernel config

## deathraccoon

I am using genkernel. when I invoke it as: 

genkernel --lvm --luks --menuconfig  all

it fails to use existing config. It neither uses the one in /etc/kernels nor the one in /usr/src/linux

I have tried copyng over the *.bak configs to .config and /etc/kernels however it still fails to use the existing files..Last edited by deathraccoon on Thu Dec 17, 2015 8:00 pm; edited 1 time in total

----------

## Tony0945

The default is not to use the existing config. The default is to use the config set by variable DEFAULT_KERNEL_CONFIG in /etc/genkernel.conf

You can override on the command line, see "man genkernel"

You can also set luks (EDIT:  and lvm) in /etc/genkernel.conf. The default is "no", but you can change it to "yes".

I override on the command line with a simple one line shell script. Two lines counting the shebang.

----------

## deathraccoon

thank you. when --old-config is set to yes, whcih config does it use? do mrproper and clean affect this?

I will go over the man page again. this is odd as I've been using Gentoo off and on for some time and never had this occur, leaving the genkernel.conf alone and invoking options from the console is how I had done it in the past.

I even invoked --kernel-config=/path/to/config-file and pointed it to ./usr/src/linux/.config-*.bak I had checked that configuration, and it was correct, but genkernel did not use it.

----------

## Tony0945

Don't know if --old-config  et cetera do or not. I suspect not. Those options should affect what happens to the config after it has been selected.

I would not keep even backups in /usr/src/linux. Genkernel and the kernel make process do too much there.

This is what I do:

```
zcat /proc/config.gz >/root/config.now && genkernel --menuconfig --install --kernel-config=/root/config.now  --bootloader=grub all
```

That depends on having CONFIG_IKCONFIG  and CONFIG_IKCONFIG_PROC set. Currently, they are under "general setup" ->"kernel .config support" and "general setup"->" Enable access to .config through /proc/config.gz" in the menu.  This feature is handu for checking your running kernel.

Which version of genkernel are you running? Mine is 3.4.52.2

Genkernel is written in bash. If you read shell, you can figure out what it does. I did that to figure out how it was updating /boot/grub/grub.conf so I could steal the code. It wasn't easy to figure out, but then I'm very weak at shell.

----------

