I am trying to install Gentoo on an old laptop following the online handbook. I got as far as installing the kernel sources (see here): the installation with

emerge --ask sys-kernel/gentoo-sources

seems to run fine, until it fails with no precise error message. The log file


contains no error message. The last lines in this file read

* Final size of build directory: 1 KiB
* Final size of installed tree: 623669 KiB

ecompressdir: bzip2 -9 /usr/share/doc

I also looked at /var/log/emerge.log which also does not contain any error message:

1473188561: Started emerge on: set 06, 2016 21:02:40
1473188561:  *** emerge --ask sys-kernel/gentoo-sources
1473188622:  >>> emerge (1 of 1) sys-kernel/gentoo-sources-4.4.6 to /
1473188622:  === (1 of 1) Cleaning (sys-kernel/gentoo-sources-4.4.6::/usr/portage/sys-kernel/gentoo-sources/gentoo-sources-4.4.6.ebuild)
1473188698:  === (1 of 1) Compiling/Merging (sys-kernel/gentoo-sources-4.4.6::/usr/portage/sys-kernel/gentoo-sources/gentoo-sources-4.4.6.ebuild)
1473189553:  === (1 of 1) Merging (sys-kernel/gentoo-sources-4.4.6::/usr/portage/sys-kernel/gentoo-sources/gentoo-sources-4.4.6.ebuild)
1473190741:  *** Finished. Cleaning up...
1473190743:  *** exiting unsuccessfully with status '1'.
1473190751:  *** terminating.

I do not know what I should check next. Any idea?


Here is the content of /var/tmp/portage/sys-kernel/gentoo-sources-4.4.6/temp/build.log (I have removed some non-printable characters that appeared at the beginning of each line):

Package:    sys-kernel/gentoo-sources-4.4.6
Repository: gentoo
Maintainer: kernel@gentoo.org
USE:        abi_x86_32 elibc_glibc kernel_linux userland_GNU x86
FEATURES:   preserve-libs sandbox userpriv usersandbox
>>> Preparing to unpack ...
>>> Unpacking source...
>>> Unpacking linux-4.4.tar.xz to /var/tmp/portage/sys-kernel/gentoo-sources-4.4.6/work
>>> Unpacking genpatches-4.4-8.base.tar.xz to /var/tmp/portage/sys-kernel/gentoo-sources-4.4.6/work/patches
>>> Unpacking genpatches-4.4-8.extras.tar.xz to /var/tmp/portage/sys-kernel/gentoo-sources-4.4.6/work/patches
Excluding Patch #5000_enable-additional-cpu-optimizations-for-gcc.patch ...
Excluding Patch #5015_kdbus*.patch ...
Applying 1000_linux-4.4.1.patch (-p1) ...
Applying 1001_linux-4.4.2.patch (-p1) ...
Applying 1002_linux-4.4.3.patch (-p1) ...
Applying 1003_linux-4.4.4.patch (-p1) ...
Applying 1004_linux-4.4.5.patch (-p1) ...
Applying 1005_linux-4.4.6.patch (-p1) ...
Applying 1500_XATTR_USER_PREFIX.patch (-p1) ...
Applying 1510_fs-enable-link-security-restrictions-by-default.patch (-p1) ...
Applying 2700_ThinkPad-30-brightness-control-fix.patch (-p1) ...
Applying 2900_dev-root-proc-mount-fix.patch (-p1) ...
Applying 4200_fbcondecor-3.19.patch (-p1) ...
Applying 4567_distro-Gentoo-Kconfig.patch (-p1) ...
>>> Source unpacked in /var/tmp/portage/sys-kernel/gentoo-sources-4.4.6/work
>>> Preparing source in /var/tmp/portage/sys-kernel/gentoo-sources-4.4.6/work/linux-4.4.6-gentoo ...
>>> Source prepared.
>>> Configuring source in /var/tmp/portage/sys-kernel/gentoo-sources-4.4.6/work/linux-4.4.6-gentoo ...
>>> Source configured.
>>> Compiling source in /var/tmp/portage/sys-kernel/gentoo-sources-4.4.6/work/linux-4.4.6-gentoo ...
>>> Source compiled.
>>> Test phase [not enabled]: sys-kernel/gentoo-sources-4.4.6

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

Final size of build directory: 1 KiB
Final size of installed tree: 623669 KiB

ecompressdir: bzip2 -9 /usr/share/doc
  • What is in /usr/src? – aventurin Sep 6 '16 at 20:16
  • @Giorgio: please post the whole output of emerge gentoo-sources – Francesco Turco Sep 6 '16 at 20:19
  • @Francesco Turco: Do you mean the content of /var/tmp/portage/sys-kernel/gentoo-sources-4.4.6/temp/build.log – Giorgio Sep 6 '16 at 20:25
  • @aventurin: /usr/src contains the directory linux-4.4.6-gentoo and a symbolic link to it named linux. However, I am not sure if the content of linux-4.4.6-gentoo is complete. – Giorgio Sep 6 '16 at 20:29
  • @Giorgio: in order to check if a package is fine you can use equery check gentoo-sources. Specify package version if needed. The equery command belongs to the gentoolkit package. – Francesco Turco Sep 7 '16 at 15:24

simply have downloaded the kernel in / usr / src , you just need to fill it out by inserting the necessary forms for your pc wiki gentoo: "Installing new kernel sources doesn't provide the user with a new kernel. It is necessary to make and install a new kernel from the new sources and then reboot the system to actually run the new kernel. " enter image description here

  • I know that I need to compile to kernel after installing the sources. Since running emerge --ask sys-kernel/gentoo-sources reported a failure and each time I run it it tries to install the sources again and again, I was wondering if the sources are now correctly installed and whether I should try to compile using a broken package. – Giorgio Sep 8 '16 at 16:18
  • once downloaded the package you went into / usr / src and you did the various ` make menuconfig , make -jX make module_install etc ` ? it did not work? if you really can not test genkernel – Oscar Andrea Merandi Sep 9 '16 at 9:08
  • cd /usr/src/linux followed by make menuconfig gives: make: *** No rule to make target 'menuconfig'. Stop.. As far as I understand, emerge has not completed the installation of the kernel source code. – Giorgio Sep 9 '16 at 12:35
  • sudo make menuconfig – Oscar Andrea Merandi Sep 9 '16 at 18:28
  • emerges you downloaded the kernel , but may not know what configuration you want to use then you are creating the configuration , if you do not know do use genkernel – Oscar Andrea Merandi Sep 9 '16 at 18:28


  1. rm -vR /usr/portage/distfiles
  2. emerge-webrsync
  3. emerge --sync && emerge -av sys-kernel/gentoo-sources.

From the looks of your output, you didn't download the tarball correctly. If you'll notice @oscarandrea's screenshot his build directory is 4 kb's. Yours is only 1 kb.

  • @Giorgio See new comment in your question... – eyoung100 Sep 19 '16 at 19:26

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.