# How can I reset my Kernel Config?

## doubled157940

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.

----------

## asturm

Just remove it from the kernel directory.

----------

## i92guboj

 *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.

----------

## doubled157940

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?

----------

## asturm

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.  :Wink: 

----------

## doubled157940

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.

----------

## NeddySeagoon

doubled157940,

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

----------

## eccerr0r

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  :Very Happy: 

----------

## cwr

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

----------

## rabcor

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.

----------

