Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
ERROR: Kernel Makefile (/usr/src/linux/Makefile) missing.
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
Gooberpatrol66
Tux's lil' helper
Tux's lil' helper


Joined: 20 Jul 2014
Posts: 108

PostPosted: Sun Apr 03, 2016 12:55 am    Post subject: ERROR: Kernel Makefile (/usr/src/linux/Makefile) missing. Reply with quote

Code:
localhost user # emerge -a gentoo-sources

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

Calculating dependencies... done!
[ebuild   R    ] sys-kernel/gentoo-sources-4.1.15-r1

Would you like to merge these packages? [Yes/No] y

>>> Verifying ebuild manifests

>>> Emerging (1 of 1) sys-kernel/gentoo-sources-4.1.15-r1::gentoo
 * linux-4.1.tar.xz SHA256 SHA512 WHIRLPOOL size ;-) ...  [ ok ]
 * genpatches-4.1-20.base.tar.xz SHA256 SHA512 WHIRLPOOL size ;-) ...           [ ok ]
 * genpatches-4.1-20.extras.tar.xz SHA256 SHA512 WHIRLPOOL size ;-) ...             [ ok ]
>>> Preparing to unpack ...
>>> Unpacking source...
>>> Unpacking linux-4.1.tar.xz to /var/tmp/portage/sys-kernel/gentoo-sources-4.1.15-r1/work
>>> Unpacking genpatches-4.1-20.base.tar.xz to /var/tmp/portage/sys-kernel/gentoo-sources-4.1.15-r1/work/patches
>>> Unpacking genpatches-4.1-20.extras.tar.xz to /var/tmp/portage/sys-kernel/gentoo-sources-4.1.15-r1/work/patches
 * Excluding Patch #5000_enable-additional-cpu-optimizations-for-gcc.patch ...                                             [ ok ]
 * Excluding Patch #5015_kdbus*.patch ...                 [ ok ]
 * Applying 1000_linux-4.1.1.patch (-p1) ...              [ ok ]
 * Applying 1001_linux-4.1.2.patch (-p1) ...              [ ok ]
 * Applying 1002_linux-4.1.3.patch (-p1) ...              [ ok ]
 * Applying 1003_linux-4.1.4.patch (-p1) ...              [ ok ]
 * Applying 1004_linux-4.1.5.patch (-p1) ...              [ ok ]
 * Applying 1005_linux-4.1.6.patch (-p1) ...              [ ok ]
 * Applying 1006_linux-4.1.7.patch (-p1) ...              [ ok ]
 * Applying 1007_linux-4.1.8.patch (-p1) ...              [ ok ]
 * Applying 1008_linux-4.1.9.patch (-p1) ...              [ ok ]
 * Applying 1009_linux-4.1.10.patch (-p1) ...             [ ok ]
 * Applying 1010_linux-4.1.11.patch (-p1) ...             [ ok ]
 * Applying 1011_linux-4.1.12.patch (-p1) ...             [ ok ]
 * Applying 1012_linux-4.1.13.patch (-p1) ...             [ ok ]
 * Applying 1013_linux-4.1.14.patch (-p1) ...             [ ok ]
 * Applying 1014_linux-4.1.15.patch (-p1) ...             [ ok ]
 * Applying 1500_XATTR_USER_PREFIX.patch (-p1) ...        [ ok ]
 * Applying 1510_fs-enable-link-security-restrictions-by-default.patch (-p1) ...                                           [ ok ]
 * Applying 1520_keyring-refleak-in-join-session-CVE-2016-0728.patch (-p1) ...                                             [ ok ]
 * Applying 2700_ThinkPad-30-brightness-control-fix.patch (-p1) ...                                                        [ ok ]
 * Applying 2900_dev-root-proc-mount-fix.patch (-p1) ...  [ ok ]
 * Applying 2905_2disk-resume-image-fix.patch (-p1) ...   [ ok ]
 * Applying 2910_lz4-compression-fix.patch (-p1) ...      [ ok ]
 * Applying 4200_fbcondecor-3.19.patch (-p1) ...          [ ok ]
 * Applying 4567_distro-Gentoo-Kconfig.patch (-p1) ...    [ ok ]
>>> Source unpacked in /var/tmp/portage/sys-kernel/gentoo-sources-4.1.15-r1/work
>>> Preparing source in /var/tmp/portage/sys-kernel/gentoo-sources-4.1.15-r1/work/linux-4.1.15-gentoo-r1 ...
>>> Source prepared.
>>> Configuring source in /var/tmp/portage/sys-kernel/gentoo-sources-4.1.15-r1/work/linux-4.1.15-gentoo-r1 ...
>>> Source configured.
>>> Compiling source in /var/tmp/portage/sys-kernel/gentoo-sources-4.1.15-r1/work/linux-4.1.15-gentoo-r1 ...
>>> Source compiled.
>>> Test phase [not enabled]: sys-kernel/gentoo-sources-4.1.15-r1

>>> Install gentoo-sources-4.1.15-r1 into /var/tmp/portage/sys-kernel/gentoo-sources-4.1.15-r1/image/ category sys-kernel
>>> Copying sources ...
>>> Completed installing gentoo-sources-4.1.15-r1 into /var/tmp/portage/sys-kernel/gentoo-sources-4.1.15-r1/image/

ecompressdir: bzip2 -9 /usr/share/doc

>>> Installing (1 of 1) sys-kernel/gentoo-sources-4.1.15-r1::gentoo

 * Note: Even though you have successfully unmerged
 * your kernel package, directories in kernel source location:
 * /usr/src/linux-4.1.15-gentoo-r1
 * with modified files will remain behind. By design, package managers
 * will not remove these modified files and the directories they reside in.


 * If you are upgrading from a previous kernel, you may be interested
 * in the following document:
 *   - General upgrade guide: https://wiki.gentoo.org/wiki/Kernel/Upgrade

 * For more info on this patchset, and how to report problems, see:
 * https://dev.gentoo.org/~mpagano/genpatches

 * Messages for package sys-kernel/gentoo-sources-4.1.15-r1:

 * Note: Even though you have successfully unmerged
 * your kernel package, directories in kernel source location:
 * /usr/src/linux-4.1.15-gentoo-r1
 * with modified files will remain behind. By design, package managers
 * will not remove these modified files and the directories they reside in.

 * Messages for package sys-kernel/gentoo-sources-4.1.15-r1:

 * If you are upgrading from a previous kernel, you may be interested
 * in the following document:
 *   - General upgrade guide: https://wiki.gentoo.org/wiki/Kernel/Upgrade
>>> Auto-cleaning packages...

>>> No outdated packages were found on your system.

 * GNU info directory index is up-to-date.

!!! existing preserved libs:
>>> package: gnome-base/gnome-desktop-3.18.2
 *  - /usr/lib64/libgnome-desktop-3.so.10
 *  - /usr/lib64/libgnome-desktop-3.so.10.0.0
 *      used by /usr/bin/evince (app-text/evince-3.16.1)
 *      used by /usr/bin/gnome-control-center (gnome-base/gnome-control-center-3.16.3)
 *      used by /usr/bin/gnome-session (gnome-base/gnome-session-3.16.0)
 *      used by 13 other files
Use emerge @preserved-rebuild to rebuild packages using these libraries



localhost user # genkernel --oldconfig all
* Gentoo Linux Genkernel; Version 63
* Running with options: --oldconfig 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: --oldconfig 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!
*


?


Last edited by Gooberpatrol66 on Sun Apr 03, 2016 2:18 am; edited 1 time in total
Back to top
View user's profile Send private message
eccerr0r
Watchman
Watchman


Joined: 01 Jul 2004
Posts: 7130
Location: almost Mile High in the USA

PostPosted: Sun Apr 03, 2016 1:01 am    Post subject: Reply with quote

Try

# eselect kernel list
# eselect kernel set (choose one)

Or manually symlink /usr/src/linux -> /usr/src/linux--4.1.15-gentoo-r1 ?
_________________
Intel Core i7 2700K@ 4.1GHz/HD3000 graphics/8GB DDR3/180GB SSD
What am I supposed watching?
Back to top
View user's profile Send private message
Gooberpatrol66
Tux's lil' helper
Tux's lil' helper


Joined: 20 Jul 2014
Posts: 108

PostPosted: Sun Apr 03, 2016 2:16 am    Post subject: Reply with quote

Ah, that worked.

thanks
Back to top
View user's profile Send private message
eccerr0r
Watchman
Watchman


Joined: 01 Jul 2004
Posts: 7130
Location: almost Mile High in the USA

PostPosted: Sun Apr 03, 2016 1:58 pm    Post subject: Reply with quote

No problem, change the title to include [SOLVED] if you feel the problem is complete resolved.
_________________
Intel Core i7 2700K@ 4.1GHz/HD3000 graphics/8GB DDR3/180GB SSD
What am I supposed watching?
Back to top
View user's profile Send private message
Kobboi
l33t
l33t


Joined: 29 Jul 2005
Posts: 661
Location: Belgium

PostPosted: Mon Apr 04, 2016 9:57 am    Post subject: Reply with quote

Indeed, your /usr/src/linux symlink was pointing to an old set of kernel sources. You probably unmerged those, but note that you might still have some unnecessary files taking up disk space (i.e. the binaries resulting from the compilation of that older kernel), so you might want to clean that up. Same thing for the modules belonging to that older kernel version in /lib/modules.

Only do the clean up when you are sure you won't be needing that kernel any more! Else, if your newly generated kernel is showing problems, you have nothing to fall back to!
Back to top
View user's profile Send private message
Gooberpatrol66
Tux's lil' helper
Tux's lil' helper


Joined: 20 Jul 2014
Posts: 108

PostPosted: Sat May 14, 2016 5:13 am    Post subject: Reply with quote

eccerr0r wrote:
No problem, change the title to include [SOLVED] if you feel the problem is complete resolved.


I can't, it makes the title too long!
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