# genkernel Trouble

## sand49

guys having a bit on trouble installing gentoo i am up to installing the kernel.

i am installing it on a 32 bit PC with 2gb of ram i have installed gentoo-sources and genkernel but when i try to run "genkernel all" it says 

"ERROR: Kernel Makefile (/usr/src/linux/Makefile) missing. maybe re-install Kernel sources."

i have re-installed the Kernel sources comes up with the same message.

Please can you help.    :Very Happy: 

----------

## BillWho

sand49,

Welcome to gentoo   :Very Happy: 

What does readlink /usr/src/linux && ls -l /usr/src/linux/Makefile return   :Question: 

----------

## Nardian

Hi,

I have quite the same problem as the thread-starter. One difference is, that my gentoo was already running for some weeks... now I dont really know what I did or what happend, but my eth0 cannot come up. 

"ifconfig eth0 up" says "No such device"

So my brother came up with the idea to run the "genkernel all", but that gives me the error that the Makefile is missing...

The command from you, BillWho, "readlink /usr/src/linux && ls -l /usr/src/linux/Makefile" gives me:

linux-3.3.8-gentoo

ls: cannot access /usr/src/linux/Makefile: No such file or directory

hope someone can help me  :Smile: 

----------

## John R. Graham

@Nardian, Welcome to Gentoo.  :Smile: 

This indicates that the install of gentoo-sources failed. Could you report the output of

```
emerge -s gentoo-sources
```

and

```
mount
```

please?

- John

----------

## Nardian

Hi, thanks for the respone  :Smile: 

```

emerge -s gentoo-sources

Searching...

[ Result for search key : gentoo-sources ]

[ Applications found : 1 ]

* sys-kernel/gentoo-sources

       Latest version available: 3.5.1

       Latest version installed: 3.5.1

       Size of files: 79,148 kB

       Homepage:      http://dev.gentoo.org/~mpagano/genpatches

       Description:   Full sources including the Gentoo patchset for the 3.5 kernel tree

       License:       GPL-2 !deblob? ( freedist )

```

```
 mount

rootfs on / type rootfs (rw)

proc on /proc type proc(rw,nosuid,nodev,noexec,relatime)

sysfs on /sys type sysfs (rw,nosuid,nodev,noexec,relatime)

udev on /dev type tmpfs (rw,nosuid,relatime,size=10240k,mode=755)

devpts on /dev/pts type devpts (rw,relatime,gid=5,mode=620)

/dev/sda3 on type ext4 (rw,noatime,user_xattr,acl,barrier=1,data=ordered)

tmpfs on /run type tmpfs (rw,nosuid,nodev,relatime,mode=755)

configfs on /sys/kernel/config type configfs (rw,nosuid,nodev,noexec,relatime)

cgroup_root on /sys/fs/cgroup type tmpfs (rw,nosuid,nodev,noexec,relatime,size=10240k,mode=755)

openrc on /sys/fs/cgroup/openrc type cgroup (rw,nosuid,nodev,noexec,relatime,release_agent=/lib64/rc/sh/cgroup-release-agent.sh,name=openrc)

cpuset on /sys/fs/cgroup/cpuset tpye cgroup (rw,nosuid,nodev,noexec,relatime,cpuset)

cpuacct on /sys/fs/cgroup/cpuacct type cgroup (rw,nosuid,nodev,noexec,relatime,cpuacct)

shm on /dev/shm type tmpfs (rw,nosuid,nodev,noexec,relatime)

usbfs on /proc/bus/usb type usbfs (rw,noexec,nosuid,devmode=0664,devgid=85)

```

well - that took a while to copy that by hand ^^ hope I didnt make some typos....  :Razz: 

or is there a better method to copy the output (the gentoo has no network, so I cannot access it remotely...)?

----------

## John R. Graham

Yes there is; sorry. Just emerge wgetpaste. Then you can do things like

```
emerge -s gentoo-sources | wgetpaste
```

and you'll be presented with a short URL where the output has been pasted onto the web. Looks like you have more than one version of gentoo-sources installed. Can you (emerge wgetpaste first and then) post the listing of the /usr/src directory contents, like

```
ls -l /usr/src | wgetpaste
```

please?

- John

----------

## BillWho

Nardian,

What does 

```
eselect kernel list
```

 return   :Question: 

----------

## Nardian

 *John R. Graham wrote:*   

> Yes there is; sorry. Just emerge wgetpaste. 
> 
> 

 

sorry, cannot do that, I have no network, so I cannot emerge that - and even if - how should it create a short URL without network?  :Sad: 

```
ls -l /usr/src

lrwxrwxrwx  1 root root    18 Jul 14 17:23 linux -> linux-3.3.8-gentoo

drwxr-xr-x 21 root root  4096 Aug 13 21:20 linux-3.3.8-gentoo

drwxr-xr-x 23 root root  4096 Aug 16 15:44 linux-3.5.1-gentoo

-rw-r--r--  1 root root 90114 Aug 16 15:57 my.config

```

the my.config I copied from ... I dont know which linux-xxx-gentoo folder ".config" - so that "my.config" can be ignores / removed if you want

```
eselect kernel list

  [1]   linux-3.3.8-gentoo *

  [2]   linux-3.5.1-gentoo

```

----------

## BillWho

Nardian,

```
eselect kernel set 2
```

 will take care of the symlink - then cd /usr/src/linux and try to build your kernel again.

You probably did a depclean, but the directory is not removed.

----------

## Nardian

 *BillWho wrote:*   

> You probably did a depclean, but the directory is not removed.

 

yep, I really did that ^^

and "genkernel all" seems to work now

Thanks for the help (both of you  :Smile:  )

----------

