Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
make oldconfig does not work anymore?
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
Ja.KooLit
Tux's lil' helper
Tux's lil' helper


Joined: 14 Feb 2022
Posts: 108
Location: Somewhere Over There!

PostPosted: Sat May 18, 2024 3:22 am    Post subject: make oldconfig does not work anymore? Reply with quote

For the past weeks or so, Ive noticed that when there is a new kernel update, after installing, selecting,

invoking the command make oldconfig

got message using defaults found in arch/x86/configs/x86_64_defconfig

Restart config.....

and then will go through configuring the kernel again from scratch

This was not the case before....


I am on gentoo-sources, using my pre-configured kernel for like a year already

System setup:
gentoo-sources
global ~amd64

luckily, I always backup my configs.

so what I do is to copy my old .config into /usr/src/linux/

ran make oldconfig
it will come back with no changes on configs... so I wouldnt know if there are no new updates or changes on kernel cause invoking the command make oldconfig will check the previous configs and compare with new lkernel

am I missing something?
_________________
Oh Yeah!!!
Back to top
View user's profile Send private message
gentoo_ram
Guru
Guru


Joined: 25 Oct 2007
Posts: 479
Location: San Diego, California USA

PostPosted: Sat May 18, 2024 4:39 am    Post subject: Reply with quote

Sounds like the expected behavior to me. You need to have your existing config at $O/.config where O is typically at the top level of the kernel source tree (unless you specify otherwise) Ever time you install a new set of gentoo-sources a totally new directory is created that will be pristine. So you have to copy your config into there. Maybe you were using a setup before you updating the source into the same directory tree (like, say, with git) and were implicitly using the same .config.

My typical commands would be something like:
Code:
# emerge gentoo-sources-6.8.3
# cd /usr/src
# cp linux/.config linux-6.8.3-gentoo/
# ln -sf linux-6.8.3-gentoo linux
# cd linux/
# make oldconfig
Back to top
View user's profile Send private message
logrusx
Veteran
Veteran


Joined: 22 Feb 2018
Posts: 1613

PostPosted: Sat May 18, 2024 6:16 am    Post subject: Reply with quote

First, as explained above, you need to have your old .config present in the kernel sources directory already. At a moment in time, if it didn't find and existing config, it detected the running kernel and took the corresponding config from /boot, if present. I don't know if it still does, but there's no reason that changed. So I guess you accidentally deleted it from there as well. Or maybe it was doing that all along and you changed something. Is your /boot mounted on a separate partition? Do you have it mounted during the process?

Did you read the following news items:

https://www.gentoo.org/support/news-items/2024-03-12-debianutils-installkernel.html
https://www.gentoo.org/support/news-items/2024-02-01-installkernel-new-use-systemd-boot.html

Second, make oldconfig is most useful when migrating from older versions or revisions. Not that it doesn't work for patch levels, but it's not that useful and might not have anything to do if there aren't any new configuration options.

Best Regards,
Georgi
Back to top
View user's profile Send private message
Ja.KooLit
Tux's lil' helper
Tux's lil' helper


Joined: 14 Feb 2022
Posts: 108
Location: Somewhere Over There!

PostPosted: Sat May 18, 2024 4:39 pm    Post subject: Reply with quote

hmmm something must have changed then....

so please explain what I did wrong because before, I see that the config was copied into /boot and seems that it does not anymore

Here is what I do before and even now,,,

emerge gentoo-sources
eselect kernel set to new gentoo-sources
cd /usr/src/linux

make oldconfig
_________________
Oh Yeah!!!
Back to top
View user's profile Send private message
wjb
l33t
l33t


Joined: 10 Jul 2005
Posts: 612
Location: Fife, Scotland

PostPosted: Sat May 18, 2024 4:46 pm    Post subject: Reply with quote

Assuming you have set CONFIG_IKCONFIG_PROC,
Quote:

emerge gentoo-sources
eselect kernel set to new gentoo-sources
cd /usr/src/linux
zcat /proc/config.gz >.config <--------- NEED THIS TO GET THE CURRENT .config FILE
make oldconfig
Back to top
View user's profile Send private message
pietinger
Moderator
Moderator


Joined: 17 Oct 2006
Posts: 4392
Location: Bavaria

PostPosted: Sat May 18, 2024 4:51 pm    Post subject: Reply with quote

Ja.KooLit wrote:
hmmm something must have changed then....

Maybe ... there was a time (I dont remember) ... when no .config file was in your current directory, some was searched in /boot/....

Ja.KooLit wrote:
emerge gentoo-sources
eselect kernel set to new gentoo-sources
cd /usr/src/linux

make oldconfig


Change it to:
Ja.KooLit wrote:
emerge gentoo-sources
eselect kernel set to new gentoo-sources
cd /usr/src/linux
cp /FROM/OLD/usr/src/linux-X.Y.Z/.config .
make oldconfig

OR do the other way around:
1. Changing into the new sources
2. COPY .config from /usr/src/linux to .
3. make all what you want
4. Change softlink with eselect

(I recommend this here:
https://wiki.gentoo.org/wiki/User:Pietinger/Tutorials/Manual_kernel_configuration#Cheat_Sheets
because I gave here the explanation for this:
https://wiki.gentoo.org/wiki/User:Pietinger/Tutorials/Selecting_a_convenient_kernel_version#USE_flags
_________________
https://wiki.gentoo.org/wiki/User:Pietinger
Back to top
View user's profile Send private message
logrusx
Veteran
Veteran


Joined: 22 Feb 2018
Posts: 1613

PostPosted: Sat May 18, 2024 6:27 pm    Post subject: Reply with quote

Ja.KooLit wrote:
hmmm something must have changed then....

so please explain what I did wrong because before, I see that the config was copied into /boot and seems that it does not anymore


What's changes is in the news items I linked above.

What's the output of:

Code:
emerge -pv installkernel


p.s. ops, I've missed this one: https://www.gentoo.org/support/news-items/2024-01-18-installkernel-merge.html

Best Regards,
Georgi
Back to top
View user's profile Send private message
szatox
Advocate
Advocate


Joined: 27 Aug 2013
Posts: 3180

PostPosted: Sat May 18, 2024 9:28 pm    Post subject: Reply with quote

Quote:
luckily, I always backup my configs.
My configs are automagically archieved to /etc/kernels; I think it's genkernel's doing, so there's a good chance you have them too.
Funny thing, I actually allowed portage to remove installkernel, yet it didn't stop genkernel from updating grub.cfg even though the news linked above suggests things should break.

Anyway, oldconfig works just fine on ~amd64; copy the your customized (and possibly outdated) config to /usr/src/linux/.config and go, go, go!
With .config absent you are just merging the defconfig with an empty set, which doesn't really do anything, but it is the expected behavior. Like in: it makes perfect sense.
_________________
Make Computing Fun Again
Back to top
View user's profile Send private message
Ja.KooLit
Tux's lil' helper
Tux's lil' helper


Joined: 14 Feb 2022
Posts: 108
Location: Somewhere Over There!

PostPosted: Sun May 19, 2024 1:59 am    Post subject: Reply with quote

Thanks guys...

sorry I cant quote or reply to all of your inputs...


So i have a feeling that there were lots of changes for the past few months (yes my last compile was Jan 2024) and then ran an update last month and these are things I have noticed...

Anyway, Ive learned that there were changes on the installkernel stuff


I also found this
https://forums.gentoo.org/viewtopic-t-1167824.html?sid=aba17fe257e712861a02a508fdc54956

which is what I also experienced recently but now it is all fine..

I have tried copying my old config into /usr/src/linux

and then running make oldconfig seems to be working fine..

Odd thing was, I NEVER have to copy any configs to my /usr/src/linux before, but now seems like I have to

However, I was also not perfectly clear since I use genkernel to generate my initramfs before.. (although I dont think it matters)

But now I just let dracut handle it.. (much convenient)



Moving further,

Thanks again guys to all of you spend some time to explain plus adding some links that I can go through
_________________
Oh Yeah!!!
Back to top
View user's profile Send private message
logrusx
Veteran
Veteran


Joined: 22 Feb 2018
Posts: 1613

PostPosted: Sun May 19, 2024 5:07 am    Post subject: Reply with quote

Without knowing the actual situation I'll speculate: disable all use flags on installkernel and you'll get the behavior you're used to.

Best Regards,
Georgi
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