USB Mounting Issues

Hey, it's my first post on this Forum.
I'm using a custom build of OpenWRT 17.01.4 r3560-79f57e422d on a project, over the AR9344 processor. This can't be changed so I can't update or upgrade the system.
I'm trying to mount an USB Mass Storage Device, I've installed the following packets:

  • kmod-usb-core - 4.4.92-1
  • kmod-usb-storage - 4.4.92-1
    • kmod-scsi-core_4.4.92-1_mips_24kc *
  • kmod-usb2 - 4.4.92-1
  • libusb-1.0 - 1.0.21-1
  • usbutils - 007-7

And for the ext4 filesystem support:

  • libext4fs
  • e2fsprogs
  • kmod-fs-ext4
    • kmod-lib-crc16
    • kmod-crypto-hash
    • kmod-crypto-crc32c

After that, I can see the devices properly on lsusb, but I can't see anything on /dev/sd* nor /mnt. In fact, I don't have any /dev/sd* file.

The dmesg output shows that the usb is recognized, but after a few seconds is reseted:

3044.549379] usb-storage 1-1:1.0: USB Mass Storage device detected
[ 3044.557507] scsi host5: usb-storage 1-1:1.0
[ 3067.185883] usb 1-1: reset high-speed USB device number 7 using ehci-platform

Do you have any suggestions on this? thanks in advance!

Looks like you are missing block-mount and kmod-usb-ohci and kmod-usb-uhci

Also can try to install lsblk and post output
opkg install lsblk
lsblk -f

3 Likes

Hey faser, thanks four your quick reply!

The block-mount packet was installed, but I didn't install kmod-usb-ohci and kmod-usb-uhci since the AR9344 processor has USB2.0 support. Anyway, I've already installed them now.

The dmesg shows the following during the boot process (only relevant lines):

[    5.313394] usbcore: registered new interface driver usbfs
[    5.319184] usbcore: registered new interface driver hub
[    5.324704] usbcore: registered new device driver usb
[    5.352497] ehci_hcd: USB 2.0 'Enhanced' Host Controller (EHCI) Driver
[    5.361010] ehci-platform: EHCI generic platform driver
[    5.366523] ehci-platform ehci-platform: EHCI Host Controller
[    5.372422] ehci-platform ehci-platform: new USB bus registered, assigned bus number 1
[    5.382613] ehci-platform ehci-platform: TX-TX IDP fix enabled
[    5.388589] ehci-platform ehci-platform: irq 3, io mem 0x1b000000
[    5.405882] ehci-platform ehci-platform: USB 2.0 started, EHCI 1.00
[    5.413455] hub 1-0:1.0: USB hub found
[    5.417879] hub 1-0:1.0: 1 port detected
[    5.955971] usb 1-1: new high-speed USB device number 2 using ehci-platform
[   10.847025] SCSI subsystem initialized
[   10.894074] ohci_hcd: USB 1.1 'Open' Host Controller (OHCI) Driver
[   10.902802] ohci-platform: OHCI generic platform driver
[   10.924365] uhci_hcd: Unknown symbol uhci_reset_hc (err 0)
[   10.932359] uhci_hcd: Unknown symbol uhci_reset_hc (err 0)
[   10.966236] usb-storage 1-1:1.0: USB Mass Storage device detected
[   10.973323] scsi host0: usb-storage 1-1:1.0
[   10.978381] usbcore: registered new interface driver usb-storage
[   10.987594] uhci_hcd: Unknown symbol uhci_reset_hc (err 0)
[   10.993492] kmodloader: 1 module could not be probed
[   10.998899] kmodloader: - uhci-hcd - 0
[   11.227811] block: attempting to load /tmp/jffs_cfg/upper/etc/config/fstab
[   11.236789] block: extroot: not configured
[   13.181528] uhci_hcd: Unknown symbol uhci_reset_hc (err 0)
[   13.216001] uhci_hcd: Unknown symbol uhci_reset_hc (err 0)
[   13.224047] uhci_hcd: Unknown symbol uhci_reset_hc (err 0)
[   13.466054] uhci_hcd: Unknown symbol uhci_reset_hc (err 0)
[   13.514683] uhci_hcd: Unknown symbol uhci_reset_hc (err 0)
[   13.529384] uhci_hcd: Unknown symbol uhci_reset_hc (err 0)
[   33.366453] usb 1-1: reset high-speed USB device number 2 using ehci-platform

(the usb was connected after powering the board)

I'm still seeing the same issue:

Wed Jul 21 16:18:31 2021 kern.info kernel: [  286.785890] usb 1-1: new high-speed USB device number 3 using ehci-platform
Wed Jul 21 16:18:31 2021 kern.info kernel: [  286.939361] usb-storage 1-1:1.0: USB Mass Storage device detected
Wed Jul 21 16:18:31 2021 kern.info kernel: [  286.949213] scsi host1: usb-storage 1-1:1.0
Wed Jul 21 16:18:53 2021 kern.info kernel: [  309.185920] usb 1-1: reset high-speed USB device number 3 using ehci-platform

lsblk -f shows:

root@lwconnect:~# lsblk -f
NAME      FSTYPE   LABEL UUID MOUNTPOINT
mtdblock0                     
mtdblock1                     
mtdblock2                     
mtdblock3                     
mtdblock4 squashfs            /rom
mtdblock5                     /overlay
mtdblock6            

Is it necessary to manually create the /dev/sd file? what packet is responsible for that?
my /dev folder contains the following files:

drwxr-xr-x    4 root     root           980 Jul 23  2021 ./
drwxr-xr-x    1 root     root             0 Jul 21 08:34 ../
crw-------    1 root     root       10, 235 Jul 23  2021 autofs
drwxr-xr-x    3 root     root            60 Jan  1  1970 bus/
crw-------    1 root     root        5,   1 Jan  1  1970 console
crw-------    1 root     root       10,  63 Jan  1  1970 cpu_dma_latency
crw-rw-rw-    1 root     root        1,   7 Jan  1  1970 full
crw-------    1 root     root        1,   2 Jan  1  1970 kmem
crw-------    1 root     root        1,  11 Jan  1  1970 kmsg
srw-rw-rw-    1 root     root             0 Jul 23  2021 log=
crw-------    1 root     root        1,   1 Jan  1  1970 mem
crw-------    1 root     root       10,  60 Jan  1  1970 memory_bandwidth
crw-------    1 root     root       90,   0 Jan  1  1970 mtd0
crw-------    1 root     root       90,   1 Jan  1  1970 mtd0ro
crw-------    1 root     root       90,   2 Jan  1  1970 mtd1
crw-------    1 root     root       90,   3 Jan  1  1970 mtd1ro
crw-------    1 root     root       90,   4 Jan  1  1970 mtd2
crw-------    1 root     root       90,   5 Jan  1  1970 mtd2ro
crw-------    1 root     root       90,   6 Jan  1  1970 mtd3
crw-------    1 root     root       90,   7 Jan  1  1970 mtd3ro
crw-------    1 root     root       90,   8 Jan  1  1970 mtd4
crw-------    1 root     root       90,   9 Jan  1  1970 mtd4ro
crw-------    1 root     root       90,  10 Jan  1  1970 mtd5
crw-------    1 root     root       90,  11 Jan  1  1970 mtd5ro
crw-------    1 root     root       90,  12 Jan  1  1970 mtd6
crw-------    1 root     root       90,  13 Jan  1  1970 mtd6ro
brw-------    1 root     root       31,   0 Jan  1  1970 mtdblock0
brw-------    1 root     root       31,   1 Jan  1  1970 mtdblock1
brw-------    1 root     root       31,   2 Jan  1  1970 mtdblock2
brw-------    1 root     root       31,   3 Jan  1  1970 mtdblock3
brw-------    1 root     root       31,   4 Jan  1  1970 mtdblock4
brw-------    1 root     root       31,   5 Jan  1  1970 mtdblock5
brw-------    1 root     root       31,   6 Jan  1  1970 mtdblock6
crw-------    1 root     root       10,  62 Jan  1  1970 network_latency
crw-------    1 root     root       10,  61 Jan  1  1970 network_throughput
crw-rw-rw-    1 root     root        1,   3 Jan  1  1970 null
crw-------    1 root     root        1,   4 Jan  1  1970 port
crw-------    1 root     root      108,   0 Jul 23  2021 ppp
crw-rw-rw-    1 root     root        5,   2 Jul 21 16:33 ptmx
drwxr-xr-x    2 root     root             0 Jan  1  1970 pts/
crw-rw-rw-    1 root     root        1,   8 Jan  1  1970 random
lrwxrwxrwx    1 root     root             8 Jan  1  1970 shm -> /tmp/shm/
crw-------    1 root     root      153,   0 Jul 23  2021 spidev1.0
crw-rw-rw-    1 root     root        5,   0 Jan  1  1970 tty
crw-------    1 root     root      253,   0 Jul 21  2021 ttyATH0
crw-------    1 root     root        4,  64 Jan  1  1970 ttyS0
crw-rw-rw-    1 root     root        1,   9 Jan  1  1970 urandom
crw-------    1 root     root       10, 130 Jan  1  1970 watchdog
crw-rw-rw-    1 root     root        1,   5 Jan  1  1970 zero

What is the USB Device you are trying to connect?

2 Likes

I'm trying to connect an USB mass storage device. It is a 32Gb Sandisk Pendrive

lsusb reads it correclty:

root@lwconnect:/tmp# lsusb -t
/:  Bus 01.Port 1: Dev 1, Class=root_hub, Driver=ehci-platform/1p, 480M
    |__ Port 1: Dev 26, If 0, Class=Mass Storage, Driver=usb-storage, 480M
root@lwconnect:/tmp# lsusb
Bus 001 Device 026: ID 0781:5567 SanDisk Corp. Cruzer Blade
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
root@lwconnect:/tmp# 

not saying this is the case with yours... but the one I owned was unreliable... never had any (factory-quality) problems with other sandisk sticks...

your earlier dmesg is typical of missing fs kmods (or scsi)

opkg list-installed | grep -E '(^kmod-fs|^kmod-scsi|^kmod-usb)'

(edit: i see you posted them near the top looks ok except maybe 'nls/codepage' type package may be missing)

these are whats on my system... no idea of they are needed or not;

kmod-nls-base
kmod-nls-cp437
kmod-nls-iso8859-1
kmod-nls-utf8

was pretty sure the fs packages pulled in what they needed from above tho'... ok... looks like they were pulled in by fs-vfat... except for

/usr/lib/opkg/info/kmod-usb-core.control:Depends: kernel (=5.4.132-1-272d8d859b9c04efc790e7b6c91cc80f), kmod-nls-base

usb-core wanted nls-base

I think you should uninstall;

kmod-usb-uhci

based on the errors above... and maybe try

kmod-usb-ehci
2 Likes

This pendrive is working correctly on Debian, windows and macOS. I also tried a Kingston pendrive with the same results.

here's the output of opkg list:

root@lwconnect:/tmp# opkg list-installed | grep -E '(^kmod-fs|^kmod-scsi|^kmod-usb)'
kmod-fs-autofs4 - 4.4.92-1
kmod-fs-ext4 - 4.4.92-1
kmod-scsi-core - 4.4.92-1
kmod-scsi-generic - 4.4.92-1
kmod-usb-core - 4.4.92-1
kmod-usb-dwc2 - 4.4.92-1
kmod-usb-ohci - 4.4.92-1
kmod-usb-storage - 4.4.92-1
kmod-usb2 - 4.4.92-1
kmod-usb2-pci - 4.4.92-1
kmod-usbmon - 4.4.92-1

I'll try with these NLS packets. They're related to Native Language Support... I have this already installed:

kmod-nls-base - 4.4.92-1

The AR9344 processor has USB2.0 support, so the ehci module should work. I tried to install uhci module but shows some errors during the booting process. But the other USB1.0 driver, ohci does work

1 Like

Sometimes kmod-usb-storage-uas is needed in addition to kmod-usb-storage.

2 Likes

I'm on OpenWRT 17.01.4. Is that packet available on this version? Because I've searched everywhere and still can't find it on downloads.openwrt.org nor compile it with make menuconfig. Maybe that packet exists from the 18 version onwards

The BOT driver is included in kmod-usb-storage?

I can't find it in 17.. either, just 18.. onward, sorry about that.

1 Like

17 and 18 are both end of life and obsolete. Why not use 19.07.7 that is actually supported , very stable and still maintained?

2 Likes

I wish I could update to 19, but it's not my decision :frowning:

should the uci show output show something related to the usb? like a trigger or something? because the original snapshot was built without USB support, and I'm trying to add it lately. But for example, on the sources I can see things like:

file config_generate:

usb)
			local device
			json_get_vars device
			uci -q batch <<-EOF
				set system.$cfg.trigger='usbdev'
				set system.$cfg.interval='50'
				set system.$cfg.dev='$device'
			EOF
		;;

and I don't have anything similar in the uci configuration. That lines are includes in case that CONFIG_USB_SUPPORT is set...I think:

file target.mk

ifneq ($(CONFIG_USB)$(CONFIG_USB_SUPPORT),)
      ifneq ($(CONFIG_USB_ARCH_HAS_HCD)$(CONFIG_USB_EHCI_HCD),)
        FEATURES += usb
      endif

Who has a mindset to use old non original firmware and at the same time not be interested to upgrade it?
That makes no logical sense what so ever.

:man_shrugging:
bussiness logic != programmer logic

1 Like

It ain’t a meaningful business logic ether…unless your biggest dream in business is to be exploited!?