View previous topic :: View next topic |
Author |
Message |
librin.so.1 n00b
Joined: 16 Sep 2014 Posts: 4 Location: Kaunas, Lithuania
|
Posted: Thu Nov 21, 2024 2:06 pm Post subject: genkernel keeps overwriting .config |
|
|
How do I stop genkernel from trying to overwrite my .config?
All I want genkernel to do here is build the kernel with the .config file provided, exactly as-is, yet it keeps trying to change it as if it knows better (it doesn't).
I read through the man page, yet I cannot find an option to not do this.
I tried to chattr +i .config, but that only makes genkernel barf and quit as it tries to change it. _________________ "why do you wear glasses if you're deaf?" –Kenji |
|
Back to top |
|
|
grknight Retired Dev
Joined: 20 Feb 2015 Posts: 1926
|
Posted: Thu Nov 21, 2024 2:42 pm Post subject: |
|
|
--no-clean option, or, better, copy the config to /etc/kernels/ with a name like kernel-config-x86_64-6.6.52-gentoo which varies by kernel build arch and version
genkernel always prefers the config in /etc/kernels/ if it exists |
|
Back to top |
|
|
logrusx Advocate
Joined: 22 Feb 2018 Posts: 2447
|
Posted: Thu Nov 21, 2024 3:09 pm Post subject: |
|
|
I stopped using genkernel a long time ago exactly because of its strange behavior. It also was unable to produce initramf which would enable my touchpad, no matter what. I moved to dracut because it was used in gentoo-kernel who's pre-built counterpart did enable my touchpad. Later I abandoned those tools altogether and stopped using intramfs. If you don't need initramfs, that's a viable option. You just need a few things built into the kernel, including some firmware and microcode if your hardware needs any.
Best Regards,
Georgi |
|
Back to top |
|
|
librin.so.1 n00b
Joined: 16 Sep 2014 Posts: 4 Location: Kaunas, Lithuania
|
Posted: Thu Nov 21, 2024 5:08 pm Post subject: |
|
|
A big thank you for all the replies!
grknight wrote: | --no-clean option, or, better, copy the config to /etc/kernels/ with a name like kernel-config-x86_64-6.6.52-gentoo which varies by kernel build arch and version
genkernel always prefers the config in /etc/kernels/ if it exists |
I already run it with both --no-clean and --no-mrproper options.
To clarify, it doesn't clean away the .config file, it modifies it. It also modifies the config file if I put it under /etc/kernels/
to give a few examples of what it does (but this is not an exhaustive list, if I would list everything, the post would be uncomfortably long)
- it changes CONFIG_LOCALVERSION and there seems to be no option to avoid that. At the time of writing, the only options I managed to find are: either default behavior (overwrite it with dash-µarch e.g. -x86_64, set it with --kernel-localversion or append something to the default one with --kernel-append-localversion. But an option to simply not touch it and use CONFIG_LOCALVERSION as already set in the .config file? Nope.
- it sets options such as CONFIG_MD_RAID{0,1,10,456} and some other options, too, if --mdadm option is given. I need mdadm support, but I don't want it to change the kernel config.
again, the list is non-exhaustive; I don't want to barf a wall of text here listing every single such case.
some background: I used to run Gentoo some years ago, until I moved to Funtoo for reasons I don't remember.
When I used Gentoo back in the day, genkernel wouldn't attempt to modify the kernel config like this, neither would the Funtoo fork of genkernel would do it. Several months ago, as Funtoo has been EOL'd I moved back to Gentoo and now genkernel is doing very unexpected things – namely changing my kernel config no matter what and with no clear way to make it stop. Assuming it can stop. I fear it has been changed far too much and always tries to be """smart""" where, in my case, it ought not do so.
So far I have kept around a partition containing a Funtoo installation on one of my machines specifically so I could chroot into it and build me a kernel+initramfs, but that's just silly.
I need to find a solution from within Gentoo itself.
logrusx wrote: | I stopped using genkernel a long time ago exactly because of its strange behavior. It also was unable to produce initramf which would enable my touchpad, no matter what. I moved to dracut because it was used in gentoo-kernel who's pre-built counterpart did enable my touchpad. Later I abandoned those tools altogether and stopped using intramfs. If you don't need initramfs, that's a viable option. You just need a few things built into the kernel, including some firmware and microcode if your hardware needs any. |
in my case, I absolutely need an initramfs due to reasons including, but not limited to:
- the root partition on all my machines is encrypted
- /boot and / are not even on the same device
_________________ "why do you wear glasses if you're deaf?" –Kenji |
|
Back to top |
|
|
szatox Advocate
Joined: 27 Aug 2013 Posts: 3443
|
Posted: Thu Nov 21, 2024 5:15 pm Post subject: |
|
|
--oldconfig
Other than that, genkernel always updates stuff like local build version, and AFAIR there were some things it used to pull from genkernel's config and force onto linux/.config, though looking at my genkernel.conf I can't remember what it was. _________________ Make Computing Fun Again |
|
Back to top |
|
|
logrusx Advocate
Joined: 22 Feb 2018 Posts: 2447
|
Posted: Thu Nov 21, 2024 5:17 pm Post subject: |
|
|
librin.so.1 wrote: |
in my case, I absolutely need an initramfs |
You can have it as part of the kernel itself, though I can't give you details on that.
Best Regards,
Georgi |
|
Back to top |
|
|
|
|
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
|
|