Sign up ×
Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems. It's 100% free, no registration required.

I am trying to install a Linux kernel (3.8.1) from source in a Fedora distribution. The kernel is a vanilla one. I follow the kernel's build instructions closely that is:

make menuconfig
sudo make modules_install install
sudo grub2-mkconfig -o /boot/grub2/grub.cfg

Everything in /boot seems fine. I can see, initramfs, and vmlinuz for the newly compiled kernel. The vmlinuz link points to vmlinuz-3.8.1. There are multiple other kernels installed including an Ubuntu one. grub2 recognises all of them and I can boot to each one of them.

When I reboot I see all kernels as menu entries and choose 3.8.1.

Then I see this message:

early console in decompress_kernel
decompressing Linux... parsing ELF ... done
Booting the kernel.
[1.687084] systemd [1]:failed to mount /dev:no such device
[1.687524] systemd [1]:failed to mount /dev:no such device


All three posted responses provide the solution. CONFIG_DEVTMPFS was in fact causing the issue. I copied a working kernel's /boot/config-… into the root of the source tree as .config and executed the standard commands for building the kernel also shown above.

share|improve this question

migrated from Feb 25 '14 at 16:06

This question came from our site for system and network administrators.

Why are you building such an old kernel, BTW? – vonbrand Feb 25 '14 at 16:24
It depends on one's own definition of old. I, for example, would consider v2.6 old :-). I am doing some tests on kernel data structures for research purposes. This version was at my hand's reach, but many others would do just fine. – mfrank.23 Feb 26 '14 at 18:34

3 Answers 3

up vote 3 down vote accepted

Easiest way to get a working kernel configuration is to just copy Fedora's .config over and then do a make oldconfig to configure it. The configuration is found at /boot/config-*

share|improve this answer

You need to configure your kernel with these options:

Linux kernel >= 3.0
CONFIG_CGROUPS (it's OK to disable all controllers)
CONFIG_FHANDLE (libudev, mount and bind mount handling)

Linux kernel >= 3.8 for Smack support

Udev will fail to work with the legacy layout:

Legacy hotplug slows down the system and confuses udev:

Userspace firmware loading is deprecated, will go away, and
sometimes causes problems:

Some udev rules and virtualization detection relies on it:

Support for some SCSI devices serial number retrieval, to
create additional symlinks in /dev/disk/ and /dev/tape:

Optional but strongly recommended:

For systemd-bootchart, several proc debug interfaces are required:

For UEFI systems:

Note that kernel auditing is broken when used with systemd's
container code. When using systemd in conjunction with
containers, please make sure to either turn off auditing at
runtime using the kernel command line option "audit=0", or
turn it off at kernel compile time using:
share|improve this answer

Looking at a similar issue on a custom system running systemd it seems this may be because "CONFIG_DEVTMPFS" is not selected in the kernel configuration (notice this is the first thing on sciurus's list of kernel requirements for running systemd).

To now figure out how to correct this, start make menuconfig and use the search feature (press /) to look for "DEVTMPFS". The first hit is:

Symbol: DEVTMPFS [=y]  
Type  : boolean  
Prompt: Maintain a devtmpfs filesystem to mount at /dev                                                  
    -> Device Drivers
(1)   -> Generic Driver Options   

Low and behold, there is such an option in Device Drivers->Generic Driver Options.

As vonbrand says, you are best off starting with a configuration that matches what you have now. This can probably be found gzipped as /proc/config.gz. Copy that out and gunzip -c config.gz > .config and use that file as the preliminary .config in your source tree (more detail in step #2 here).

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

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