Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Installation troubles
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
evilnone
n00b
n00b


Joined: 28 Apr 2006
Posts: 12

PostPosted: Tue Aug 28, 2007 11:03 pm    Post subject: Installation troubles Reply with quote

I just installed gentoo using the Command line installer off the live cd and i am pretty sure it errored out in the middle somewhere... thing is i removed the cd and booted up and everything seems to be working... i have one problem i was going to download new nvidia drivers and i get this error at the end of the emerge...

Code:
 * Found kernel source directory:
 *     /usr/src/linux
 * Could not find a usable .config in the kernel source directory.
 * Please ensure that /usr/src/linux points to a configured set of Linux sources.
 * If you are using KBUILD_OUTPUT, please set the environment var so that
 * it points to the necessary object directory so that it might find .config.

!!! ERROR: x11-drivers/nvidia-drivers-100.14.09 failed.
Call stack:
  ebuild.sh, line 1654:   Called dyn_setup
  ebuild.sh, line 714:   Called qa_call 'pkg_setup'
  ebuild.sh, line 44:   Called pkg_setup
  nvidia-drivers-100.14.09.ebuild, line 142:   Called linux-mod_pkg_setup
  linux-mod.eclass, line 464:   Called linux-info_pkg_setup
  linux-info.eclass, line 554:   Called die

!!! Unable to calculate Linux Kernel version
!!! If you need support, post the topmost build error, and the call stack if relevant.
!!! A complete build log is located at '/var/tmp/portage/x11-drivers/nvidia-drivers-100.14.09/temp/build.log'.


any idea as to how to fix this? I am new to linux so please be kind
Back to top
View user's profile Send private message
freelight
Apprentice
Apprentice


Joined: 12 Jun 2004
Posts: 295
Location: NYC, NY, USA

PostPosted: Tue Aug 28, 2007 11:10 pm    Post subject: Reply with quote

Something's wrong with the kernel configuration. As root, do the following (and post the output here):
Code:
uname -a

Code:
file /usr/src/linux

Code:
ls /usr/src


You may want to refer to the kernel configuration guide.
_________________
"If ignorance is bliss, why aren't more people happy?" --Thomas Jefferson

"Let the gremlins eat your soul... it's invigorating." --LD
Back to top
View user's profile Send private message
Nick C
Guru
Guru


Joined: 18 Mar 2005
Posts: 526
Location: Portsmouth, England

PostPosted: Tue Aug 28, 2007 11:33 pm    Post subject: Reply with quote

as the above poster said, check your /usr/src/linux symlink, it *should* be pointing to the kernel source for the currently running kernel so if you have recently tried downloading a new kernel but havnt configured it, thats probably why.

If you need to change the symlink (or if it doesnt exist)

Remove old symlink - rm /usr/src/linux
Create new one - ln -s /usr/src/path_to_running_kernel /usr/src/linux

That *should* fix things and allow portage to find the .config file for your running kernel.
_________________
Please add [solved] to the initial post's subject line if you feel your problem is resolved.
www.monkeydust.net
Back to top
View user's profile Send private message
evilnone
n00b
n00b


Joined: 28 Apr 2006
Posts: 12

PostPosted: Tue Aug 28, 2007 11:34 pm    Post subject: Reply with quote

uname -a displays...

Code:
Linux gentoo 2.6.19-gentoo-r5 #1 SMP Wed Apr 4 05:44:43 UTC 2007 i686 Intel(R) Pentium(R) 4 CPU 2.20GHz GenuineIntel GNU/Linux


file /usr/src/linux displays

Code:
/usr/src/linux: symbolic link to `linux-2.6.22-gentoo-r5'



ls /usr/src displays
Code:
linux  linux-2.6.22-gentoo-r5


anything else needed?
Back to top
View user's profile Send private message
Nick C
Guru
Guru


Joined: 18 Mar 2005
Posts: 526
Location: Portsmouth, England

PostPosted: Tue Aug 28, 2007 11:58 pm    Post subject: Reply with quote

do an ls -a /usr/src/linux and actually check the the .config file is there.
If not there try looking inside /boot as make install will put a copy there, or if you used genkernel look in /etc/kernels. Once you find it just copy it back to /usr/src/linux and rename it .config
_________________
Please add [solved] to the initial post's subject line if you feel your problem is resolved.
www.monkeydust.net
Back to top
View user's profile Send private message
evilnone
n00b
n00b


Joined: 28 Apr 2006
Posts: 12

PostPosted: Wed Aug 29, 2007 12:38 am    Post subject: Reply with quote

i cant find the config file anywhere... i checked all those places and nothing is there....

EDIT: i get this when i do an emerge --pretend system

Code:
emerge --pretend system

These are the packages that would be merged, in order:

Calculating system dependencies... done!
[ebuild  N    ] dev-perl/Locale-gettext-1.05 
[ebuild  N    ] app-admin/python-updater-0.2 
[ebuild     U ] sys-apps/module-init-tools-3.2.2-r3 [3.2.2-r2] USE="-old-linux%"
[ebuild     U ] sys-apps/man-pages-2.63 [2.42]
[ebuild  N    ] dev-util/unifdef-1.20 
[ebuild     U ] sys-fs/udev-114 [104-r12]
[ebuild     U ] app-arch/gzip-1.3.12 [1.3.5-r10]
[ebuild     U ] sys-devel/flex-2.5.33-r2 [2.5.33-r1]
[ebuild     U ] sys-apps/hdparm-7.6 [6.6]
[ebuild     U ] app-shells/bash-3.2_p17 [3.1_p17]
[ebuild     U ] sys-apps/findutils-4.3.8 [4.3.2-r1]
[ebuild     U ] sys-devel/autoconf-2.61-r1 [2.61]
[ebuild     U ] sys-apps/util-linux-2.12r-r7 [2.12r-r5]
[ebuild     U ] sys-libs/glibc-2.5-r4 [2.5] USE="-debug%"
[ebuild     U ] app-arch/bzip2-1.0.4 [1.0.3-r6]
[ebuild     U ] app-arch/tar-1.18-r2 [1.16-r2]
[ebuild     U ] sys-apps/man-1.6e-r3 [1.6d]
[ebuild     U ] sys-process/psmisc-22.5-r1 [22.2]
[ebuild     U ] sys-apps/grep-2.5.1a-r1 [2.5.1-r8] USE="pcre%*"
[ebuild     U ] net-misc/rsync-2.6.9-r3 [2.6.9-r1]
[ebuild     U ] sys-apps/busybox-1.6.1 [1.2.2.1] USE="(-selinux)"
[ebuild     U ] app-arch/cpio-2.9 [2.6-r5]
[ebuild     U ] sys-apps/less-406 [394]
[ebuild     U ] net-misc/openssh-4.6_p1-r3 [4.5_p1-r1]
[ebuild     U ] sys-devel/gcc-4.1.2 [4.1.1-r3] USE="mudflap* -d%"
[ebuild     U ] sys-apps/shadow-4.0.18.1-r1 [4.0.18.1]
[ebuild     U ] sys-process/procps-3.2.7 [3.2.6]
[ebuild     U ] sys-apps/gawk-3.1.5-r3 [3.1.5-r2]
[ebuild     U ] sys-devel/bison-2.3 [2.2]
[ebuild     U ] sys-apps/file-4.21-r1 [4.20-r1]
[ebuild     U ] sys-devel/binutils-2.17 [2.16.1-r3]
[ebuild     U ] sys-apps/net-tools-1.60-r13 [1.60-r12]
[ebuild     U ] sys-apps/coreutils-6.9-r1 [6.4] USE="-xattr%"
[ebuild     U ] sys-libs/ncurses-5.6-r1 [5.5-r3]
[ebuild     U ] sys-devel/m4-1.4.9-r1 [1.4.7] USE="-examples%"
[ebuild     U ] app-editors/nano-2.0.6 [2.0.2]
[ebuild     U ] sys-devel/gnuconfig-20070118 [20060702]
[ebuild     U ] sys-apps/debianutils-2.22.1 [2.17.4]
[ebuild     U ] sys-fs/e2fsprogs-1.39-r2 [1.39]
[ebuild     U ] sys-libs/readline-5.2_p4 [5.1_p4]
[ebuild  N    ] sys-apps/help2man-1.36.4  USE="nls"
[ebuild     U ] dev-lang/python-2.4.4-r4 [2.4.3-r4] USE="-examples% -nothreads%"
[ebuild     U ] sys-apps/baselayout-1.12.9-r2 [1.12.9]
[ebuild     U ] sys-apps/diffutils-2.8.7-r2 [2.8.7-r1]
[ebuild     U ] sys-kernel/linux-headers-2.6.21 [2.6.17-r2]
[ebuild     U ] sys-devel/libtool-1.5.24 [1.5.22] USE="-vanilla%"
[blocks B     ] <sys-fs/device-mapper-1.02.19-r1 (is blocking sys-fs/udev-114)


Last edited by evilnone on Wed Aug 29, 2007 12:53 am; edited 1 time in total
Back to top
View user's profile Send private message
Nick C
Guru
Guru


Joined: 18 Mar 2005
Posts: 526
Location: Portsmouth, England

PostPosted: Wed Aug 29, 2007 12:52 am    Post subject: Reply with quote

did you check see if /boot was mounted? By default /etc/fstab doesnt automatically mount boot (remove the noauto option to change this), the amount of times ive spent ages wondering why my new kernel doesnt load only to find i forgot to mount /boot before installing it :oops:
If its still not there then im afraid youve got to go back and reconfigure your kernel. Or you could try the hackish fix of running make allyesconfig from inside /usr/src/linux.
_________________
Please add [solved] to the initial post's subject line if you feel your problem is resolved.
www.monkeydust.net
Back to top
View user's profile Send private message
evilnone
n00b
n00b


Joined: 28 Apr 2006
Posts: 12

PostPosted: Wed Aug 29, 2007 12:55 am    Post subject: Reply with quote

ty for helping me im not sure of what i need to do though... i mean can u give me the noobish version? (ie commands to do some fo the stuff you are saying?) I do appreciate all the help with this, but again I am new to linux and am not sure what to do. I am however fully committed to learning since I have completely removed vista (garbage). thanks in advance!


EDIT: doing a random "mount" in terminal resulted in this...

Code:
mount
/dev/hda3 on / type ext3 (rw,noatime)
proc on /proc type proc (rw)
sysfs on /sys type sysfs (rw,nosuid,nodev,noexec)
udev on /dev type tmpfs (rw,nosuid)
devpts on /dev/pts type devpts (rw,nosuid,noexec)
/dev/hda1 on /boot type ext2 (rw)
none on /dev/shm type tmpfs (rw)
usbfs on /proc/bus/usb type usbfs (rw,noexec,nosuid,devmode=0664,devgid=85)
Back to top
View user's profile Send private message
freelight
Apprentice
Apprentice


Joined: 12 Jun 2004
Posts: 295
Location: NYC, NY, USA

PostPosted: Wed Aug 29, 2007 1:11 am    Post subject: Reply with quote

evilnone wrote:
uname -a displays...

Code:
Linux gentoo 2.6.19-gentoo-r5 #1 SMP Wed Apr 4 05:44:43 UTC 2007 i686 Intel(R) Pentium(R) 4 CPU 2.20GHz GenuineIntel GNU/Linux


file /usr/src/linux displays

Code:
/usr/src/linux: symbolic link to `linux-2.6.22-gentoo-r5'



ls /usr/src displays
Code:
linux  linux-2.6.22-gentoo-r5


anything else needed?


I see the problem. Your're currently running kernel 2.6.19-gentoo-r5, so the nvidia driver needs to compile itself against it, but it can't find /usr/src/linux-2.6.19-gentoo-r5 because it isn't there.
Configure and install the 2.6.22-gentoo-r5 kernel you have the sources for as per the kernel config guide in the Gentoo handbook (linked in my previous post). When you reboot, do uname -a, it should say 2.6.22 instead of 2.6.19. Once you've done that, the nvidia driver will compile.
_________________
"If ignorance is bliss, why aren't more people happy?" --Thomas Jefferson

"Let the gremlins eat your soul... it's invigorating." --LD
Back to top
View user's profile Send private message
Nick C
Guru
Guru


Joined: 18 Mar 2005
Posts: 526
Location: Portsmouth, England

PostPosted: Wed Aug 29, 2007 1:15 am    Post subject: Reply with quote

ok, im assuming your booting normally now (ie, not using a livecd to chroot)?
If thats the case then you should have edited /etc/fstab and told it where your partitions are.
Open it up using nano:
nano /etc/fstab

In it you should see various entries for your partitions, the first one being /boot, if you look along the line there is a bit where options can be passed to the mount command, if you see a noauto option set for your /boot partition then you need to either always remember to do a mount /boot anytime you want to edit anything in /boot (including installing a new kernel) or remove the noauto entry.
Exit nano (ctrl-x) and if the noauto option was there run mount /boot.
This should give you access to /boot, do an ls -a /boot and see if any .config files are there.
If you see one then bingo, problem solved, just do a cp /boot/.config /usr/src/linux/.config to move a copy back to your kernel src directory and carry on emerging.

If you still cant see any .config files (make sure you use ls -a as any file that has a . at the start is hidden by default, the -a switch shows all files, including hidden ones) then your going to have to reconfigure your kernel so you can generate a .config file to use.
You have 3 options here:
1) cd /usr/src/linux and run make allyesconfig - this will just create a basic .config where every option has been selected automatically, not an ideal solution as there may be conflicting options if you ever tried to compile your kernel with this config, but it might work for what you want.

2) Configure your kernel by hand - cd /usr/src/linux and run make menuconfig, you will need to know what you want to enable in terms of hardware support and other options, is a good learning experience but trying to compile the kernel and use it (if you want to try) may result in non-booting

3) Configure your kernel with genkernel - a handy gentoo program that can build a kernel that should work and it saves a .config file to /etc/kernels. It might be more bloated than configuring by hand, but will be better than using a make allyesconfig kernel.

Anyway, configuring your kernel can be a tricky business, but is a great learning experience, and once you start to understand options you can find yourself with a much more responsive machine. Whatever you decide, take a look at http://www.gentoo-wiki.com as there are some half decent guides explaining how to configure kernels both by hand and with genkernel.

Hopefully some of this made sense and helps :)
_________________
Please add [solved] to the initial post's subject line if you feel your problem is resolved.
www.monkeydust.net
Back to top
View user's profile Send private message
d2_racing
Bodhisattva
Bodhisattva


Joined: 25 Apr 2005
Posts: 13047
Location: Ste-Foy,Canada

PostPosted: Wed Aug 29, 2007 1:37 am    Post subject: Reply with quote

Yeah, but use instead this howto : https://forums.gentoo.org/viewtopic-t-539024.html
Back to top
View user's profile Send private message
nixnut
Bodhisattva
Bodhisattva


Joined: 09 Apr 2004
Posts: 10974
Location: the dutch mountains

PostPosted: Wed Aug 29, 2007 4:50 pm    Post subject: Reply with quote

Moved from Installing Gentoo to Kernel & Hardware.
kernel related, so moved here.
_________________
Please add [solved] to the initial post's subject line if you feel your problem is resolved. Help answer the unanswered

talk is cheap. supply exceeds demand
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