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.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I want to build a custom kernel under Ubuntu. I configured and built the new kernel. The new kernel hasn't initrd and comes from vanilla source. I build this new monolithic kernel only with drivers it needs.

When I try to boot the new kernel I'm stuck at the mknod step. It tries to mknod new devices like /dev/sda1 /dev/vca4. It fails because the root partition is mounted read-only.

I think the problem is that I've lost something about my hardware. If I boot with the default Ubuntu kernel, I haven't got any problems. Could anyone help me to understand why this happens?

share|improve this question

On boot, the root filesystem is almost always mounted read-only, so that you can run fsck on it. Once you're done, it's customary to remount the root filesystem read-write using something like:

mount / -o remount,rw

Although, since you're using Ubuntu, compiling a kernel should be far simpler than this. If you're not already using it, I recommend using kernel-package to compile the kernel. Simply get the package and kernel sources, unpack, and say something like

make-kpkg -j3 --initrd binary

This will then build .deb packages which you can install the usual way (dpkg -i SOME-FILE.deb)

share|improve this answer

You should have a devtmpfs or tmpfs mounted at /dev and managed by udev; thus the directory is writable regardless of the state of /. On Ubuntu, this is usually set up by the initramfs; did you build and load one with your kernel?

share|improve this answer
hi, well I have tmpfs built, but neither devtmpfs nor initramfs. The first does not exist in kernel menu and the second I don't want to build into the kernel – user17545 Apr 15 '12 at 19:28
@user17545 Ubuntu's /sbin/init assumes that the initramfs's /init has already set up the root filesystem with /dev, /dev/pts, /proc, /run, /sys, etc. all already mounted as the appropriate psuedo-filesystems. If you are going to use Ubuntu's init system without their initramfs, you will either need to create an initramfs that performs the same actions or change init. Well, CONFIG_DEVTMPFS_MOUNT=y will automount /dev if you're not using initramfs, but the rest is still up to you. – ephemient Apr 15 '12 at 19:51
yes, ok, I built my new kernel with CONFIG_DEVTMPFS_MOUNT=y but nothing was changed. If u need of my .config let me know. – user17545 Apr 15 '12 at 21:42

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.