Forums

Skip to content

Advanced search
  • Quick links
    • Unanswered topics
    • Active topics
    • Search
  • FAQ
  • Login
  • Register
  • Board index Assistance Kernel & Hardware
  • Search

genkernel - ignores .config on each new kernel version

Kernel not recognizing your hardware? Problems with power management or PCMCIA? What hardware is compatible with Gentoo? See here. (Only for kernels supported by Gentoo.)
Post Reply
Advanced search
4 posts • Page 1 of 1
Author
Message
Gladdle
Guru
Guru
User avatar
Posts: 348
Joined: Sun Jul 27, 2008 12:44 am
Location: Cleebronn, Germany
Contact:
Contact Gladdle
Website

genkernel - ignores .config on each new kernel version

  • Quote

Post by Gladdle » Sun Sep 14, 2025 8:38 am

Like the topic says it all: I use gentoo-sources & genkernel.
On a kernel update i do the following:
- I copy the old .config to the new kernel dir (cp /usr/src/linux-oldkenel/.config /usr/src/linux-newkenel/.config)
- With "eselect kernel" i select the new kernel
- I start "genkernel all"
Now i see EVERY PREVIOUS changed option is resetet: Waydroid, my WLAN Card RTL8852BE, systemd is enabled again and so on. I've searched the web, checked the configfiles. My /etc/genkernel.conf (without all comment lines):

Code: Select all

INSTALL="yes"
OLDCONFIG="yes"
MENUCONFIG="yes"
MOUNTBOOT="yes"
SAVE_CONFIG="yes"
NOCOLOR="false"
LVM="yes"
LUKS="yes"
FIRMWARE="yes"
FIRMWARE_DIR="/lib/firmware"
FIRMWARE_FILES="amdgpu/yellow_carp_asd.bin,amdgpu/yellow_carp_ce.bin,amdgpu/yellow_carp_dmcub.bin,amdgpu/yellow_carp_me.bin,
amdgpu/yellow_carp_mec2.bin,amdgpu/yellow_carp_mec.bin,amdgpu/yellow_carp_pfp.bin,amdgpu/yellow_carp_rlc.bin,amdgpu/yellow_carp_sdma.bin,
amdgpu/yellow_carp_ta.bin,amdgpu/yellow_carp_toc.bin,amdgpu/yellow_carp_vcn.bin"
BOOTLOADER="grub2"
MODULEREBUILD="yes"
BOOTDIR="/boot"
GK_SHARE="${GK_SHARE:-/usr/share/genkernel}"
CACHE_DIR="/var/cache/genkernel"
DISTDIR="${GK_SHARE}/distfiles"
LOGFILE="/var/log/genkernel.log"
LOGLEVEL=1
DEFAULT_KERNEL_SOURCE="/usr/src/linux"
You can see SAVE_CONFIG="yes" is set like explained in https://wiki.gentoo.org/wiki/Kernel/Upgrade. When i start "genkernel all" it looks like:

Code: Select all

* Gentoo Linux Genkernel; Version 4.3.17
* Using genkernel configuration from '/etc/genkernel.conf' ...
* Running with options: all

* Working with Linux kernel 6.12.41-gentoo for x86_64
* Using kernel config file '/etc/kernels/kernel-config-6.12.41-gentoo-x86_64' ...
* 
* Note: The version above is subject to change (depends on config and status of kernel sources).

* kernel: >> Initializing ...
*         >> Running 'make mrproper' ...
*         >> Running 'make oldconfig' ...
*         >> Invoking menuconfig ...
*         >> Kernel version has changed (probably due to config change) since genkernel start:
*            We are now building Linux kernel 6.12.41-gentoo-x86_64 for x86_64 ...
*         >> Compiling 6.12.41-gentoo-x86_64 bzImage ...
*         >> Compiling 6.12.41-gentoo-x86_64 modules ...
*         >> Installing 6.12.41-gentoo-x86_64 modules (and stripping) ...
*         >> Generating module dependency data ...
*         >> Compiling out-of-tree module(s) ...
*         >> Saving config of successful build to '/etc/kernels/kernel-config-6.12.41-gentoo-x86_64' ...

* initramfs: >> Initializing ...
*         >> Appending devices cpio data ...
*         >> Appending base_layout cpio data ...
*         >> Appending util-linux cpio data ...
*         >> Appending eudev cpio data ...
*         >> Appending devicemanager cpio data ...
*         >> Appending auxiliary cpio data ...
*         >> Appending busybox cpio data ...
*         >> Appending luks cpio data ...
*         >> Appending lvm cpio data ...
*         >> Appending modprobed cpio data ...
*         >> Appending firmware cpio data ...
*         >> Appending modules cpio data ...
*         >> Deduping cpio ...
*         >> Pre-generating initramfs' /etc/ld.so.cache ...
*         >> Compressing cpio data (.xz) ...

* Kernel compiled successfully!
* 
* You can customize Grub2 parameters in /etc/default/grub.
* Running grub-mkconfig to create '/boot/grub/grub.cfg' ...
* 
* Required kernel parameter:
* 
*       root=/dev/$ROOT
* 
* Where $ROOT is the device node for your root partition as the
* one specified in /etc/fstab

* WARNING... WARNING... WARNING...
* Additional kernel parameters that *may* be required to boot properly:
* - Add "dolvm" for LVM support
* - Add "crypt_root=<device>" for LUKS-encrypted root
* - Add "crypt_swap=<device>" for LUKS-encrypted swap

* Do NOT report kernel bugs as genkernel bugs unless your bug
* is about the default genkernel configuration...
* 
* Make sure you have the latest ~arch genkernel before reporting bugs.
So it seems he's importing and overwriting a config file from /etc/kernels - BUT i have a few kernels installed, NOT in use, so there is ONLY a configfile when i make "genkernel all". How can i make a config file and keep it?

Moderator note: Fixed a long design breaking line. -- Banana
Top
Gladdle
Guru
Guru
User avatar
Posts: 348
Joined: Sun Jul 27, 2008 12:44 am
Location: Cleebronn, Germany
Contact:
Contact Gladdle
Website

  • Quote

Post by Gladdle » Mon Sep 15, 2025 2:17 pm

I am an Idiot who should learn to read:

Code: Select all

# =========COMPILED UTILS CONFIGURATION=========
#
# Default location of kernel source
DEFAULT_KERNEL_SOURCE="/usr/src/linux"

# Default kernel config (only use to override using
# arch/%%ARCH%%/kernel-config-${VER}.${PAT} !)
#DEFAULT_KERNEL_CONFIG="${GK_SHARE}/arch/%%ARCH%%/kernel-config"
DEFAULT_KERNEL_CONFIG="/usr/src/linux/.config"
Problem maybe solved, but not tested yet.
Top
oxensepp
n00b
n00b
Posts: 52
Joined: Fri May 01, 2020 9:53 pm

  • Quote

Post by oxensepp » Mon Dec 01, 2025 11:56 pm

Thank you for this post. I stumbled also across this issue.

BTW, there ist also a command line option, "--kernel-config=/etc/kernels/kernel-config-6.12.41-gentoo-x86_64"

Is this new? It looks like that I did not need it until now, so I am wondering.
Top
jburns
Veteran
Veteran
Posts: 1255
Joined: Thu Jan 18, 2007 4:44 am
Location: Massachusetts USA

  • Quote

Post by jburns » Tue Dec 02, 2025 12:57 am

The command line option "--kernel-config=/proc/config.gz" can be used to use the config of the running kernel if the config was built into the kernel.
Top
Post Reply

4 posts • Page 1 of 1

Return to “Kernel & Hardware”

Jump to
  • Assistance
  • ↳   News & Announcements
  • ↳   Frequently Asked Questions
  • ↳   Installing Gentoo
  • ↳   Multimedia
  • ↳   Desktop Environments
  • ↳   Networking & Security
  • ↳   Kernel & Hardware
  • ↳   Portage & Programming
  • ↳   Gamers & Players
  • ↳   Other Things Gentoo
  • ↳   Unsupported Software
  • Discussion & Documentation
  • ↳   Documentation, Tips & Tricks
  • ↳   Gentoo Chat
  • ↳   Gentoo Forums Feedback
  • ↳   Duplicate Threads
  • International Gentoo Users
  • ↳   中文 (Chinese)
  • ↳   Dutch
  • ↳   Finnish
  • ↳   French
  • ↳   Deutsches Forum (German)
  • ↳   Diskussionsforum
  • ↳   Deutsche Dokumentation
  • ↳   Greek
  • ↳   Forum italiano (Italian)
  • ↳   Forum di discussione italiano
  • ↳   Risorse italiane (documentazione e tools)
  • ↳   Polskie forum (Polish)
  • ↳   Instalacja i sprzęt
  • ↳   Polish OTW
  • ↳   Portuguese
  • ↳   Documentação, Ferramentas e Dicas
  • ↳   Russian
  • ↳   Scandinavian
  • ↳   Spanish
  • ↳   Other Languages
  • Architectures & Platforms
  • ↳   Gentoo on ARM
  • ↳   Gentoo on PPC
  • ↳   Gentoo on Sparc
  • ↳   Gentoo on Alternative Architectures
  • ↳   Gentoo on AMD64
  • ↳   Gentoo for Mac OS X (Portage for Mac OS X)
  • Board index
  • All times are UTC
  • Delete cookies

© 2001–2026 Gentoo Foundation, Inc.

Powered by phpBB® Forum Software © phpBB Limited

Privacy Policy