Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
How can I reset my Kernel Config?
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
doubled157940
Tux's lil' helper
Tux's lil' helper


Joined: 13 Sep 2006
Posts: 85

PostPosted: Fri Sep 12, 2008 8:00 pm    Post subject: How can I reset my Kernel Config? Reply with quote

As the subject says, I would like to know how can I reset my Kernel Config. I've gotten it to the point where I am unable to make any new kernels to boot without having a kernel panic during boot. I am unsure what is the cause but instead of spending hours tracking it down, I would like to just reset the kernel config back to the working on I got after installing Gentoo. I do currently have one working kernels but two grub entries, one is the original working one made during the Gentoo install, and the other one is the rescue mode of the same kernel. The original .config has since been modified and I was stupid enough to make a backup of the original .config. Just as a note: I don't use genkernel, I modify and compile the kernel manually. What can I do to get a new unmodified .config again without reinstalling Gentoo.

Thank You

P.S.: If any more information is needed from the machine, please let me know and I'll get it ASAP.
_________________
Gentoo は行く方法である!
<Translation>
Gentoo is the way to go!
Back to top
View user's profile Send private message
genstorm
Advocate
Advocate


Joined: 05 Apr 2007
Posts: 2467
Location: Austria

PostPosted: Fri Sep 12, 2008 8:04 pm    Post subject: Reply with quote

Just remove it from the kernel directory.
_________________
backend.cpp:92:2: warning: #warning TODO - this error message is about as useful as a cooling unit in the arctic
Back to top
View user's profile Send private message
i92guboj
Moderator
Moderator


Joined: 30 Nov 2004
Posts: 9896
Location: Córdoba (Spain)

PostPosted: Fri Sep 12, 2008 8:06 pm    Post subject: Reply with quote

genstorm wrote:
Just remove it from the kernel directory.


Just for clarification, enter the kernel source directory and remove .config (mind the dot in front of the name).

However, I doubt this is going to help you. You need to actually understand the error to know why it's not booting to be able to add the relevant pieces.
_________________
Gentoo Handbook | My website
Back to top
View user's profile Send private message
doubled157940
Tux's lil' helper
Tux's lil' helper


Joined: 13 Sep 2006
Posts: 85

PostPosted: Fri Sep 12, 2008 8:11 pm    Post subject: Reply with quote

My concern about just removing the .config is that I'm not sure if the Kernel will make a new .config with minimum options turned on similar to what the LiveCD does. Does it? If not, should I then go through the LiveCD for this like during install?
_________________
Gentoo は行く方法である!
<Translation>
Gentoo is the way to go!
Back to top
View user's profile Send private message
genstorm
Advocate
Advocate


Joined: 05 Apr 2007
Posts: 2467
Location: Austria

PostPosted: Fri Sep 12, 2008 8:17 pm    Post subject: Reply with quote

Just try it out, it should have those same minimal options. If it doesn't - you don't have to completely remove your .config file, just move it out of the directory.

@i92guboj: With doubled157940 mentioning .config I assumed that he/she already knew where to go. ;)
_________________
backend.cpp:92:2: warning: #warning TODO - this error message is about as useful as a cooling unit in the arctic
Back to top
View user's profile Send private message
doubled157940
Tux's lil' helper
Tux's lil' helper


Joined: 13 Sep 2006
Posts: 85

PostPosted: Fri Sep 12, 2008 8:22 pm    Post subject: Reply with quote

Yep, I know where to go. I can understand the concern since I'm still labeled n00b. No worries though.

Alright, I'll have to try it out later today, I'm currently not sitting in front of the machine and can't for another couple of hours. I'll post again when I have. Thanks for the quick replies.
_________________
Gentoo は行く方法である!
<Translation>
Gentoo is the way to go!
Back to top
View user's profile Send private message
NeddySeagoon
Administrator
Administrator


Joined: 05 Jul 2003
Posts: 32027
Location: 56N 3W

PostPosted: Fri Sep 12, 2008 8:57 pm    Post subject: Reply with quote

doubled157940,

Tell us the panic message, we may be able to help fix it
_________________
Regards,

NeddySeagoon

Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail.
Back to top
View user's profile Send private message
eccerr0r
Advocate
Advocate


Joined: 01 Jul 2004
Posts: 3964
Location: USA

PostPosted: Fri Sep 12, 2008 11:08 pm    Post subject: Reply with quote

If you have a working kernel that exports .config in /proc/config or /proc/config.gz it's a good idea to start from there.

I've found that simply deleting .config and starting from scratch has a high possibility of omitting necessary drivers, and sometimes I've forgotten disk drivers and gotten the dreaded "can't open root vfs" panic... but that's just me :D
_________________
Intel Core i7 2700K@ 4.1GHz/HD3000 graphics/8GB DDR3/180GB SSD
What am I supposed to be advocating?
Back to top
View user's profile Send private message
cwr
Veteran
Veteran


Joined: 17 Dec 2005
Posts: 1690

PostPosted: Sat Sep 13, 2008 11:49 am    Post subject: Reply with quote

If you don't have the .config from a working kernel, you may be able to find
the default setup in a portage release snapshot - eg: the 2008.0 release.
I _think_ the setup is in /etc/kernels, but I don't have a machine by me to
check. If so, do "make clean" and then rebuild the whole kernel from
scratch to make sure there's no left-over debris.

I tend to save the original kernel config (from the Live CD/DVD kernel) and
then name my build kernels "-1" or whatever, so that there's always a working
version to go back to.

Will
Back to top
View user's profile Send private message
rabcor
Apprentice
Apprentice


Joined: 05 Apr 2012
Posts: 200

PostPosted: Fri Sep 28, 2012 9:58 pm    Post subject: Reply with quote

Sorry to revive an old thread and being a terrible noob... but i'm having a similar problem.
i tried all the things mentioned in here, except trying to get the config file from a recent portage snapshot (i just don't even know how i'd do that)... either way, nothing i've done is working and i also tried make defconf and i tried unmerging and then emerging the sources again, nothing gave me the original config file which i so need... and just this one time forgot to save.

are there any other ideas how to do this? i thought of putting in the livecd, following the handbook to the point where i emerge the sources then take the .config file from there, but that sounds rather tedious and i'm feeling too lazy to right now...

my /etc/kernels/* file is for some reason set to the same settings as my current .config file, and i don't have the .bak either because i deleted the folders and all after my unmerge.
_________________
This picture was my biggest reason for ever trying Gentoo <3
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