Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Location of .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
mounty1
l33t
l33t


Joined: 06 Jul 2006
Posts: 942
Location: Queensland

PostPosted: Sat May 26, 2007 1:54 am    Post subject: Location of .config Reply with quote

It would be nice to have all configuration files under /etc. Mostly they are, except for /usr/src/linux/.config. Now I know you can argue that this is of a different kind of file, being related to the system etc., but still, it seems to me, it would be useful to have it under /etc; that way, you only have to back-up /etc to have a complete snapshot of your system state, to enable rebuilding or replication. Oh, there's /var/lib/portage/world as well of course.

I'm suggesting that the kernel configuration file should be held or at least copied to /etc/kconfig/linux-2.6.20-gentoo-r8 or whatever your kernel is called.
_________________
Michael Mounteney
Back to top
View user's profile Send private message
John R. Graham
Administrator
Administrator


Joined: 08 Mar 2005
Posts: 10727
Location: Somewhere over Atlanta, Georgia

PostPosted: Sat May 26, 2007 2:28 am    Post subject: Reply with quote

Coincidentally, that's almost exactly what the Gentoo genkernel package does. It put them in /etc/kernels and manages them for you, too. As I write this, I have
Code:
ceres ~ # ls /etc/kernels/
kernel-config-x86-2.6.11-gentoo-r9   kernel-config-x86-2.6.14-gentoo-r2
kernel-config-x86-2.6.12-gentoo-r10  kernel-config-x86-2.6.14-gentoo-r4
kernel-config-x86-2.6.12-gentoo-r6   kernel-config-x86-2.6.19-reiser4-r5
kernel-config-x86-2.6.12-gentoo-r9   kernel-config-x86-2.6.20-reiser4-r8
ceres ~ #
Genkernel also manages the generation of an initrd and (through that) a splash screen (and other features). The man page is rather extensive.

- John
Back to top
View user's profile Send private message
kEiNsTeiN
Guru
Guru


Joined: 29 Apr 2005
Posts: 361
Location: Germany

PostPosted: Sun May 27, 2007 12:51 am    Post subject: Reply with quote

bit isn't genkernel for "noobs" ? and isn't it slower than a plain kernel? so wouldn't it make more sense, as a gentoo user, who automatically is more experienced in linux console stuff than an ubuntu-user, to use what ever is most complicated/fast?
yeah, I thought so :P

I personally use for kernel compilations:
Code:
keinstein ~ # cat /root/kernelupdate
mount /boot
cd /usr/src/linux
make
make modules_install
make install
umount /boot
emerge nvidia-drivers ndiswrapper vmware-modules


you could add something like:
Code:
cd /usr/src/linux
mkdir -p /etc/kconfig/$(pwd -P)
cp .config /etc/kconfig/$(pwd -P)/


there probably is a smarter way to do that (find out where a link leads to without cd'ing to it and using pwd ;) ), but I'm not sure how to...

using directories instead of files is smarter, as it gives you more choices (1. easier to copy a file from the "backup", 2. ability to store more than one (maybe with `date`)
Back to top
View user's profile Send private message
John R. Graham
Administrator
Administrator


Joined: 08 Mar 2005
Posts: 10727
Location: Somewhere over Atlanta, Georgia

PostPosted: Sun May 27, 2007 1:21 am    Post subject: Reply with quote

Genkernel will build the exact kernel that the .config file tells it to. It can invoke the "make menuconfig" configuration menu, let you customize everything you want, and then do essentially the steps you describe. Plus, putting together an initrd is a bit of a chore and, if you need one, genkernel does all the work. It also automatically manages a simple database of configurations, as described in the previous post. In short, you can produce the exact same kernel with both methods. It's just a matter of choice. (Hmm. Seems like I've heard that before somewhere. :wink: )

I do both, primarily using genkernel for systems where I need an initrd. But, genkernel is just fine for highly customized kernels and doesn't, of itself, impose any limitations on what you can do.

- John
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