OpenWrt Forum Archive

Topic: no USB device in /dev/ ?

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

Hi,

i finaly manged it to install openwrt on a TP-LINK 703N (which has a usb port)

I now want to mount an usb stick pluged into the Router, but it doesnt show up in /dev/

first i formated the stick with ext2 (2 Partitions - 1. ~500mb for software, and a second ~3,5GB for data).
then i installed: kmod-usb-storage, block-mount, block-hotplug, kmod-fs-ext2

but after a reboot there is no usb device in /dev/.

only these device are there:

1-1        kmsg       mtd0       mtd1ro     mtd3       mtd4ro     mtdblock0  mtdblock3  null       ptmx       shm        ttyS0      watchdog
console    log        mtd0ro     mtd2       mtd3ro     mtd5       mtdblock1  mtdblock4  port       pts        tty        urandom    zero
full       mem        mtd1       mtd2ro     mtd4       mtd5ro     mtdblock2  mtdblock5  ppp        random     ttyATH0    usb1

usb1 seems not to be the usb stick, because i cannot mount it!
mount -t ext2 /dev/usb1 /mnt/usb/
mount: mounting /dev/usb1 on /mnt/usb/ failed: No such device


When i plug the stick in, dmesg sais:

[   87.990000] usb 1-1: new high-speed USB device number 3 using ath79-ehci


What did i wrong there now?
Any Help?


Thanks,


Pcace

opkg update
opkg install kmod-usb-storage kmod-fs-ext4 block-mount

Also make sure that the kmods fit to your version. Snapshot-Repos are only valid for ca. 24h before they get replaced.

Hmm, looks like something went wrong:


root@wrt:~# opkg update
Downloading http://downloads.openwrt.org/snapshots/ … ackages.gz.
Inflating http://downloads.openwrt.org/snapshots/ … ackages.gz.
Updated list of available packages in /var/opkg-lists/snapshots.
root@schachtel:~# opkg install kmod-usb-storage kmod-fs-ext4 block-mount
Package kmod-usb-storage (3.2.13-1) installed in root is up to date.
Installing kmod-fs-ext4 (3.2.13-1) to root...
Downloading http://downloads.openwrt.org/snapshots/ … ar71xx.ipk.
Package block-mount (0.2.0-8) installed in root is up to date.
Collected errors:
* satisfy_dependencies_for: Cannot satisfy the following dependencies for kmod-fs-ext4:
*     kernel (= 3.2.13-1-be93f2269adcaf7eaeffd4cf0086e5dd) *     kernel (= 3.2.13-1-be93f2269adcaf7eaeffd4cf0086e5dd) *
* opkg_install_cmd: Cannot install package kmod-fs-ext4.
root@wrt:~#


Ideas?

Yes, the repo already got replaced.

And what does that mean?

Pcace

That you have to reflash and install required kmods asap.

Thanks so much!!!!

it worked!

i just resetted the complete router now. it worked. but this looks not so elegant. is there a possibility to update the firmware from the console?

Thanks,

Pcace

cd /tmp
wget http://.../...-sysupgrade.bin
sysupgrade -n /tmp/...-sysupgrade.bin

Thanks!
But now the next question wink
i managed it that the usb storage works also after reboot!
The plan is to have one partition for software and one aditional partition.

When i try to install luci on the USB stick i get the following:

root@OpenWrt:/mnt/usb# export USB=/mnt/usb
root@OpenWrt:/mnt/usb# export PATH=$PATH:$USB/usr/bin:$USB/usr/sbin
root@OpenWrt:/mnt/usb# export LD_LIBRARY_PATH=$USB/lib:$USB/usr/lib
root@OpenWrt:/mnt/usb# opkg install luci -d usb
Installing luci (trunk+svn8525-1) to usb...
Downloading http://downloads.openwrt.org/snapshots/ … ar71xx.ipk.
Installing uhttpd (31) to usb...
Downloading http://downloads.openwrt.org/snapshots/ … ar71xx.ipk.
Installing luci-mod-admin-full (trunk+svn8525-1) to usb...
Downloading http://downloads.openwrt.org/snapshots/ … ar71xx.ipk.
Installing luci-mod-admin-core (trunk+svn8525-1) to usb...
Downloading http://downloads.openwrt.org/snapshots/ … ar71xx.ipk.
Installing luci-lib-web (trunk+svn8525-1) to usb...
Downloading http://downloads.openwrt.org/snapshots/ … ar71xx.ipk.
Installing luci-lib-core (trunk+svn8525-1) to usb...
Downloading http://downloads.openwrt.org/snapshots/ … ar71xx.ipk.
Installing libuci-lua (2012-03-28.1-1) to usb...
Downloading http://downloads.openwrt.org/snapshots/ … ar71xx.ipk.
Installing luci-lib-sys (trunk+svn8525-1) to usb...
Downloading http://downloads.openwrt.org/snapshots/ … ar71xx.ipk.
Installing luci-lib-nixio (trunk+svn8525-1) to usb...
Downloading http://downloads.openwrt.org/snapshots/ … ar71xx.ipk.
Installing luci-proto-core (trunk+svn8525-1) to usb...
Downloading http://downloads.openwrt.org/snapshots/ … ar71xx.ipk.
Installing luci-i18n-english (trunk+svn8525-1) to usb...
Downloading http://downloads.openwrt.org/snapshots/ … ar71xx.ipk.
Installing luci-lib-ipkg (trunk+svn8525-1) to usb...
Downloading http://downloads.openwrt.org/snapshots/ … ar71xx.ipk.
Installing luci-theme-openwrt (trunk+svn8525-1) to usb...
Downloading http://downloads.openwrt.org/snapshots/ … ar71xx.ipk.
Installing luci-theme-base (trunk+svn8525-1) to usb...
Downloading http://downloads.openwrt.org/snapshots/ … ar71xx.ipk.
Installing luci-app-firewall (trunk+svn8525-1) to usb...
Downloading http://downloads.openwrt.org/snapshots/ … ar71xx.ipk.
Configuring luci-lib-sys.
Configuring libuci-lua.
Configuring luci-lib-core.
Configuring luci-lib-nixio.
Configuring luci-lib-web.
Configuring luci-proto-core.
Configuring luci-i18n-english.
/mnt/usb//usr/lib/opkg/info/luci-i18n-english.postinst: .: line 4: can't open '/etc/uci-defaults/luci-i18n-english'
Configuring luci-mod-admin-core.
/mnt/usb//usr/lib/opkg/info/luci-mod-admin-core.postinst: line 7: /etc/init.d/luci_fixtime: not found
/mnt/usb//usr/lib/opkg/info/luci-mod-admin-core.postinst: line 7: /etc/init.d/luci_fixtime: not found
/mnt/usb//usr/lib/opkg/info/luci-mod-admin-core.postinst: line 7: /etc/init.d/luci_dhcp_migrate: not found
/mnt/usb//usr/lib/opkg/info/luci-mod-admin-core.postinst: line 7: /etc/init.d/luci_dhcp_migrate: not found
Configuring luci-theme-base.
Configuring luci-theme-openwrt.
/mnt/usb//usr/lib/opkg/info/luci-theme-openwrt.postinst: .: line 4: can't open '/etc/uci-defaults/luci-theme-openwrt'
Configuring luci-app-firewall.
Configuring luci-lib-ipkg.
Configuring luci-mod-admin-full.
Configuring uhttpd.
Configuring luci.
Collected errors:
* pkg_run_script: package "luci-i18n-english" postinst script returned status 2.
* opkg_configure: luci-i18n-english.postinst returned 2.
* pkg_run_script: package "luci-theme-openwrt" postinst script returned status 2.
* opkg_configure: luci-theme-openwrt.postinst returned 2.
root@OpenWrt:/mnt/usb#


Whats wrong there now!?

thanks,

Pcace

LuCI was never intended to run in another target directory, most packages neither - its better to use an extroot setup to transparently extend the rootfs.
If you force packages to install into another dir by using the -d opkg option you'll see all kinds of breakage and you're supposed to symlink missing stuff yourself.

To run LuCI off another dir you also need to patch it, see https://dev.openwrt.org/ticket/10733

Hey, again a question:

i completely wanted to resetup my router. i downloaded the squashfs image for the router and installed it. no i want to install the USB drivers, but i get the following error:


root@OpenWrt:~# opkg update
Downloading http://downloads.openwrt.org/snapshots/ … ackages.gz.
Inflating http://downloads.openwrt.org/snapshots/ … ackages.gz.
Updated list of available packages in /var/opkg-lists/attitude_adjustment.
root@OpenWrt:~# opkg install kmod-usb-storage
Unknown package 'kmod-usb-storage'.
Collected errors:
* opkg_install_cmd: Cannot install package kmod-usb-storage.
root@OpenWrt:~#



Why cant i install that?!?!?


Thanks,

Pcace

Because you use an unstable trunk snapshot and the kmods are broken right now.

Is there any stable release i could use?! Its a bit annoing that everyday there changes so much!
When will the update be there?


Thanks,

Pcace

No there isn't. Next stable is scheduled in june.

Ok, thats somehow good (and bad)...
So the only thing i can do is waiting until an update appears?! Can a use an old firmware file?!


Thanks

(Grüße aus Leipzig wink )

So when should this be fixed?!

Thanks,

Pcace

The discussion might have continued from here.