23
Feb

Refreshing /dev Device Nodes in Busybox with ‘mdev -s’

If you’re using the Busybox environment common in embedded linux systems, and you come across a situation where you need to refresh the /dev device nodes, simply use the command ‘mdev -s‘. The description from the Busybox help file states:

Scan /sys and populate /dev during system boot

I ran across this scenario today where I had a USB thumb drive plugged into a Technologic Systems SBC.  I could see that the device node was assigned as /dev/sda1 after the appropriate modules were inserted, but it didn’t appear in the /dev directory until I used mdev -s.  I could then mount it as usual.

I believe the same would be true for typical Linux systems with the udev deamon running in the background, but if the situation did ever come up, I would probably try to simply restart the udev service by using /etc/init.d/udev restart. I haven’t actually come across this situation yet, so obviously, this hasn’t been tested personally.

Feel free to donate if this post prevented any headaches! Another way to show your appreciation is to take a gander at these relative ads that you may be interested in:


There's 0 Comment So Far

Share your thoughts, leave a comment!