Find the answer to your Linux question:
Results 1 to 7 of 7
Like Tree1Likes
  • 1 Post By gregm
Hi, When kernel boots up, there are a number of devices list in /dev. My question is, through what mechanism do we tell the kernel which device to be add ...
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1
    Just Joined!
    Join Date
    Apr 2014
    Posts
    6

    what dictates which devices gets an entry in /dev?


    Hi,

    When kernel boots up, there are a number of devices list in /dev. My question is, through what mechanism do we tell the kernel which device to be add to/remove from /dev on power up? (I am not talking about creating/deleting a node at run time)

    Thanks,
    Wei Xu

  2. #2
    Linux Engineer
    Join Date
    Dec 2013
    Posts
    1,084
    As far as I know, when a device is inserted or detected at boot an event is generated. The kernel checks the type of device against the assigned numeric range for those devices and takes the next available assigned number and creates a node in /dev for it - removes the node if a device has been removed.

  3. #3
    Linux Engineer hazel's Avatar
    Join Date
    May 2004
    Location
    Harrow, UK
    Posts
    1,199
    Isn't it the udev daemon that creates the devices after receiving notification of events from the kernel?
    "I'm just a little old lady; don't try to dazzle me with jargon!"

  4. #4
    Linux Engineer
    Join Date
    Dec 2013
    Posts
    1,084
    That's true of most Linux systems since 2.6 though it isn't the only option.

  5. #5
    Just Joined!
    Join Date
    Apr 2014
    Posts
    6
    Hi gregm,

    Thanks for the reply.
    So how does the udev daemon gets information about the device and pick the name to create a node for the device in /dev?

    Thanks,
    Wei Xu

  6. #6
    Linux Engineer
    Join Date
    Dec 2013
    Posts
    1,084
    This is a good explanation from the openSUSE reference: https://activedoc.opensuse.org/book/...ment-with-udev
    chris_inx likes this.

  7. #7
    Linux Engineer
    Join Date
    Apr 2012
    Location
    Virginia, USA
    Posts
    883
    Quote Originally Posted by gregm View Post
    This is a good explanation from the openSUSE reference: https://activedoc.opensuse.org/book/...ment-with-udev
    That is a great read. Thank you for sharing that.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •