Results 1 to 9 of 9
ok this is my first time compiling the kernel since i installed gentoo. first i downloaded the new kernel source with this command ......
Code:
emerge gentoo-sources
now im having ...
Enjoy an ad free experience by logging in. Not a member yet? Register.
- 03-24-2008 #1Just Joined!
- Join Date
- Jan 2008
- Location
- 127.0.0.1
- Posts
- 29
compiling a new kernel
ok this is my first time compiling the kernel since i installed gentoo. first i downloaded the new kernel source with this command ......
now im having trouble getting to the next step in upgradingCode:emerge gentoo-sources
(taken from this page TIP Upgrading your kernel - Gentoo Linux Wiki)
my question is how do i find out what the old source was so i can make the old config file part of the new source that way i dont have to go back through and redo the kernel?Code:cp <old-source>/.config linux/.config
- 03-24-2008 #2Linux Guru
- Join Date
- Nov 2007
- Location
- Córdoba (Spain)
- Posts
- 1,513
In Gentoo, when you emerge a kernel it sits into /usr/src/, under that directory you will have many subdirectories with the different kernel sources that you installed.
You can cd into that dir, and then use ls to see the installed kernel trees. Then use uname -r to see what version you are currently using. Whith the info from this two commands, you should be able to find which is the right thing to do.
I leave that as an exercise. If you can't find the way yourself, just post the output of these two commands here, and I will try to help:
$ ls -l /usr/src/
$ uname -r
- 03-24-2008 #3Just Joined!
- Join Date
- Nov 2004
- Posts
- 2
Not necessarily the correct way to do it but I just copy
/usr/src/linux-{current kernel}/.config to /usr/src/linux-{name of new kernel}/.config
or you can just go into the new kernel and do
make menuconfig
and load the previous .config file that way.
eselect kernel list should highlight the current kernel version unless you have changed it with eselect kernel set and uname -r should tell you what kernel you are currently running.
- 03-24-2008 #4
You can also copy the current running config to .config by:
... assuming that a config.gz file was created by the kernel.Code:# zcat /proc/config.gz > /usr/src/<kernel>/.config
Here are a couple of references:
Gentoo Wiki
Gentoo Handbook
Men occasionally stumble over the truth,
but most of them pick themselves up
and hurry off as if nothing had happened.
Winston Churchill
... then the Unix-Gods created "man" ...
- 03-24-2008 #5Linux Guru
- Join Date
- Nov 2007
- Location
- Córdoba (Spain)
- Posts
- 1,513
Having options is always a good thing. But since it seems that right now, the problem is that he can't find the source tree on his filesystems, I think we should keep this simple for now. Having too much info when you can't even do the basic can be a bit overwhelming, in my humble opinion.
- 03-26-2008 #6Just Joined!
- Join Date
- Jan 2008
- Location
- 127.0.0.1
- Posts
- 29
thanks for all the help
i used cp to copy the old config to the new kernel source
then i used make oldconfig and went through all the questions
i compiled the kernel and copied the bzImage to /boot
then i changed grub to include the new kernel name
everything works and loads up except i think i need to use module rebuild so that alsa a nvidia works, because as of now i dont have a desktop just cli.
- 03-26-2008 #7Linux Guru
- Join Date
- Nov 2007
- Location
- Córdoba (Spain)
- Posts
- 1,513
The nvidia drivers (and any other drivers that's not part of the kernel itself) need to be re-emerged each time you install a new kernel. Make sure that /usr/src/linux is pointing to the right kernel, because most of these packages use that link to choose the kernel that they will link against.
There are automatic tools for this, such as module-rebuild or whatever it's called. I can't comment on them because I never used them (for no particular reason, just laziness :P ).
- 03-26-2008 #8Just Joined!
- Join Date
- Jan 2008
- Location
- 127.0.0.1
- Posts
- 29
i just used symlink in my make file so that it points to the right kernel instead of updating the symbolic link.
- 03-27-2008 #9Just Joined!
- Join Date
- Jan 2008
- Location
- 127.0.0.1
- Posts
- 29
module-rebuild is pretty nice!
just
you just populate the list of modules that you need to reinstall(i only had an nvidia one)Code:emerge module-rebuild
then rebuild the modulesCode:module-rebuild populate
pretty easy!Code:module-rebuild rebuild
thanks for the help once again!


Reply With Quote

