Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

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

Our Linux kernel is 2.6.31 running on an embedded MIPS processor with busybox.

The initialisation script (rcS) starts mdev with:

echo "/sbin/stbhotplug" > /proc/sys/kernel/hotplug
mdev -s

Can anyone tell me what the Linux utility mdev does?

It looks like it does auto hot plugging as the stbhotplug is a script that handle ethernet interfaces.

Also, the rootfs we have been given only has a console device i.e. /dev/console is the only file in /dev.

However, when the system is running, the /dev directory is full of device files (e.g. /dev/mtd, etc.).

The reason I ask is that occasionally we get an error whereby it is reported that /dev/ubi_ctrl is not found or /dev/ubi1 is not found.

How or when does Linux create these devices?


share|improve this question

migrated from Aug 19 '11 at 16:16

This question came from our site for professional and enthusiast programmers.

up vote 2 down vote accepted

Here is a link to the mdev primer.

share|improve this answer
Awesome - thank you. – user626201 Jul 26 '11 at 10:04

mdev is a light-weight alternative to udev for usage in embedded devices. Both handle the creation of device files in /dev and starting of actions when certain events happen.

share|improve this answer
So if /dev devices are not being created, could be a problem with mdev or a timing issue? – user626201 May 3 '11 at 12:49
Yes, as far as I understand both could be true. But I only wrote the answer because I had just read about mdev in a news article yesterday. Generally I have no experience with it and cannot give any further assistance. That's why I posted my answer as a kick-start for a community wiki answer. – halo May 3 '11 at 14:07

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.