Re: udev for dummies

From: David T Hollis (dhollis_at_davehollis.com)
Date: 12/11/03

  • Next message: Mike Fedyk: "Re: Mem: and Swap: lines in /proc/meminfo"
    To: "J.A. Magallon" <jamagallon@able.es>
    Date:	Thu, 11 Dec 2003 17:59:14 -0500
    
    

    On Thu, 2003-12-11 at 17:16, J.A. Magallon wrote:
    > Hi all...
    >
    > I am starting to use 2.6, and I really would like to use udev.
    > But I can't find a doc about how to move from taditional heavily
    > populated /dev to new method.
    >
    > Any pointer ?
    >
    > I have installed udev and hotplug utils, and have hotplug enabled in
    > kernel.
    > As I undestand it, I should do now something like
    > - run udev for the first time, so it populates /udev
    > - check that basic dev files are there
    > - move /dev to /dev.old, and ln -s /udev /dev (or real-move it and
    > change udev.conf to write directly on /dev)
    >
    > Or just create and empty /dev, and let hotplug call hotplug scripts
    > on boot which in turn call udev. Is this correct ? Will hotplug call
    > udev for the built-in drivers ?
    > Could it also work without hotplugging, ie, can I use udev to just
    > create a minimal /dev for my system ?
    >
    > After installing udev, I run /sbin/udev and nothing appears on
    > /udev.
    >
    > What am I missing / misunderstanding ?
    >
    > TIA

    You may be overthinking it a bit. I just set up udev on my box and it's
    working quite well. It's not really intending to completely replace
    /dev, rather it provides a dynamic device structure based on hotplugged
    devices. When you plug in some new device (USB thing, firewire,
    whatever), hotplug is run. hotplug winds up calling udev which is able
    to use it's defined rules and permissions to create a device node in
    /udev (NOTE: not /dev). These device nodes are perfectly valid for use
    by anything (/dev is really just a convention. There isn't much/any
    other real significance to it). The big win with udev is I can create
    my own rules so that certain things always have a device node that I
    want. For example, I have a San Disk Cruzer USB storage device. I
    don't want that to show up as /dev/sdX (where X can vary based on other
    things I have plugged in). I tell udev to always create it's device as
    /udev/cruzer. This way I can easily have entries in fstab to mount it,
    etc etc. Ditto for my other USB storage devices.

    In short, don't start deleting your /dev directory just yet!

    -
    To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
    the body of a message to majordomo@vger.kernel.org
    More majordomo info at http://vger.kernel.org/majordomo-info.html
    Please read the FAQ at http://www.tux.org/lkml/


  • Next message: Mike Fedyk: "Re: Mem: and Swap: lines in /proc/meminfo"

    Relevant Pages

    • Re: Treo 650/Fedora Core 4
      ... Udev does no "recognizing", ... I would imagine that your hotplug scripts simply need some delays put ... device and loads a device driver and the device driver notifies udev ... trying to talk to the device and the device node isn't there yet, ...
      (comp.os.linux.setup)
    • Re: Hauppage Nova-T PCI DVB receiver card fine in 2.6.8, broken in 2.6.16
      ... I had some teething problems getting the DVB drivers compiled, back in the 2.4.22 days before they were in the kernel, but after that it was totally reliable. ... This should not be necessary with udev, which should automatically create your DVB devices. ... The installation process tells me to purge hotplug, ... It's something to do with removing hotplug and putting in udev, because when I apt-get install hotplug, it all works again. ...
      (Debian-User)
    • Re: /etc/udev/rules.d and permissions in /dev/usb
      ... /dev/fd via mknod, and then run the `udevstart' program, which iterated ... parsing udev rules and creating ... The kernel was not involved, ... but `run' is conventional) to this file triggers a hotplug ...
      (uk.comp.os.linux)
    • Re: I really need some help here udev/hotplug/usb/usbmount etc etc.
      ... Basically, hotplug loads ... You don't necessarily need udev if you just go with static device nodes ... If you are running Sid or Testing, well, then things ... IIRC the udev in Stable won't work with kernels> 2.6.12 or thereabouts. ...
      (comp.os.linux.misc)
    • Re: [PATCH] to drivers/input/evdev.c to add mixer device "/dev/input/events"
      ... And udev takes care of it anyway. ... But X really needs to start caring about hotplug. ... And there maybe be situations in which a user program or X ... gave it even if the device was not present at boot. ...
      (Linux-Kernel)