# [solved] missing makefile. (genkernel all)

## mrfabiolo

I've never had any problems recompiling the kernel

But now, I don't know what could I have touch...

```
tux mrlogick # genkernel --menuconfig all

* Gentoo Linux Genkernel; Version 3.4.45.1

* Running with options: --menuconfig all

* Using genkernel.conf from /etc/genkernel.conf

* Sourcing arch-specific config.sh from /usr/share/genkernel/arch/x86_64/config.sh ..

* Sourcing arch-specific modules_load from /usr/share/genkernel/arch/x86_64/modules_load ..

* ERROR: Kernel Makefile (/usr/src/linux/Makefile) missing.  Maybe re-install the kernel sources.

* 

* -- Grepping log... --

* 

* Running with options: --menuconfig all

* Using genkernel.conf from /etc/genkernel.conf

* Sourcing arch-specific config.sh from /usr/share/genkernel/arch/x86_64/config.sh ..

* Sourcing arch-specific modules_load from /usr/share/genkernel/arch/x86_64/modules_load ..

*

* ERROR: Kernel Makefile (/usr/src/linux/Makefile) missing.  Maybe re-install the kernel sources.

* 

* -- 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!

* 

tux mrlogick # 

```

Why do not I have the makefile?

```
mrlogick@tux ~ $ ls /usr/src/

linux  linux-3.10.17-gentoo  linux-3.10.25-gentoo

mrlogick@tux ~ $ ls /usr/src/linux

include  scripts

mrlogick@tux ~ $ ls /usr/src/linux-3.10.25-gentoo/

arch     distro         include  kernel       net             security

block    Documentation  init     lib          README          sound

COPYING  drivers        ipc      MAINTAINERS  REPORTING-BUGS  tools

CREDITS  firmware       Kbuild   Makefile     samples         usr

crypto   fs             Kconfig  mm           scripts         virt
```

Last edited by mrfabiolo on Thu Jan 16, 2014 7:46 pm; edited 1 time in total

----------

## John R. Graham

Probably because your running kernel source was unmerged as part of an update. Check to see what kernel source you have installed:

```
equery list -i gentoo-sources
```

and check to see what kernel you're running:

```
uname -r
```

In case you don't have it installed, equery is part of app-portage/gentoolkit.

-John

----------

## mrfabiolo

```
mrlogick@tux ~ $ equery list -i gentoo-sources

 * Searching for gentoo-sources ...

[IP-] [  ] sys-kernel/gentoo-sources-3.10.25:3.10.25
```

```
mrlogick@tux ~ $ uname -r

3.10.17-gentoo
```

```
mrlogick@tux ~ $ ls /usr/src/

linux  linux-3.10.17-gentoo  linux-3.10.25-gentoo

mrlogick@tux ~ $ ls /usr/src/linux-3.10.17-gentoo/

include  scripts
```

What should I have to do now?

----------

## John R. Graham

If you want to stay with gentoo-sources-3.10.17 for now, then emerge that explicit version:

```
emerge =gentoo-sources-3.10.17
```

This will also protect it from automatic deletion in the future since that exact version will be added to the world set.

However, if you want to upgrade to 3.10.25, then just move the linux symlink in /usr/src to point to the new kernel source directory. Need help with that?

- John

----------

## mrfabiolo

Thank you very much.. i've understood.

----------

## michi-monster

I have the same problem. 

```
localhost linux # genkernel --menuconfig all

* Gentoo Linux Genkernel; Version 65

* Running with options: --menuconfig all

* Using genkernel.conf from /etc/genkernel.conf

* Sourcing arch-specific config.sh from /usr/share/genkernel/arch/x86_64/config.sh ..

* Sourcing arch-specific modules_load from /usr/share/genkernel/arch/x86_64/modules_load ..

* ERROR: Kernel Makefile (/usr/src/linux/Makefile) missing.  Maybe re-install the kernel sources.

* 

* -- Grepping log... --

* 

* Running with options: --menuconfig all

* Using genkernel.conf from /etc/genkernel.conf

* Sourcing arch-specific config.sh from /usr/share/genkernel/arch/x86_64/config.sh ..

* Sourcing arch-specific modules_load from /usr/share/genkernel/arch/x86_64/modules_load ..

*

* ERROR: Kernel Makefile (/usr/src/linux/Makefile) missing.  Maybe re-install the kernel sources.

* 

* -- 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!
```

```
localhost linux # equery list -i gentoo-sources

 * Searching for gentoo-sources ...

[IP-] [  ] sys-kernel/gentoo-sources-4.9.6-r1:4.9.6-r1
```

```
localhost linux # eselect kernel list

Available kernel symlink targets:

  [1]   linux-4.9.6-gentoo-r1

```

localhost linux # uname -r

4.4.39-gentoo

[/code]

Gentoo-sources i have new installed.  But itś not ok. Please help.

----------

## Josef.95

 *michi-monster wrote:*   

> [...]
> 
> ```
> localhost linux # eselect kernel list
> 
> ...

 

The linux-4.9.6-gentoo-r1 Sources is not set,

set it with 

```
eselect kernel set 1
```

 should work.

----------

## michi-monster

ohh - no a so simple error

Now its all right

----------

