What is the "device" argument in the mount command?

I know that if you want to mount a device from the /dev directory, you can do a simple command like mount /dev/cdrom /media/cdrom

What I don't understand is how mount knows about the special stuff like proc and sysfs. They are not devices in the /dev directory.

I've seen the command mount -t tmpfs mdev /dev referenced when looking at busybox docs. Where is this mdev "device"?

Thanks, Chenz

link|improve this question

29% accept rate
feedback

2 Answers

up vote 5 down vote accepted

Nothing at all. Completely meaningless.

For things like procfs, there is no "device" to mount. For consistency you'll always pass a dummy parameter to mount - eg, mount -t procfs proc /proc - but the module responsible for actually doing the mount just ignores that.

(mdev, in the specific case of mounting tmpfs on busybox, may actually have some meaning - telling busybox to use mdev rather than udev)

link|improve this answer
feedback

proc and sysfs aren't normal filesystems. /proc is just a mapping of kernel space memory to the filesystem.

link|improve this answer
feedback

Your Answer

 
or
required, but never shown

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