Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
[SOLVED] Revert changes to kernel config?
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Other Things Gentoo
View previous topic :: View next topic  
Author Message
ceramide
n00b
n00b


Joined: 27 Jun 2022
Posts: 11

PostPosted: Mon Jun 27, 2022 9:06 pm    Post subject: [SOLVED] Revert changes to kernel config? Reply with quote

Hello!

I used make menuconfig to edit and prepare my kernel for xorg and proprietary nvidia. However, I realised shortly after that since I used genkernel to set up my kernel, I didn’t need to edit it.

Is there an easy way to revert the changes I’ve done to the config? I’ve saved the changes but I haven’t compiled it yet, so can I replace the edited config with the unedited one that’s currently active?

I’d appreciate your help command by command, as I’m new. Thanks!


Last edited by ceramide on Tue Jun 28, 2022 10:40 am; edited 1 time in total
Back to top
View user's profile Send private message
alamahant
Advocate
Advocate


Joined: 23 Mar 2019
Posts: 3879

PostPosted: Mon Jun 27, 2022 9:09 pm    Post subject: Reply with quote

Try
Code:

zcat /proc/config.gz > /usr/src/linux/.config

Welcome to Gentoo Forums!
_________________
:)
Back to top
View user's profile Send private message
CaptainBlood
Advocate
Advocate


Joined: 24 Jan 2010
Posts: 3642

PostPosted: Mon Jun 27, 2022 9:13 pm    Post subject: Reply with quote

Hi, ceramide,
Welcome to gentoo.

I dunno nothing about genkernel...
Still, in the kernel directory from where you launched 'make menuconfig', you could launch:
Code:
amd64 /usr/src/linux-5.15.43-gentoo-r8168 # ls -la .config*
-rw-r--r-- 1 root root 115528 mai   29 04:02 .config
-rw-r--r-- 1 root root 115339 mai   14 16:47 .config.old
You could investigate a little further with
Code:
amd64 /usr/src/linux-5.15.43-gentoo-r8168 # diff .config .config.old
Thks 4 ur attention, interest & support.
_________________
USE="-* ..." in /etc/portage/make.conf here, i.e. a countermeasure to portage implicit braces, belt & diaper paradigm
LT: "I've been doing a passable imitation of the Fontana di Trevi, except my medium is mucus. Sooo much mucus. "
Back to top
View user's profile Send private message
sabayonino
Veteran
Veteran


Joined: 03 Jan 2012
Posts: 1016

PostPosted: Mon Jun 27, 2022 10:38 pm    Post subject: Reply with quote

Hi
As CaptainBlood wrote , If you like gekernel tool I suggest following

genkernel and its options to save and recall your various config (or test config)

Basically I run

Code:

Make a copy of running kernel config ;
# zcat /proc/config.gz > /etc/kernels/my_running_config

# genkernel --save-config --kernel-config=/your/custom/kernel/config_file --install --menuconfig all

No need to run --menuconfig when then kernel config is not edited
By default genkernel save the config in /etc/kernels directory when --save-config is used ,

See genkernel manual
_________________
LRS i586 on G.Drive
LRS x86-64 EFI on MEGA
Back to top
View user's profile Send private message
ceramide
n00b
n00b


Joined: 27 Jun 2022
Posts: 11

PostPosted: Tue Jun 28, 2022 10:40 am    Post subject: Reply with quote

Solved. Thanks everyone for the help and advice. I used the command posted by alamahant to “reset” the kernel config.
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Other Things Gentoo 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