Reliably detecting USB2 disk at boot

I have OpenWrt 18.06.2 (sysupgraded from 18.06.1) on a Linksys WRT1200AC device that has an USB2 powered external drive connected to it.

After boot, sometimes that drive is not recognized... it does not even show up in the kernel log messages. Whenever this happens, physically disconnecting and reconnecting the USB cable solves the problem, so I suspect a time issue (i.e. the router is ready before the hard drive).

Is there something I can do to improve the situation? I tried to remove and readd the USB kernel modules but it seems now everything is built in so this cannot be done. I'm also open to workarounds, such as adding a delay to the boot process or do a later "rescan" of the USB devices (no idea on how to do both of them).

If the HDD can be powered externally as well, trying that (or a powered hub) might be worth testing, consider that both the router and your HDD need relatively high start up power (and magnetic HDDs are stretching the USB 2.0 specs in regards to the power draw anyways).


Not sure this would solve the issue because everything is connected to a single power source (and I want that to stay this way). It is worth a try though as I already have some powered USB hub hanging around.

Thanks for the suggestion: I let you know if something changes.

I agree that it sounds like a power problem. There is a usbreset package, as last resort.


Thank you @jeff: usbreset is exactly what I had in mind when talking about a later rescan.

1 Like

Unfortunately usbreset is useless for this kind of problems: it requires a device number, a vendor id or a product name and in my case I don't have any of them because the kernel did not detect the device.

I just interposed a powered HUB: let's see if the problem shows up again.

Since I have added a powered hub the disk has been detected properly: actually it seems the power was the culprit.

1 Like

This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.