# udev  doesn't create device nodes![Solved]

## nolim

Hello everybody!

I have discovered that my udev doesn't work.

/dev isn't being updated when I plug new hardware even if it had been identified by the kernel(I checked it by dmesg).

I thing /dev isn't being update at all, I have a lot of junk there.

I emerge udev and hotplug.

something that might help:

I plug in a stroge mass usb device to my computer, And it had being identified by lsusb and dmesg, but no device node had been created.

I looked for /sys and didn't find any block/sda device, seems to be that sysfs doesn't work.

Is that a kenel problem?

When I try to compile my kernel with genkernel in the menuconfig part, I can't select:

```
General setup --->

  [*] Support for hot-pluggable devices

```

I only got this:

```
General setup --->

--Support for hot-pluggable devices
```

Maybe the kernel doesn't interrupt udev to create the devices nodes?

what to do?

----------

## NeddySeagoon

nolim,

First, emerge --sync then do emerge -s udev.

If you don't have the latest version for your install, update it. 

Did your problem systesm ever have devfsd installed?

See that udev is being used by watching the very early boot messages. Look for a message saying

Mounting /dev for udev

Its one of the first 3 or 4 messages.

----------

## nolim

udev is the one who mounts /dev.

devfs hadn't been install.

emerge -pv devfsd indicates that it is not installed right now, and I am sure I hadn't install it before.

----------

## NeddySeagoon

nolim,

You have the latest udev ?

Do you have all the correct USB and SCSI kernel modules for your kernel?

They may be either compiled in or made as modules. Modules must be loaded of course.

Try udevstart after you have connected your USB storage device to your PC.

----------

## nolim

I have a usb printer that works O.K (hp officejet 5510).

I had printed a blank page with the OO.

dmesg when I turn the printer on:

```
usb 1-1: new full speed USB device using uhci_hcd and address 7

drivers/usb/class/usblp.c: usblp0: USB Bidirectional printer dev 7 if 1 alt 0 proto 2 vid 0x03F0 pid 0x3A11

usbcore: registered new driver usblp

drivers/usb/class/usblp.c: v0.13: USB Printer Device Class driver
```

You can see that the right modules are loaded,and I am sure that my kernel had the right modules for the stroge device.

The same thing happened for the usb stroge, and nothing is written about devices nodes that had been created.

/dev/usb/lp0 had been there before I turn on the printer, I don't think It's O.K, is it?

I tried the udevstart but /dev/sda0 hadn't been created, how can I check if udev creates someting in the /dev, by dmesg?

so nothing had been created.

I will try now to update my system, thanks for your help so far.

----------

## Corona688

Having some cruft in /dev/ before udev creates it seems a fairly normal state of affairs.  I'm not sure how much it helps or hurts things, but it doesn't seem to be the end of the world.  I leave it because last time I started deleting things that looked unimportant I pooched my /boot partition  :Very Happy:  *nolim wrote:*   

> how can I check if udev creates someting in the /dev, by dmesg?

  udev is very different from devfsd...  The "u" in udev means "userspace" because that's where it works -- it's not in the kernel, the kernel just passes messages to it.  This means that udev will not and cannot log things to dmesg.

You can probably get it to log to /var/log/messages though.  Looking in /etc/udev/udev.conf shows this interesting line: 

```
# udev_log - set to "yes" if you want logging

udev_log="no"
```

Also search for udevtest.  It's finicky but useful in seeing what udev thinks it's doing.  Be warned, some older versions want sys paths beginning with /sys/ while newer ones want you to leave the /sys off!

p.s. did you mean /dev/sda1?  I've never seen a /dev/sda0, it counts from 1.

----------

## NeddySeagoon

nolim,

A working printer is encoraging but not suffcient to indicate that USB storage will work.

USB storage devices appear as SCSI devices, so you need the usb-storage module, the top level SCSI modules and the SCSI disk module for your kernel.

usb-storage then appears as /dev/sd? Does the output of 

```
ls /dev/sd?
```

change when the device is added/removed. (The ? matches exactly one character)

----------

## nolim

ls /dev/sd?? doesn't change, it give me 4 devices a-d and each one of them has numbers from 1-9.

here is the output of lsmod(relevent modules only):

```
Module                  Size  Used by

usblp                  12160  0 

ohci_hcd               18436  0 

uhci_hcd               28944  0 

usb_storage            66112  0 

usbcore               112388  5 usblp,ohci_hcd,uhci_hcd,usb_storage

```

You can see that usb_stroge had been loaded.

Note: I use usb version 1.0 only

I thing the kernel doesn't communicate with udev.

Corona688

mu udev.conf

udev_log="err"

there are no options "yes" "no", there are "err" "info" "debug"...I didn't change the value.

I didn't understand how to use udevtest. man doesn't represnt any helpful information, very short and unhelpful.

----------

## NeddySeagoon

nolim,

And the high level SCSI driver ?

It sounds very much as if you have a static /dev

What does uname -a show ?

----------

## nolim

 *NeddySeagoon wrote:*   

> And the high level SCSI driver ?

 

I'm so damn!!

I was sure that menuconfig selects this module automatically for me...guess not.

It didn't select all the module that were require. 

thanks!!

Corona688:

here is my dmesg:

```
usb 1-2: new full speed USB device using uhci_hcd and address 2

scsi0 : SCSI emulation for USB Mass Storage devices

usb-storage: device found at 2

usb-storage: waiting for device to settle before scanning

  Vendor: NIKON     Model: NIKON DSC E2100   Rev: 1.00

  Type:   Direct-Access                      ANSI SCSI revision: 02

usb-storage: device scan complete

SCSI device sda: 31232 512-byte hdwr sectors (16 MB)

sda: Write Protect is off

sda: Mode Sense: 18 00 00 08

sda: assuming drive cache: write through

SCSI device sda: 31232 512-byte hdwr sectors (16 MB)

sda: Write Protect is off

sda: Mode Sense: 18 00 00 08

sda: assuming drive cache: write through

 sda: sda1

sd 0:0:0:0: Attached scsi removable disk sda

```

there is an addition from the line with SCSI, it wasn't there before.

I guess that this log is refer to the kernel(sysfs) and not to udev, I got confused.

It really seems to be like a udev log, thank you too for the correction.

----------

