[LEDE-DEV] modules-boot.d question and indeterminate drive # assignment

Philip Prindeville philipp_subx at redfish-solutions.com
Wed Apr 26 14:49:13 PDT 2017


Hi.

I’m seeing something weird…  I’ve been working on adding kexec/kdump support to LEDE, adding some scripts to make this turn-key, etc. and in the process I’ve uncovered something a little bizarre (and unsettling).

If I have a box (in this case an x86 box with a CompactFlash [CF]) drive and try to use a USB thumb-drive for capturing dumps (because the image on the CF is about 256MB, but the box needs 32GB or more for crashdumps)… then sometimes the CF is probed as /dev/sda and sometimes the USB thumb-drive is.

I was poking around the image trying to figure out the order in which modules are loaded (to see if I can force the modules to initialize in a deterministic order) and noticed a couple of things:

/etc/modules-boot.d/usb-storage isn’t prefixed with a priority about what order it loads in… so when does it get loaded?  Are all the drivers just sorted lexically, in which case it would load after just about everything else?

And when is the /etc/modules-boot.d/ directory read?  It doesn’t look like it gets read by any scripts that I can find… probably because it’s invoked even before scripting would be available.  Is that correct?

Anyone have any suggestions on how to impose determinism in how the ATA and USB drivers come up so that the ATA/CF card is always found (and registered) first?

Thanks,

-Philip




More information about the Lede-dev mailing list