[Solved] USB setup problem

I followed the process to install the usb storage, but it doesnt detect the drives. I tried ext4 and ext3 both, but it doesnt show up on block info

root@OpenWrt:/tmp# block info
/dev/mtdblock5: UUID="9a37d668-dbc3d0df-48f6d2d1-8a4c9059" VERSION="4.0" MOUNT="/rom" TYPE="squashfs"
/dev/mtdblock6: MOUNT="/overlay" TYPE="jffs2"


root@OpenWrt:/tmp# fdisk -l
Disk /dev/mtdblock0: 192 KiB, 196608 bytes, 384 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes


Disk /dev/mtdblock1: 64 KiB, 65536 bytes, 128 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes


Disk /dev/mtdblock2: 64 KiB, 65536 bytes, 128 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes


Disk /dev/mtdblock3: 15.7 MiB, 16449536 bytes, 32128 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes


Disk /dev/mtdblock4: 1.4 MiB, 1423360 bytes, 2780 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes


Disk /dev/mtdblock5: 14.3 MiB, 15025664 bytes, 29347 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes


Disk /dev/mtdblock6: 12.3 MiB, 12910592 bytes, 25216 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes

root@OpenWrt:/tmp# uname -a
Linux OpenWrt 4.9.77 #0 Thu Feb 15 03:57:38 2018 mips GNU/Linux

I have some errors on the kernel log, but not sure what to do next :frowning:
I did have to do a --force-depends on the kmod-usb packages - could that be an issue?

[    3.716953] kmodloader: loading kernel modules from /etc/modules-boot.d/*
[    3.989273] usbcore: registered new interface driver usbfs
[    4.000364] usbcore: registered new interface driver hub
[    4.011068] usbcore: registered new device driver usb
[    4.027014] ehci_hcd: USB 2.0 'Enhanced' Host Controller (EHCI) Driver
[    4.041773] ehci-platform: EHCI generic platform driver
[    4.062471] phy phy-usbphy.0: remote usb device wakeup disabled
[    4.074248] phy phy-usbphy.0: UTMI 16bit 30MHz
[    4.083114] ehci-platform 101c0000.ehci: EHCI Host Controller
[    4.094581] ehci-platform 101c0000.ehci: new USB bus registered, assigned bus number 1
[    4.110449] ehci-platform 101c0000.ehci: irq 26, io mem 0x101c0000
[    4.131981] ehci-platform 101c0000.ehci: USB 2.0 started, EHCI 1.00
[    4.145514] hub 1-0:1.0: USB hub found
[    4.153366] hub 1-0:1.0: 1 port detected
[    4.164337] kmodloader: done loading kernel modules from /etc/modules-boot.d/*
[    4.183091] init: - preinit -
[    5.591480] usb 1-1: new high-speed USB device number 2 using ehci-platform
[    5.996867] 8021q: adding VLAN 0 to HW filter on device eth0
[    7.885292] jffs2: notice: (358) jffs2_build_xattr_subsystem: complete building xattr subsystem, 0 of xdatum (0 unchecked, 0 orphan) and 0 of xref (0 dead, 0 orphan) found.
[    7.965229] mount_root: loading kmods from internal overlay
[    8.004391] kmodloader: failed to open /tmp/overlay/upper/lib/modules/4.9.77/ehci-platform.ko
[    8.022233] kmodloader: failed to open /tmp/overlay/upper/lib/modules/4.9.77/ledtrig-usbport.ko
[    8.040404] kmodloader: failed to open /tmp/overlay/upper/lib/modules/4.9.77/usb-common.ko
[    8.057727] kmodloader: failed to open /tmp/overlay/upper/lib/modules/4.9.77/usbcore.ko

You need kmod USB core USB storage, fs ext4 etc loaded at boot. In modules-boot.d.

The "new high speed USB device" and nothing afterward means usb-storage is not loaded or working.

The mtd blocks you see are the internal flash. External drives will create /dev/sd devices through usb-storage.

Thank you, but wouldn't the modules load automatically? If not, could you please tell me how I can change config to load them at boot?

Edit:
I tried to load them during run time, still no luck

root@OpenWrt:~# insmod usbcore
module is already loaded - usbcore
root@OpenWrt:~# insmod ehci-hcd
module is already loaded - ehci-hcd
root@OpenWrt:~# dmesg | grep usb
[    0.280181] ralink-usb-phy usbphy: invalid resource
[    3.986868] usbcore: registered new interface driver usbfs
[    3.997947] usbcore: registered new interface driver hub
[    4.008641] usbcore: registered new device driver usb
[    4.059852] phy phy-usbphy.0: remote usb device wakeup disabled
[    4.071629] phy phy-usbphy.0: UTMI 16bit 30MHz
[    5.589537] usb 1-1: new high-speed USB device number 2 using ehci-platform
[  113.842530] usb 1-1: USB disconnect, device number 2
[  115.281713] usb 1-1: new high-speed USB device number 3 using ehci-platform

Looks like it was a kernel mismatch. Upgraded and its detecting now

[  284.090152] scsi 0:0:0:0: Direct-Access     SanDisk  Cruzer Blade     1.00 PQ: 0 ANSI: 6
[  284.109725] sd 0:0:0:0: [sda] 30595072 512-byte logical blocks: (15.7 GB/14.6 GiB)
[  284.156528] sd 0:0:0:0: [sda] Write Protect is off
[  284.166105] sd 0:0:0:0: [sda] Mode Sense: 43 00 00 00
[  284.185996] sd 0:0:0:0: [sda] Write cache: disabled, read cache: enabled, doesn't support DPO or FUA
[  284.286162]  sda: sda1
[  284.304345] sd 0:0:0:0: [sda] Attached SCSI removable disk