# [SOLVED] gentoo-sources-4.4.21 restarts kernel config

## jannis

Hi, today I updated gentoo-sources on my nas (amd64 stable) from 4.4.6 to 4.4.21. However, "make oldconfig" resets the configuration and I have to start anew:

```
nas16 linux-4.4.21-gentoo # uname -a

Linux nas16 4.4.6-gentoo #3 SMP Sat Jun 4 10:08:01 CEST 2016 x86_64 Intel(R) Core(TM) i3-6300T CPU @ 3.30GHz GenuineIntel GNU/Linux

nas16 linux-4.4.21-gentoo # zcat /proc/config.gz > .config

nas16 linux-4.4.21-gentoo # head .config

#

# Automatically generated file; DO NOT EDIT.

# Linux/x86 4.4.6-gentoo Kernel Configuration

#

#

# Gentoo Linux

#

CONFIG_GENTOO_LINUX=y

CONFIG_GENTOO_LINUX_UDEV=y

nas16 linux-4.4.21-gentoo # make oldconfig

scripts/kconfig/conf  --oldconfig Kconfig

*

* Restart config...
```

anyone knows why this happens without the kernel having new features (it's still 4.4)?

and how I can re-use my config with the new kernel?

My kernel config from gentoo-source-4.4.6 is here: https://paste.pound-python.org/show/vdvIGZERHrUqfHcgo7II/

*UPDATE*: I just updated gentoo-source-4.4.6 to 4.4.21 in a VirtualBox-VM I have since some months and I don't have the problem there. Is there a way to find out WHY the configuration is restarted exactly?Last edited by jannis on Fri Oct 07, 2016 1:54 pm; edited 1 time in total

----------

## sebB

 *Quote:*   

> nas16 linux-4.4.21-gentoo # zcat /proc/config.gz > .config 

 

Why don't you do this from 4.4.6?

Have you try, simply copy the copy the .config from 4.4.6 to 4.4.21 and make oldconfig?

----------

## jannis

Hi sebB, thanks for your answer. I'm doing all this while version 4.4.6 is running, the thing you see before the "#" is the current directory. "/proc/config.gz" is configuration of the currently running kernel (4.4.6) and is saved in the directory of linux version 4.4.21. Copying the .config-file from the old kernel directory has the same result.

----------

## iq180

 *jannis wrote:*   

> Hi sebB, thanks for your answer. I'm doing all this while version 4.4.6 is running, the thing you see before the "#" is the current directory. "/proc/config.gz" is configuration of the currently running kernel (4.4.6) and is saved in the directory of linux version 4.4.21. Copying the .config-file from the old kernel directory has the same result.

 

Try 

```
zcat /proc/config.gz > /etc/kernels/kernel-config-x86_64-4.4.21-gentoo
```

----------

## cboldt

I have always used `make oldconfig` when moving from one kernel to a newer one, but for no reason in particular, when going form 4.4.6 to 4.4.21, used `make olddefconfig`.  It worked.

I just now tried a fresh `cd /usr/src/linux-4.4.21-gentoo ; cp ../linux-4.4.6-gentoo/.config . ; make oldconfig` and that worked too.  I was not prompted for any new settings, and the `make oldconfig` command wrote a .config for the 4.4.21 kernel.

```
/usr/src/linux-4.4.21-gentoo # make oldconfig

scripts/kconfig/conf  --oldconfig Kconfig

#

# configuration written to .config

#
```

The "Restart config" message comes from the file "scripts/kconfig/conf.c"  I have not sussed out what causes that message to appear.

Also FWIW, I used the `zcat /proc/config.gz > .config

This also worked, no "Restart config" message appeared.  I wonder if you actually have a 4.4.6 .config file in /usr/src/linux-4.4.21-gentoo

Edit to add, I see you appear to have a .config file, based on your `head` command output.  Maybe there is a permissions issue, but I have no idea how that might come to exist.

----------

## jannis

Alright, I've sorted it out:

The reason for the problem is commit 5aeaf8bd6c6a3f29a1ab55987c10741ef984ea52 ( http://lkml.kernel.org/r/1454499225-21544-2-git-send-email-bp@alien8.de ) that happened between 4.4.6 and 4.4.7 in combination with kernel configs that are NOT using initrds.

To solve the problem:

Go to the kernel sources of 4.4.6

Run make menuconfig there and enable the initrd option

Copy the resulting .config to the sources version 4.4.21

Run make menuconfig (which implies make oldconfig and won't restart/reset the config this time) and disable the initrd option again

Build your kernel

----------

