Opened 4 years ago

Closed 3 years ago

Last modified 2 years ago

#10739 closed enhancement (worksforme)

Thou shalt not install kernel modules on USB storage

Reported by: wrosner@… Owned by: developers
Priority: low Milestone: Barrier Breaker 14.07
Component: kernel Version: Trunk
Keywords: usb serial modules opkg destination mount opt stick boot Cc:


Not a question, but an answer:

It is a risky thing to have kernel modules installed with opkg -d on eg. USB sticks.

I tried this on a test setup (bleeding edge, r29631 on TL 3220) and it yielded me a night and day learning experience.

The stick is mounted:
/dev/sda1 on /opt type ext3

Although I did relink the modules to the standard locations, like

/lib/modules/ -> /opt/lib/modules/

this does not work at boot time.
As a consequence, all the nice auto loading mimics for USB modules at the boot process is broken.

e.g for serial adaptors, I have to manually load

insmod usbserial
insmod pl2303
insmod cp210x
insmod ark3116

to have serial devices /dev/ttyUSB0 etc coming up and down on plugging / unplugging the adaptors.

I tried many things like edting /etc/modules.d/* , tweaking boot scripts, inserting sleep counts etc - nothing helped.
Until I relocated my modules to their genuine places in flash.

I would have been glad to have read on this issue e.g. on

I don't like to interfere in other people's writing.
But when I finished my test setup, i'll anyway collect my experience for my own purpose. I could share this, e.g. a recipe "setting up a experimental prototype box" here

What is the procedure to do that?
Are there any obligations afterwards, like answering complaints of people bricked their box?

In the long run, it would be nice to sequence the booting process so that mounting the stick is safely finished before further drivers are configured.

Attachments (0)

Change History (6)

comment:1 Changed 4 years ago by ddxx0n

That being said for low-level kernel drivers, I have been running my router for years now with this kind of setup (ar71xx wndr3700: basic boot system in flash, the rest on usb symlinked) and it works just fine - so your mileage might vary.

However, in addition I have disabled the usb stick in the luci fstab, but created a short rc script that mounts it the first thing after boot, so that might help.

comment:2 Changed 4 years ago by ddxx0n

Addition: I forgot to mention that I enabled the busybox modprobe stuff when compiling OpenWrt, so that might be useful, too. And you of course can root your usb stick/drive and circumvent the problem alltogether.

However, you might want to take this kind of discussion to the forums - I am sure they're happy to help you, just ask away.

comment:3 Changed 4 years ago by anonymous

I added a link to this ticket in those two wiki articles.

comment:4 Changed 4 years ago by ddxx0n

I've added two scripts (symlinking files like kernel modules on usb to root & sorting packages already installed on root/no installed/outdated) to the ticket

comment:5 Changed 3 years ago by nbd

  • Resolution set to worksforme
  • Status changed from new to closed

comment:6 Changed 2 years ago by jow

  • Milestone changed from Attitude Adjustment 12.09 to Barrier Breaker 14.07

Milestone Attitude Adjustment 12.09 deleted

Add Comment

Modify Ticket

as closed .
The resolution will be deleted. Next status will be 'reopened'.

E-mail address and user name can be saved in the Preferences.

Note: See TracTickets for help on using tickets.