View previous topic :: View next topic |
Author |
Message |
ceramide n00b
Joined: 27 Jun 2022 Posts: 11
|
Posted: Mon Jun 27, 2022 9:06 pm Post subject: [SOLVED] Revert changes to kernel config? |
|
|
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 |
|
|
alamahant Advocate
Joined: 23 Mar 2019 Posts: 3914
|
Posted: Mon Jun 27, 2022 9:09 pm Post subject: |
|
|
Try
Code: |
zcat /proc/config.gz > /usr/src/linux/.config
|
Welcome to Gentoo Forums! _________________
|
|
Back to top |
|
|
CaptainBlood Advocate
Joined: 24 Jan 2010 Posts: 3788
|
Posted: Mon Jun 27, 2022 9:13 pm Post subject: |
|
|
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 |
|
|
sabayonino Veteran
Joined: 03 Jan 2012 Posts: 1023
|
Posted: Mon Jun 27, 2022 10:38 pm Post subject: |
|
|
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 |
|
|
ceramide n00b
Joined: 27 Jun 2022 Posts: 11
|
Posted: Tue Jun 28, 2022 10:40 am Post subject: |
|
|
Solved. Thanks everyone for the help and advice. I used the command posted by alamahant to “reset” the kernel config. |
|
Back to top |
|
|
|