Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
[SOLVED] gentoo-sources-4.4.21 restarts kernel config
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Kernel & Hardware
View previous topic :: View next topic  
Author Message
jannis
Guru
Guru


Joined: 05 Dec 2004
Posts: 340
Location: Germany / Bavaria / Aschaffenburg

PostPosted: Sat Oct 01, 2016 5:56 pm    Post subject: [SOLVED] gentoo-sources-4.4.21 restarts kernel config Reply with quote

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:

Code:
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
Back to top
View user's profile Send private message
sebB
l33t
l33t


Joined: 02 Mar 2011
Posts: 806
Location: S.O. France

PostPosted: Sun Oct 02, 2016 11:18 am    Post subject: Reply with quote

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?
Back to top
View user's profile Send private message
jannis
Guru
Guru


Joined: 05 Dec 2004
Posts: 340
Location: Germany / Bavaria / Aschaffenburg

PostPosted: Mon Oct 03, 2016 4:59 pm    Post subject: Reply with quote

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.
Back to top
View user's profile Send private message
iq180
n00b
n00b


Joined: 23 Mar 2015
Posts: 7

PostPosted: Tue Oct 04, 2016 8:55 am    Post subject: Reply with quote

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
Code:
zcat /proc/config.gz > /etc/kernels/kernel-config-x86_64-4.4.21-gentoo
Back to top
View user's profile Send private message
cboldt
Veteran
Veteran


Joined: 24 Aug 2005
Posts: 1046

PostPosted: Tue Oct 04, 2016 10:28 am    Post subject: Reply with quote

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.

Code:
/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.
Back to top
View user's profile Send private message
jannis
Guru
Guru


Joined: 05 Dec 2004
Posts: 340
Location: Germany / Bavaria / Aschaffenburg

PostPosted: Fri Oct 07, 2016 1:52 pm    Post subject: Reply with quote

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
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Kernel & Hardware All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum