LinuxQuestions.org
LinuxAnswers - the LQ Linux tutorial section.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Gentoo
User Name
Password
Gentoo This forum is for the discussion of Gentoo Linux.

Notices



Reply
 
Search this Thread
Old 01-28-2012, 11:29 AM   #1
steve_pa
LQ Newbie
 
Registered: Jan 2012
Location: Houston Tx USA
Distribution: Debian/SuSE/Gentoo/Arch
Posts: 16

Rep: Reputation: Disabled
Original .conf file for Custom Kernel compile


Greetings

After compiling a series of custom kernels, I would like to compare my modified .config file to the original .config file as it was before I started.

Where is the location of that original unmodified file?

Regards
Steve.
 
Old 01-29-2012, 03:56 AM   #2
TobiSGD
Moderator
 
Registered: Dec 2009
Location: Hanover, Germany
Distribution: Main: Gentoo Others: What fits the task
Posts: 15,653
Blog Entries: 2

Rep: Reputation: 4095Reputation: 4095Reputation: 4095Reputation: 4095Reputation: 4095Reputation: 4095Reputation: 4095Reputation: 4095Reputation: 4095Reputation: 4095Reputation: 4095
You should find it in the /boot directory.
 
Old 01-29-2012, 04:02 AM   #3
ukiuki
Senior Member
 
Registered: May 2010
Location: Planet Earth
Distribution: Debian
Posts: 1,030

Rep: Reputation: 371Reputation: 371Reputation: 371Reputation: 371
Should be at /boot it is a good idea to save one .config for each serie you compile, something like .config-01 .config-02 etc. You can skip the dot in the begin to make it visible.

You can use something like this to copy your original/current running kernel:
Code:
cp /boot/config-$(uname -r) ./.config
Regards
 
Old 01-29-2012, 11:25 AM   #4
steve_pa
LQ Newbie
 
Registered: Jan 2012
Location: Houston Tx USA
Distribution: Debian/SuSE/Gentoo/Arch
Posts: 16

Original Poster
Rep: Reputation: Disabled
@Tobi and uk

When I look in /boot I don't see any files that look like .config file contents.

I guess this is all sounding like something I could have figured out myself. :-(
So much is learned by trial and error, but I don't want to mess up this install.

Now, about /boot, maybe you meant the directory /usr/src/linux? This has a number of files there, like:
.config - what I assume is the config file I last used to compile a custom kernel
.config--2012*-bak - which appear to be backups.
.Kconfig - appears to be some kind of non kernel config file.

It's just when I did a diff between the .config and the .config--2012*-bak's, I was not absolutely sure which one was the original file.

Another question: Would re-emerge-ing the gentoo-sources re-establish my system's /usr/src/linux hierarchy? (If I wanted to start fresh...)
#emerge --unmerge gentoos-sources
#emerge gentoo-sources
#cd /usr/src/linux;make menuconfig

Reading the handbooks's description of removing software, makes me think it would leave the old kernel config files behind (and not really starting me over from scratch), or worse, break the system due to dependencies.

Another question is if I just delete or rename the .config file, and rerun make menuconfig, what will really happen?

I did copy the /usr/src/linux config files to a safe place, now!

Sorry if all this is obvious.
TIA
Steve.

Last edited by steve_pa; 01-29-2012 at 11:43 AM.
 
Old 01-29-2012, 01:18 PM   #5
TobiSGD
Moderator
 
Registered: Dec 2009
Location: Hanover, Germany
Distribution: Main: Gentoo Others: What fits the task
Posts: 15,653
Blog Entries: 2

Rep: Reputation: 4095Reputation: 4095Reputation: 4095Reputation: 4095Reputation: 4095Reputation: 4095Reputation: 4095Reputation: 4095Reputation: 4095Reputation: 4095Reputation: 4095
Quote:
Originally Posted by steve_pa View Post
Now, about /boot, maybe you meant the directory /usr/src/linux?
No, I meant /boot. If your distro isn't something special you should see a file named config-YOURKERNELVERSION, where YOURKERENLVERSION is the version of the default kernel of that distribution. All distros i know of put that there. If it really is missing it is very simple to get the config of the default kernel. Just boot with it and launch
Code:
zcat /proc/config.gz > config-default_kernel
This will generate a file config-default_kernel with the configuration of the currently running kernel.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Is it possible to create a custom font.conf file Rick069 Linux - General 1 06-04-2011 04:14 PM
Debian 6.0 - custom kernel compile Kernel panic - not syncing: VFS: Unable to mount Bono Debian 5 05-06-2011 07:18 PM
Cannot compile custom kernel. Error. miros84 Linux - Software 7 01-29-2010 07:47 AM
Retain original squid.conf file ALInux Linux - Networking 1 06-02-2006 11:16 PM
How to compile the Kernel with Custom Name madcat87 Linux - Newbie 4 12-21-2005 08:59 PM


All times are GMT -5. The time now is 11:43 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration