View previous topic :: View next topic |
Author |
Message |
lokoalex Apprentice
Joined: 02 Dec 2004 Posts: 194 Location: Jersey
|
Posted: Fri Nov 02, 2007 2:06 pm Post subject: Kernel source directory not found (SOLVED) |
|
|
Im trying to Quote: | genkernel --menuconfig all
| and this is what I get:
Code: | * Gentoo Linux Genkernel; Version 3.4.8
* Running with options: all
* ERROR: kernel source directory "/usr/src/linux" was not found!
* -- Grepping log... --
* Gentoo Linux Genkernel; Version 3.4.8
* Running with options: all
* ERROR: kernel source directory "/usr/src/linux" was not found!
* -- End log... --
* Please consult /var/log/genkernel.log for more information and any
* errors that were reported above.
* Report any genkernel bugs to bugs.gentoo.org and
* assign your bug to genkernel@gentoo.org. Please include
* as much information as you can in your bug report; attaching
* /var/log/genkernel.log so that your issue can be dealt with effectively.
*
* Please do *not* report compilation failures as genkernel bugs! |
*
So I tried upgrading the kernel and I still get the same problems.
Any suggestions? _________________ Gentoo and I have an On-Off relationship....
Last edited by lokoalex on Tue Nov 06, 2007 8:03 pm; edited 1 time in total |
|
Back to top |
|
|
Kwark Tux's lil' helper
Joined: 21 May 2007 Posts: 121
|
Posted: Fri Nov 02, 2007 2:22 pm Post subject: |
|
|
Is there a symlink /usr/src/linux to one of the real /usr/src/ kernel source directories?
If not, make one yourself. |
|
Back to top |
|
|
lokoalex Apprentice
Joined: 02 Dec 2004 Posts: 194 Location: Jersey
|
Posted: Fri Nov 02, 2007 2:33 pm Post subject: |
|
|
Yes I have a symlink. Here is what I have:
Code: | #ls -l /usr/src/linux
lrwxrwxrwx 1 root root 15 Nov 2 10:18 /usr/src/linux -> linux-2.6.22-r8 |
_________________ Gentoo and I have an On-Off relationship.... |
|
Back to top |
|
|
lokoalex Apprentice
Joined: 02 Dec 2004 Posts: 194 Location: Jersey
|
Posted: Sat Nov 03, 2007 2:24 am Post subject: |
|
|
Still having the same problems. Is there anyone who can help? _________________ Gentoo and I have an On-Off relationship.... |
|
Back to top |
|
|
tarpman Veteran
Joined: 04 Nov 2004 Posts: 1083 Location: Victoria, BC, Canada
|
Posted: Sat Nov 03, 2007 3:04 am Post subject: |
|
|
Does /usr/src/linux/linux-2.6.22-r8 exist? There is no sys-kernel/vanilla-sources-2.6.22-r8; the closest one to that is sys-kernel/gentoo-sources-2.6.22-r8, which would result in a target for the symlink of /usr/src/linux-2.6.22-gentoo-r8. _________________ Saving the world, one kilobyte at a time. |
|
Back to top |
|
|
lokoalex Apprentice
Joined: 02 Dec 2004 Posts: 194 Location: Jersey
|
Posted: Sat Nov 03, 2007 2:45 pm Post subject: |
|
|
Here is what I have:
Code: | cd /usr/src/linux
bash: cd: /usr/src/linux: No such file or directory
|
But: Code: | ls /usr/src
linux linux-2.6.22-gentoo-r8 linux-2.6.22-gentoo-r9
|
And: Code: | ls /usr/src/linux
/usr/src/linux
|
But the output is blinking for some reason. _________________ Gentoo and I have an On-Off relationship.... |
|
Back to top |
|
|
Hu Administrator
Joined: 06 Mar 2007 Posts: 23062
|
Posted: Sat Nov 03, 2007 4:50 pm Post subject: |
|
|
The blinking is an indication that ls considers the symlink to be broken. In this case, the link is dangling. According to your output, you have linux-2.6.22-gentoo-r8 and linux-2.6.22-gentoo-r9 as available kernel source directories. However, your symlink points to linux-2.6.22-r8. Notice that the kernel directories have a gentoo- that your symlink does not. To fix it, remove the symlink named linux and recreate it, this time pointing it to a directory that exists. You can use the shell's tab completion feature to ensure that you do not misspell the name. |
|
Back to top |
|
|
Lemmens n00b
Joined: 23 Aug 2007 Posts: 21 Location: European Union (BE)
|
Posted: Sat Nov 03, 2007 9:22 pm Post subject: |
|
|
lokoalex wrote: |
But: Code: | ls /usr/src
linux linux-2.6.22-gentoo-r8 linux-2.6.22-gentoo-r9
|
But the output is blinking for some reason. |
You can use app-admin/eselect to modify the symlink (#emerge eselect).
The command eselect kernel list outputs the different kernel sources on your system and shows which one is currently selected by the symlink:
Code: | Available kernel symlink targets:
[1] linux-2.6.22-gentoo-r8 *
[2] linux-2.6.22-gentoo-r9 |
Then you can select the one to which the symlink has to point to: "eselect kernel set 1" or "eselect kernel set 2" _________________ Who even knows the vastness, the strech and the reach of his ignorance?
By the mercy of God, we are lovers of the light. |
|
Back to top |
|
|
lokoalex Apprentice
Joined: 02 Dec 2004 Posts: 194 Location: Jersey
|
Posted: Tue Nov 06, 2007 7:01 pm Post subject: |
|
|
Still having the same issues. _________________ Gentoo and I have an On-Off relationship....
Last edited by lokoalex on Tue Nov 06, 2007 7:05 pm; edited 2 times in total |
|
Back to top |
|
|
lokoalex Apprentice
Joined: 02 Dec 2004 Posts: 194 Location: Jersey
|
Posted: Tue Nov 06, 2007 7:03 pm Post subject: |
|
|
Ok so I checked my kernel version:
Code: | # eselect kernel list
Available kernel symlink targets:
[1] linux-2.6.22-gentoo-r8
[2] linux-2.6.22-gentoo-r9 |
And I selected the one i use:
Code: | src # eselect kernel set linux-2.6.22-gentoo-r8 |
Then I checked to make sure it worked:
Code: | # eselect kernel list
Available kernel symlink targets:
[1] linux-2.6.22-gentoo-r8*
[2] linux-2.6.22-gentoo-r9 |
Then I created the new link:
Code: | src # ln -sfn linux-2.6.22-gentoo-r8 |
Then I tried to:
Code: | genkernel --menuconfig all |
And this is what I get which is the same as before:
Code: | src # genkernel --menuconfig all
* Gentoo Linux Genkernel; Version 3.4.8
* Running with options: --menuconfig all
grep: /usr/src/linux/Makefile: No such file or directory
grep: /usr/src/linux/Makefile: No such file or directory
grep: /usr/src/linux/Makefile: No such file or directory
grep: /usr/src/linux/Makefile: No such file or directory
/usr/share/genkernel/gen_determineargs.sh: line 35: [: : integer expression expected
* Linux Kernel .. for x86...
* ERROR: Error: No kernel .config specified, or file not found!
* -- Grepping log... --
* Linux Kernel .. for x86...
* Gentoo Linux Genkernel; Version 3.4.8
* Running with options: --menuconfig all
* ERROR: Error: No kernel .config specified, or file not found!
* -- End log... --
* Please consult /var/log/genkernel.log for more information and any
* errors that were reported above.
* Report any genkernel bugs to bugs.gentoo.org and
* assign your bug to genkernel@gentoo.org. Please include
* as much information as you can in your bug report; attaching
* /var/log/genkernel.log so that your issue can be dealt with effectively.
*
* Please do *not* report compilation failures as genkernel bugs!
*
|
So I decided to check my symlink and its correct:
Code: | src # ls -l /usr/src/linux
lrwxrwxrwx 1 root root 22 Nov 6 12:45 /usr/src/linux -> linux-2.6.22-gentoo-r8 |
And the output of this wasnt blinking anymore:
Code: | src # ls /usr/src/linux
Module.symvers block fs ipc mm security vmlinux
System.map crypto include kernel net sound
arch drivers init lib scripts usr |
So again if anyone can help it would be great. _________________ Gentoo and I have an On-Off relationship.... |
|
Back to top |
|
|
gerard27 Advocate
Joined: 04 Jan 2004 Posts: 2377 Location: Netherlands
|
Posted: Tue Nov 06, 2007 7:19 pm Post subject: |
|
|
lokoalex,
Your kernel (2.6.22-gentoo-r8 ) apparently is not complete or otherwise damaged I think.
Try re-emergeing that kernel.
To make live easier you might want to install "mc".
and check if you agree with the dependencies it might want to install.
mc is a great console browser.It would have shown your dangling symlink in red.
Gerard. _________________ To install Gentoo I use sysrescuecd.Based on Gentoo,has firefox to browse Gentoo docs and mc to browse (and edit) files.
The same disk can be used for 32 and 64 bit installs.
You can follow the Handbook verbatim.
http://www.sysresccd.org/Download |
|
Back to top |
|
|
lokoalex Apprentice
Joined: 02 Dec 2004 Posts: 194 Location: Jersey
|
Posted: Tue Nov 06, 2007 7:35 pm Post subject: |
|
|
How can I re-emerge 2.6.22-gentoo-r8 if they are up to 2.6.22-gentoo-r9? _________________ Gentoo and I have an On-Off relationship.... |
|
Back to top |
|
|
gerard27 Advocate
Joined: 04 Jan 2004 Posts: 2377 Location: Netherlands
|
Posted: Tue Nov 06, 2007 7:55 pm Post subject: |
|
|
Code: |
emerge =gentoo-sources-2.6.22-r8 |
Read man emerge man ebuild etc.
Gerard. _________________ To install Gentoo I use sysrescuecd.Based on Gentoo,has firefox to browse Gentoo docs and mc to browse (and edit) files.
The same disk can be used for 32 and 64 bit installs.
You can follow the Handbook verbatim.
http://www.sysresccd.org/Download |
|
Back to top |
|
|
lokoalex Apprentice
Joined: 02 Dec 2004 Posts: 194 Location: Jersey
|
Posted: Tue Nov 06, 2007 8:03 pm Post subject: |
|
|
You are awesome. Im still a little rusty with using the man pages thats why I asked for help. But im working my way there. _________________ Gentoo and I have an On-Off relationship.... |
|
Back to top |
|
|
gerard27 Advocate
Joined: 04 Jan 2004 Posts: 2377 Location: Netherlands
|
Posted: Tue Nov 06, 2007 8:26 pm Post subject: |
|
|
No I'm 80.
Did this solve your problem?
Gerard. _________________ To install Gentoo I use sysrescuecd.Based on Gentoo,has firefox to browse Gentoo docs and mc to browse (and edit) files.
The same disk can be used for 32 and 64 bit installs.
You can follow the Handbook verbatim.
http://www.sysresccd.org/Download |
|
Back to top |
|
|
lokoalex Apprentice
Joined: 02 Dec 2004 Posts: 194 Location: Jersey
|
Posted: Wed Nov 07, 2007 12:44 am Post subject: |
|
|
You completely solved my problem. Thanks for all the help!!! _________________ Gentoo and I have an On-Off relationship.... |
|
Back to top |
|
|
haf1zoglu n00b
Joined: 28 Nov 2022 Posts: 12
|
Posted: Wed Feb 08, 2023 9:36 pm Post subject: |
|
|
i had the same issue as ERROR: kernel source directory "/usr/src/linux" was not found!
yet what i have found was that i had just missed the step where we select the kernel and when i put command below and try "genkernell all" again, it worked like a charm.
eselect set kernel 1
(in my case it is 1, in your case it might be sth else, check via "eselect kernel list"
Code: | root #eselect kernel list
Available kernel symlink targets:
[1] linux-5.15.52-gentoo |
|
|
Back to top |
|
|
|