OpenWrt Forum Archive

Topic: usb storage error

The content of this topic has been archived on 22 Mar 2018. There are no obvious gaps in this topic, but there may still be some posts missing at the end.

Hello all.

I just installed a self compiled buildroot-ng image on my wgt634u router.

Trying to set up my usb memory stick on it, I get this error message :

usb 1-1: new high speed USB device using ehci_hcd and address 3
usb 1-1: configuration #1 chosen from 1 choice
scsi1 : SCSI emulation for USB Mass Storage devices
  Vendor: USB2.0    Model: CardReader SD     Rev: 0100
  Type:   Direct-Access                      ANSI SCSI revision: 00
SCSI device sda: 1999872 512-byte hdwr sectors (1024 MB)
sda: Write Protect is off
sda: assuming drive cache: write through
devfs_mk_dir: invalid argument.<4>devfs_mk_dev: could not append to parent for /
disc
SCSI device sda: 1999872 512-byte hdwr sectors (1024 MB)
sda: Write Protect is off
sda: assuming drive cache: write through
 sda: sda1 sda2
devfs_mk_dev: could not append to parent for /part1
devfs_mk_dev: could not append to parent for /part2
sd 1:0:0:0: Attached scsi removable disk sda

Any ideas why devfs_mk_dir is not working? Did I forget to install something or include a kernel module in my image?

Thanks!

Stanislas

There's some problems with devfs patches in that kernel.

A quick and temporary workaround

mknod /dev/sda b 8 0
mknod /dev/sda1 b 8 1
mknod /dev/sda2 b 8 2

Mounting /dev/part1 instead of /dev/sda1 works. Thank you rdubya. I wonder if it is supposed to work like this.

Groz : mknod is not found on my system. What package installs it?
yyerrok : Thanks, your syntax works on my system too.

Stanislas

By the way, I am running kamikaze r4548 which has a 2.6.17 kernel.

Stanislas

This should all be fixed now

[4669] fixes devfs_mk_dir
[4673] adds /dev/sda* and automatically mounts the partitions under /tmp

It's partially fixed. It works when the disk is plugged after booting. But there ist still no /dev/sda* created when the disk is already plugged in before powerup.


root@OpenWrt:/# ls /dev/scsi/host0/bus0/target0/lun0 -l
brw-------    1 root     root       8,   0 Jan  1  1970 disc
brw-------    1 root     root       8,   1 Jan  1  1970 part1
brw-------    1 root     root       8,   2 Jan  1  1970 part2
root@OpenWrt:/# ls /dev -l
crw-------    1 root     root       5,   1 Jan  1 00:00 console
drwxr-xr-x    1 root     root            0 Jan  1  1970 discs
crw-rw-rw-    1 root     root       1,   7 Jan  1  1970 full
crw-r-----    1 root     root       1,   2 Jan  1  1970 kmem
crw-r--r--    1 root     root       1,  11 Jan  1  1970 kmsg
srw-rw-rw-    1 root     root            0 Jan  1 00:00 log
crw-r-----    1 root     root       1,   1 Jan  1  1970 mem
drwxr-xr-x    1 root     root            0 Jan  1  1970 mtd
drwxr-xr-x    1 root     root            0 Jan  1  1970 mtdblock
crw-rw-rw-    1 root     root       1,   3 Jan  1  1970 null
crw-r-----    1 root     root       1,   4 Jan  1  1970 port
crw-rw-rw-    1 root     root       5,   2 Jan  1  1970 ptmx
drwxr-xr-x    2 root     root            0 Jan  1 00:00 pts
crw-r--r--    1 root     root       1,   8 Jan  1  1970 random
lr-xr-xr-x    1 root     root           10 Jan  1 00:00 root -> mtdblock/2
drwxr-xr-x    1 root     root            0 Jan  1  1970 scsi
drwxr-xr-x    1 root     root            0 Jan  1  1970 shm
drwxr-xr-x    1 root     root            0 Jan  1  1970 tts
crw-rw-rw-    1 root     root       5,   0 Jan  1  1970 tty
crw-r--r--    1 root     root       1,   9 Jan  1  1970 urandom
crw-rw-rw-    1 root     root       1,   5 Jan  1  1970 zero
Jan  1 00:00:16 (none) user.notice kernel: Creating 5 MTD partitions on "Physically mapped flash":
Jan  1 00:00:16 (none) user.notice kernel: 0x00000000-0x000a0000 : "cfe"
Jan  1 00:00:16 (none) user.notice kernel: 0x000a0000-0x007e0000 : "linux"
Jan  1 00:00:16 (none) user.notice kernel: 0x00164400-0x00260000 : "rootfs"
Jan  1 00:00:16 (none) user.warn kernel: mtd: partition "rootfs" doesn't start on an erase block boundary -- force read-only
Jan  1 00:00:16 (none) user.notice kernel: 0x007e0000-0x00800000 : "nvram"
Jan  1 00:00:16 (none) user.notice kernel: 0x00260000-0x007e0000 : "OpenWrt"
Jan  1 00:00:16 (none) user.warn kernel: PCI: Enabling device 0000:01:02.2 (0000 -> 0002)
Jan  1 00:00:16 (none) user.warn kernel: PCI: Fixing up device 0000:01:02.2
Jan  1 00:00:16 (none) user.info kernel: ehci_hcd 0000:01:02.2: EHCI Host Controller
Jan  1 00:00:16 (none) user.info kernel: ehci_hcd 0000:01:02.2: new USB bus registered, assigned bus number 1
Jan  1 00:00:16 (none) user.info kernel: ehci_hcd 0000:01:02.2: irq 2, io mem 0x40000000
Jan  1 00:00:16 (none) user.info kernel: ehci_hcd 0000:01:02.2: USB 2.0 started, EHCI 1.00, driver 10 Dec 2004
Jan  1 00:00:16 (none) user.info kernel: usb usb1: configuration #1 chosen from 1 choice
Jan  1 00:00:16 (none) user.info kernel: hub 1-0:1.0: USB hub found
Jan  1 00:00:16 (none) user.info kernel: hub 1-0:1.0: 2 ports detected
Jan  1 00:00:16 (none) user.info kernel: Initializing USB Mass Storage driver...
Jan  1 00:00:16 (none) user.info kernel: usb 1-1: new high speed USB device using ehci_hcd and address 2
Jan  1 00:00:16 (none) user.info kernel: usb 1-1: configuration #1 chosen from 1 choice
Jan  1 00:00:16 (none) user.info kernel: scsi0 : SCSI emulation for USB Mass Storage devices
Jan  1 00:00:16 (none) user.info kernel: usbcore: registered new driver usb-storage
Jan  1 00:00:16 (none) user.info kernel: USB Mass Storage support registered.
Jan  1 00:00:16 (none) user.warn kernel: es per conntrack
Jan  1 00:00:16 (none) user.debug kernel: usb-storage: device found at 2
Jan  1 00:00:16 (none) user.debug kernel: usb-storage: waiting for device to settle before scanning
Jan  1 00:00:16 (none) user.warn kernel: ip_tables: (C) 2000-2006 Netfilter Core Team
Jan  1 00:00:16 (none) user.info kernel: TCP vegas registered
Jan  1 00:00:16 (none) user.info kernel: NET: Registered protocol family 1
Jan  1 00:00:16 (none) user.info kernel: NET: Registered protocol family 17
Jan  1 00:00:16 (none) user.info kernel: 802.1Q VLAN Support v1.8 Ben Greear <greearb@candelatech.com>
Jan  1 00:00:16 (none) user.info kernel: All bugs added by David S. Miller <davem@redhat.com>
Jan  1 00:00:16 (none) user.warn kernel: VFS: Mounted root (squashfs filesystem) readonly.
Jan  1 00:00:16 (none) user.info kernel: Mounted devfs on /dev
Jan  1 00:00:16 (none) user.info kernel: Freeing unused kernel memory: 132k freed
Jan  1 00:00:16 (none) user.warn kernel: Algorithmics/MIPS FPU Emulator v1.5
Jan  1 00:00:16 (none) user.notice kernel:   Vendor: TinyDisk  Model:  2006-06-22       Rev: 0.00
Jan  1 00:00:16 (none) user.notice kernel:   Type:   Direct-Access                      ANSI SCSI revision: 02
Jan  1 00:00:16 (none) user.notice kernel: SCSI device sda: 4096000 512-byte hdwr sectors (2097 MB)
Jan  1 00:00:16 (none) user.notice kernel: sda: Write Protect is off
Jan  1 00:00:16 (none) user.debug kernel: sda: Mode Sense: 00 00 00 00
Jan  1 00:00:16 (none) user.err kernel: sda: assuming drive cache: write through
Jan  1 00:00:16 (none) user.notice kernel: SCSI device sda: 4096000 512-byte hdwr sectors (2097 MB)
Jan  1 00:00:16 (none) user.notice kernel: sda: Write Protect is off
Jan  1 00:00:16 (none) user.debug kernel: sda: Mode Sense: 00 00 00 00
Jan  1 00:00:16 (none) user.err kernel: sda: assuming drive cache: write through
Jan  1 00:00:16 (none) user.info kernel:  /dev/scsi/host0/bus0/target0/lun0: p1 p2
Jan  1 00:00:16 (none) user.notice kernel: sd 0:0:0:0: Attached scsi removable disk sda
Jan  1 00:00:16 (none) user.debug kernel: usb-storage: device scan complete
Jan  1 00:00:17 (none) user.info kernel: b44: eth0: Link is up at 100 Mbps, full duplex.
Jan  1 00:00:17 (none) user.info kernel: b44: eth0: Flow control is off for TX and off for RX.
Jan  1 00:00:17 (none) user.info : sed: /etc/modules: No such file or directory
Jan  1 00:00:18 (none) user.notice root: waiting for sda2...........mount: Mounting /dev/sda2 on /tmp/sda2 failed: No such file or direcy
Jan  1 00:00:18 (none) user.notice root: waiting for sda1...........mount: Mounting /dev/sda1 on /tmp/sda1 failed: No such file or direcy
Jan  1 00:00:18 (none) user.notice root: waiting for sda...........
Jan  1 00:00:18 (none) user.info kernel: wlan: 0.8.4.2 (0.9.0)

The discussion might have continued from here.