Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
/etc/kernels missing?
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
braver
n00b
n00b


Joined: 29 Dec 2006
Posts: 28

PostPosted: Mon Jan 22, 2007 5:47 am    Post subject: /etc/kernels missing? Reply with quote

I'm emerging suspend2-sources, using the .config I crafted before, and the kernel guide describes how:

http://www.gentoo.org/doc/en/kernel-upgrade.xml

Code Listing 10.1: Reusing your old config

# cd /usr/src/linux-2.6.9-gentoo-r2
# cp ../linux-2.6.9-gentoo-r1/.config .
# make oldconfig

Code Listing 10.2: Reusing your old config with genkernel

# cd /etc/kernels
# cp kernel-config-x86-2.6.9-gentoo-r1 kernel-config-x86-2.6.9-gentoo-r2
# genkernel all

However, on 2006.1, I don't have /etc/kernels, only /etc/genkernel.conf.

When I do genkernel all, I see it copied config from /usr/share/genkernel/x86/kernel-config-x86, so I replaced it with my .config as a quick and dirty fix. What's the right way to do it nowadays? Also, what about eselect for symlink?

Cheers,
Alexy
Back to top
View user's profile Send private message
Akhouk
Guru
Guru


Joined: 23 May 2003
Posts: 476
Location: The Two Niles, Africa

PostPosted: Mon Jan 22, 2007 6:48 am    Post subject: Reply with quote

Did you compile your original kernel with genkernel?

genkernel by default take the kernel config from the /usr/share/genkernel/ directories and uses that. It then stores the kernel config in /etc/kernels once it has finished so next time it will use it from there for rebuilding. It seems you don't have an /etc/kernels because you didn't use genkernel for building the kernel.

If you are in doubt about where your kernel config is you can always copy the existing config from /proc/config.gz (if you have it in your kernel), gunzip it and use genkernel with the --kernel-config flag to rebuild.
_________________
AMD 64 3500+, 2Gb RAM DDR400, 2 x 180Gb SATA, 256Mb Nvidia
Back to top
View user's profile Send private message
braver
n00b
n00b


Joined: 29 Dec 2006
Posts: 28

PostPosted: Mon Jan 22, 2007 7:10 am    Post subject: Reply with quote

OK, will run genkernel to completion then... Is there any way to tell it to respect my separate build directory outside source?
Back to top
View user's profile Send private message
Akhouk
Guru
Guru


Joined: 23 May 2003
Posts: 476
Location: The Two Niles, Africa

PostPosted: Mon Jan 22, 2007 7:22 am    Post subject: Reply with quote

braver wrote:
OK, will run genkernel to completion then... Is there any way to tell it to respect my separate build directory outside source?

Not sure what you mean. Do you mean to use compile from a different location other than from /usr/src ? If so you can use the --kerneldir= option to specify a different source location.
_________________
AMD 64 3500+, 2Gb RAM DDR400, 2 x 180Gb SATA, 256Mb Nvidia
Back to top
View user's profile Send private message
braver
n00b
n00b


Joined: 29 Dec 2006
Posts: 28

PostPosted: Mon Jan 22, 2007 8:01 am    Post subject: Reply with quote

Actually, I mean the option

make O=/different/object/dir menuconfig

you can use in a kernel source dir, to keep it intact and pristine, compiling everything separately.

I found you can point --kerneldir at *that* build dir! Hurray! In a few minutes there'll hopefully be a gentoo-compiled object kernel directory separate from the kernel sources!

Why am I doing this? I share kernel source partition, mounting it from Gentoo, SuSE, or Arch on the same box. So the objects will be different as produced by slightly different gcc's, but the source can be the same!
Back to top
View user's profile Send private message
bLUEbYTE84
Guru
Guru


Joined: 21 Jul 2006
Posts: 566
Location: universe.tar.gz, src/earth.h, struct homo_sapiens_table

PostPosted: Mon Jan 22, 2007 8:44 pm    Post subject: Reply with quote

There is another way of getting configuration file from a running kernel, provided that this support has been compiled:
Code:
make distclean
zcat /proc/config.gz > ./.config


in the new kernel dir, and then make oldconfig.
distclean is optional
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