Jump to content

Udev...


phunni
 Share

Recommended Posts

Not sure if this should be in hardware, but I figured since Udev relates to devices it probably should. Mods, feel free to move it if you disagree...

 

Anyway, when I last installed Linux I isntalled Udev instead of devfs because it seemed to me to be more cutting edge. Trouble is, I don;t really ahve a clue what it is or, more importantly, how to configure it. I reckon this could well be really useful to properly get to grips with it. Can anyone either explain it or point me to a useful tutorial please?

 

:thanks:

Link to comment
Share on other sites

http://www.kernel.org/pub/linux/utils/kern...otplug/udev-FAQ

 

http://www.gentoo.org/doc/en/udev-guide.xml

 

if you type "ls /dev" on a devfs (old) machine, you'll get hundreds of files, even for devices you don't have. This is because in the old system device nodes couldn't be dynamically added.

 

on a udev system, the /dev/ folder is empty, but populated upon bootup. when you add a device, a node/file is created in /dev/, and removed when you remove the device. That's about as far as my knowledge on it goes, but I run a pure udev system and found that it works flawlessly. If I plug in my DVD writer, /dev/dvd appears in the folder, and I simply mount it.

Link to comment
Share on other sites

Courtesy of wikipedia.

 

Cheers. John.

 

 

 

 

 

Udev

From Wikipedia, the free encyclopedia.

 

The title given to this article is incorrect due to technical limitations. The correct title is udev. udev is a file system replacement for DevFS on the Linux 2.6 kernel series. Its primary function is managing device nodes in /dev.

Contents [showhide]

1 New features in udev

2 Operation

3 Authors

4 External links

[edit]

 

New features in udev

 

Unlike the traditional system of managing devices in Linux, which used a static set of device nodes, udev dynamically provides nodes for only the devices actually present on a system. Although devfs also provided such functionality, advocates for udev cited a number of reasons for preferring its implementation over devfs:[1] (http://kernel.org/pub/linux/utils/kernel/hotplug/udev_vs_devfs)

 

* udev is independent of major and minor device numbers, whereas devfs did not address the need for dynamic device numbers

* Unlike devfs, udev supports giving devices persistent names, which do not depend on, for example, the order in which the devices are plugged into the system.

* udev executes executes in user space, as opposed to devfs' kernel space. One consequence is that udev moves naming policy out of the kernel.

* udev is smaller and unlike devfs, complies with the Linux Standard Base naming system.

* According to some developers, devfs suffered from lack of maintenance and contained unfixable design flaws and race conditions.

 

[edit]

 

Operation

 

udev allows for rules that specify what device name is given to a specific device, regardless of which port it is plugged into. For example, a rule to always mount a hard drive with manufacturer "iRiver" and device code "ABC" as /dev/iriver is possible. This consistent naming of devices guarantees that scripts dependent on a specific device's existence will not be broken.

 

udev works by receiving /sbin/hotplug calls sent by the kernel whenever a device is added or removed from the system.

[edit]

 

Authors

 

udev was developed by Greg Kroah-Hartman in collaboration with Dan Stekloff, Kay Sievers, and many others.

[edit]

 

External links

 

* Discussion of udev rules (http://www.reactivated.net/writing_udev_rules.html)

* udev FAQ (http://www.kernel.org/pub/linux/utils/kern...otplug/udev-FAQ)

* The Gentoo udev Guide (http://www.gentoo.org/doc/en/udev-guide.xml)

 

Retrieved from "http://en.wikipedia.org/wiki/Udev"

 

Categories: Computer file systems | Linux

Link to comment
Share on other sites

You shouldnt need to compile udev from source or configure it from scratch, your distro should provide packages with a basic working config.

 

Arthur: you only get the massive /dev with heaps of files with a static /dev/ filesystem. with devfs you dont get the huge amount of files.

 

Udev is really cool in what it can do, i have it making its /dev entries for my external hard drive as /dev/lacieX, my flash drive, /dev/usbstick, my sd card reader /dev/sdcard

 

iphitus

Link to comment
Share on other sites

You shouldnt need to compile udev from source or configure it from scratch, your distro should provide packages with a basic working config.

 

Arthur: you only get the massive /dev with heaps of files with a static /dev/ filesystem. with devfs you dont get the huge amount of files.

 

Udev is really cool in what it can do, i have it making its /dev entries for my external hard drive as /dev/lacieX, my flash drive, /dev/usbstick, my sd card reader /dev/sdcard

 

iphitus

 

Currently using Arch and it does have plenty of udev configs out of the box - but they need tweaking to get things like my clie etc... worknig with it...

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
 Share

×
×
  • Create New...