# udev does not create /dev/sd*

## alex.blackbit

hi,

on one of my machines i am in big trouble.

since i don't see the /dev/sd* device files i can't install a new kernel (it's an alpha).

it seems like it's the fault of udev.

i have /sys/block/sda with the expected content.

udev is version 167-r1.

a quick google search did not enlighten me.

what can i try to bring udev to create the files?

thanks in advance!

----------

## NeddySeagoon

alex.blackbit,  

```
[ ] enable deprecated sysfs features to support old userspace tools
```

must be off in the kernel or udev breaks horribly.  

You don't get and /dev/sd* nodes but root still mounts as the kernel has to make its own arrangements for finding root before the root filesystem is mounted.

----------

## krinn

if i get it right :

- old kernel

+ newer udev

+ can't build an old kernel because your old kernel now no longer produce the sd* link

the solve might be here : https://forums.gentoo.org/viewtopic-p-6293727-highlight-udev.html#6293727

+ the one as neddy said

and to make it mount your device, remember udev create the symlink to be more human friendly, but the real hardware device is existing and i don't think fstab will complain if you use real hardware path instead of the symlink.

this mean you can just mount /sys/block/sd* even udev doesn't create the /dev/sd*

----------

## alex.blackbit

krinn,

thanks for your answer.

the idea of using a path inside /sys/block/sda as argument for swriteboot seems promissing.

although i do not know which file to use in there. there are no block devices afaics.

i do not need anything to put in fstab, i need something i can use as an argument for swriteboot.

think of it like grub-install.

----------

## alex.blackbit

the problem is solved.

i created the block device files manually with mknod.

thanks for the help.

----------

## ExecutorElassus

I seem to be experiencing a similar problem with a USB storage device. dmesg says:

```
usb 6-2: new high speed USB device using ehci_hcd and address 13

scsi13 : usb-storage 6-2:1.0

scsi 13:0:0:0: Direct-Access     M-Audio  MicroTrack 24/96      PQ: 0 ANSI: 0

sd 13:0:0:0: Attached scsi generic sg3 type 0

sd 13:0:0:0: [sdd] 8027713 512-byte logical blocks: (4.11 GB/3.82 GiB)

sd 13:0:0:0: [sdd] Write Protect is off

sd 13:0:0:0: [sdd] Mode Sense: 45 00 00 00

usb 6-2: reset high speed USB device using ehci_hcd and address 13

usb 6-2: reset high speed USB device using ehci_hcd and address 13

usb 6-2: USB disconnect, address 13

sd 13:0:0:0: [sdd] No Caching mode page present

sd 13:0:0:0: [sdd] Assuming drive cache: write through

sd 13:0:0:0: [sdd] READ CAPACITY failed

sd 13:0:0:0: [sdd]  Result: hostbyte=DID_NO_CONNECT driverbyte=DRIVER_OK

sd 13:0:0:0: [sdd] Sense not available.

sd 13:0:0:0: [sdd] Asking for cache data failed

sd 13:0:0:0: [sdd] Assuming drive cache: write through

sdd: detected capacity change from 4110189056 to 0

sd 13:0:0:0: [sdd] Attached SCSI removable disk

```

 which suggests that /dev/sdd* would be the location of the new device node. But that node never gets created, and I - being kinda dumb about these things - don't know how to mount the drive without it.

alex, Neddy: can a persistent node be created for a hot-swapping usb device? Or, can fstab be used to mount from a block device file (do they stay the same each time the same usb device is attached?)

Thanks for the help,

EE

----------

## alex.blackbit

Your drive was not successfully detected by the host.

Read the output you pasted!

Does this drive work on other machines?

----------

## ExecutorElassus

d'oh, indeed it was not.

Here's the thing: *sometimes* it does work, on this machine. On my Ubuntu box, it works every time. When it *does* work, dmesg says:

```
sd 7:0:0:0: [sdd] No Caching mode page present

sd 7:0:0:0: [sdd] Assuming drive cache: write through

sd 7:0:0:0: [sdd] READ CAPACITY failed

sd 7:0:0:0: [sdd]  Result: hostbyte=DID_NO_CONNECT driverbyte=DRIVER_OK

sd 7:0:0:0: [sdd] Sense not available.

sd 7:0:0:0: [sdd] Asking for cache data failed

sd 7:0:0:0: [sdd] Assuming drive cache: write through

sdd: detected capacity change from 2048901632 to 0

sd 7:0:0:0: [sdd] Attached SCSI removable disk

usb 6-2: new high speed USB device using ehci_hcd and address 7

scsi8 : usb-storage 6-2:1.0

scsi 8:0:0:0: Direct-Access     M-Audio  MicroTrack 24/96      PQ: 0 ANSI: 0

sd 8:0:0:0: Attached scsi generic sg3 type 0

sd 8:0:0:0: [sdd] 4001761 512-byte logical blocks: (2.04 GB/1.90 GiB)

sd 8:0:0:0: [sdd] Write Protect is off

sd 8:0:0:0: [sdd] Mode Sense: 45 00 00 00

usb 6-2: USB disconnect, address 7

```

Sometimes I just pull out the usb cable and plug it back in, and it works fine.

It could be that the plug itself is somehow faulty (it's maybe a bit loose on the motherboard?), but then it wouldn't be detecting a new device at all (instead of detecting it and then failing to identify it).

Any suggestions?

Thanks,

EE

----------

## alex.blackbit

it's hard to tell what exactly the problem is.

the first thing i would try is to test the drive itself, i.e. remove it from the usb cage and connect it directly to a controller (PATA/SATA).

in case this works without problems, i'd go one step further and take a look at the USB stuff: cable, etc, test other peripherals on that USB port, with that cable, etc.

----------

## NeddySeagoon

ExecutorElassus,

Connect your USB equipment as you would like it work then post the content of /proc/bus/usb/devices

You may be getting close to the 500mA per USB root hub, in which case, rearranging your USB device tree may fix it.

You can look at the file I asked for with usbview and tot up the power on each leg. If you get to 500mA, something will be unhappy.

----------

## ExecutorElassus

Just for some clarification: the drive in question is a chip-based audio recorder with a USB jack. There's no drive to remove. It's also the only thing on the hub. In fact, I oly seem to have problems with the various chip-based peripherals that aren't hard drives: ie, a camera and this audio recorder. Stick drives also sometimes fail.

I'll post /proc/bus/usb/devices, and hopefully something will come of it.

Thanks,

EE

----------

## NeddySeagoon

ExecutorElassus,

 *ExecutorElassus wrote:*   

> ... the only thing on the hub.

 

Theres a warning sign.  Some things will just not work attached to a hub

----------

## ExecutorElassus

wait: is "hub" something other than "the USB pins for one connector on the motherboard"? I'm plugging this directly into one of those USB connectors on the front of the case.

Thanks,

EE

----------

## NeddySeagoon

ExecutorElassus,

"Hub" is loose talk.

There are USB hubs like network hubs, so you can connect several USB devices to the same USB connector on your PC.

These hubs com in two sorts, powered and unpowered.  Powered hubs provide up 500mA for each USB port they provide.

Unpowered hubs pass the load back to the PC, so they support 500mA for all connected devices.

Then there are root hubs.  Thats the hardware inside your PC. Each root hub typically provides a stacked pair of USB connectors. So this pair of connectors con provide 500mA between them.

The hubs like network hubs cause all sorts of issues and are best avoided if possible.  I was that sort of hub I thought you meant.

----------

## ExecutorElassus

/proc/bus/usb/devices is here: http://paste2.org/p/1401886. The audio recorder is the second item on the list.

there is still no device node at /dev/sdd* (I have three SATA drives, so sda* through sdc* are for those). Should I look for it elsewhere?

Thanks,

EE

EDIT: after a minute, there is now a device node at /dev/sdd1. Is it just a matter of waiting?

----------

## NeddySeagoon

ExecutorElassus,

```
Driver=usb-storage
```

The right driver has attached now.

Some USB devices present two or even three devices to the system.  e.g. my USB 3G modem is a serial device and two USB storage devices, a CDROM (with the Windows driver) and a 8G USB thumb drive.  It can take a while for all the bits to appear.

----------

