Using usb-storage with extroot

Hi,

Currently using crucial X6 disk with extroot, connected to the router, that has some problems with UAS driver (usb 2-1: cmd cmplt err -71, uas_eh_abort_handler). Even with these errors, it manages to load the exroot and used the overlay on the disk, but it's really slow and with interruptions.
So, I've tried to use driver usb-storage with quirks and I can use my disk with it, but not on the boot and it defaults to the internal overlay. I see this on the logs:

[    4.735746] kmodloader: loading kernel modules from /etc/modules-boot.d/*
[    4.751948] usbcore: registered new interface driver usbfs
[    4.757493] usbcore: registered new interface driver hub
[    4.762821] usbcore: registered new device driver usb
[    4.768627] gpio_button_hotplug: loading out-of-tree module taints kernel.
[    4.780808] xhci-mtk 11200000.usb: xHCI Host Controller
[    4.786044] xhci-mtk 11200000.usb: new USB bus registered, assigned bus number 1
[    4.796433] xhci-mtk 11200000.usb: hcc params 0x01403f99 hci version 0x110 quirks 0x0000000000200010
[    4.805584] xhci-mtk 11200000.usb: irq 125, io mem 0x11200000
[    4.811427] xhci-mtk 11200000.usb: xHCI Host Controller
[    4.816639] xhci-mtk 11200000.usb: new USB bus registered, assigned bus number 2
[    4.824023] xhci-mtk 11200000.usb: Host supports USB 3.2 Enhanced SuperSpeed
[    4.831386] hub 1-0:1.0: USB hub found
[    4.835140] hub 1-0:1.0: 2 ports detected
[    4.839379] usb usb2: We don't know the algorithms for LPM for this host, disabling LPM.
[    4.847696] hub 2-0:1.0: USB hub found
[    4.851445] hub 2-0:1.0: 1 port detected
[    4.929380] usbcore: registered new interface driver usb-storage
[    4.935581] kmodloader: done loading kernel modules from /etc/modules-boot.d/*
[    4.943528] init: - preinit -
[    5.141899] mtk_soc_eth 15100000.ethernet wan: renamed from eth1
[    5.156153] mtk_soc_eth 15100000.ethernet eth0: configuring for fixed/2500base-x link mode
[    5.164637] mtk_soc_eth 15100000.ethernet eth0: Link is Up - 2.5Gbps/Full - flow control rx/tx
[    5.185880] mt7530-mdio mdio-bus:1f lan1: configuring for phy/2500base-x link mode
[    6.017376] usb 2-1: new SuperSpeed USB device number 2 using xhci-mtk
[    7.269837] mt7530-mdio mdio-bus:1f lan1: Link is Up - 100Mbps/Full - flow control off
[    9.495691] mount_root: loading kmods from internal overlay
[    9.507067] kmodloader: loading kernel modules from //etc/modules-boot.d/*
[    9.514576] kmodloader: done loading kernel modules from //etc/modules-boot.d/*
[    9.656625] block: attempting to load /tmp/overlay/upper/etc/config/fstab
[    9.664558] block: unable to load configuration (fstab: Entry not found)
[    9.671310] block: attempting to load /tmp/overlay/etc/config/fstab
[    9.677674] block: unable to load configuration (fstab: Entry not found)
[    9.684381] block: attempting to load /etc/config/fstab
[    9.692037] block: unable to load configuration (fstab: Entry not found)
[    9.698774] block: no usable configuration
[    9.704871] UBIFS (ubi0:3): Mounting in unauthenticated mode
[    9.710647] UBIFS (ubi0:3): background thread "ubifs_bgt0_3" started, PID 857
[    9.747388] UBIFS (ubi0:3): recovery needed
[    9.846403] UBIFS (ubi0:3): recovery completed
[    9.850914] UBIFS (ubi0:3): UBIFS: mounted UBI device 0, volume 3, name "rootfs_data"
[    9.858730] UBIFS (ubi0:3): LEB size: 253952 bytes (248 KiB), min./max. I/O unit sizes: 4096 bytes/4096 bytes
[    9.868625] UBIFS (ubi0:3): FS size: 39616512 bytes (37 MiB, 156 LEBs), max 166 LEBs, journal size 2031617 bytes (1 MiB, 8 LEBs)
[    9.880166] UBIFS (ubi0:3): reserved for root: 1871185 bytes (1827 KiB)
[    9.886763] UBIFS (ubi0:3): media format: w5/r0 (latest is w5/r0), UUID 1153DBF2-1E99-4AA8-AC57-7328748B3578, small LPT model
[    9.899742] block: attempting to load /tmp/ubifs_cfg/upper/etc/config/fstab
[    9.912168] block: extroot: device not present, retrying in 15 seconds
[   25.002947] block: extroot: cannot find device with UUID 122c29c3-0b94-4dc8-a96f-ac73c9fa0bb4

I'm sure I'm missing something pretty obvious but still dont understand much of this, been reading and using AI to move forward.

Thanks!

Edit: after the boot, I end up with this:

root@OpenWrt:~# lsusb -t
/: Bus 001.Port 001: Dev 001, Class=root_hub, Driver=xhci-mtk/2p, 480M
/: Bus 002.Port 001: Dev 001, Class=root_hub, Driver=xhci-mtk/1p, 20000M/x2
|__ Port 001: Dev 002, If 0, Class=[unknown], Driver=[none], 5000M/x2
root@OpenWrt:~#

But I can see the quirk:
root@OpenWrt:~# cat /etc/modules.d/54-usb-storage
usb-storage quirks=0634:5602:u
root@OpenWrt:~#

Are you sure the disk is usable after booting with internal overlay?

not imediately, I have to load the driver manually:

root@OpenWrt:~# echo "0634:5602:u" > /sys/module/usb_storage/parameters/quirks
root@OpenWrt:~# echo 0 > /sys/bus/usb/devices/2-1/authorized
root@OpenWrt:~# echo 1 > /sys/bus/usb/devices/2-1/authorized
root@OpenWrt:~# lsusb -t
/:  Bus 001.Port 001: Dev 001, Class=root_hub, Driver=xhci-mtk/2p, 480M
/:  Bus 002.Port 001: Dev 001, Class=root_hub, Driver=xhci-mtk/1p, 20000M/x2
    |__ Port 001: Dev 002, If 0, Class=[unknown], Driver=usb-storage, 5000M/x2
root@OpenWrt:~#

what bugs me is that with UAS, he can initiate the disk during boot and the subsequent external overlay (just very slow because of the errors from UAS), but cant seem to do it with usb-storage

If you're not using the UAS driver for anything else, can you try uninstalling kmod-usb-storage-uas and install kmod-usb-storage instead?

You were told this in your old thread too.

just did it, but with the same result:

[    4.416202] init: Console is alive
[    4.419731] init: - watchdog -
[    4.688045] kmodloader: loading kernel modules from /etc/modules-boot.d/*
[    4.704313] usbcore: registered new interface driver usbfs
[    4.709876] usbcore: registered new interface driver hub
[    4.715208] usbcore: registered new device driver usb
[    4.720975] gpio_button_hotplug: loading out-of-tree module taints kernel.
[    4.733109] xhci-mtk 11200000.usb: xHCI Host Controller
[    4.738360] xhci-mtk 11200000.usb: new USB bus registered, assigned bus number 1
[    4.748714] xhci-mtk 11200000.usb: hcc params 0x01403f99 hci version 0x110 quirks 0x0000000000200010
[    4.757868] xhci-mtk 11200000.usb: irq 125, io mem 0x11200000
[    4.763686] xhci-mtk 11200000.usb: xHCI Host Controller
[    4.768903] xhci-mtk 11200000.usb: new USB bus registered, assigned bus number 2
[    4.776280] xhci-mtk 11200000.usb: Host supports USB 3.2 Enhanced SuperSpeed
[    4.783718] hub 1-0:1.0: USB hub found
[    4.787483] hub 1-0:1.0: 2 ports detected
[    4.791718] usb usb2: We don't know the algorithms for LPM for this host, disabling LPM.
[    4.800027] hub 2-0:1.0: USB hub found
[    4.803778] hub 2-0:1.0: 1 port detected
[    4.859554] usbcore: registered new interface driver usb-storage
[    4.865755] kmodloader: done loading kernel modules from /etc/modules-boot.d/*
[    4.876464] init: - preinit -
[    5.074639] mtk_soc_eth 15100000.ethernet wan: renamed from eth1
[    5.088947] mtk_soc_eth 15100000.ethernet eth0: configuring for fixed/2500base-x link mode
[    5.097400] mtk_soc_eth 15100000.ethernet eth0: Link is Up - 2.5Gbps/Full - flow control rx/tx
[    5.118681] mt7530-mdio mdio-bus:1f lan1: configuring for phy/2500base-x link mode
[    5.977489] usb 2-1: new SuperSpeed USB device number 2 using xhci-mtk
[    7.179955] mt7530-mdio mdio-bus:1f lan1: Link is Up - 100Mbps/Full - flow control off
[    9.385856] mount_root: loading kmods from internal overlay
[    9.397129] kmodloader: loading kernel modules from //etc/modules-boot.d/*
[    9.404659] kmodloader: done loading kernel modules from //etc/modules-boot.d/*
[    9.545192] block: attempting to load /tmp/overlay/upper/etc/config/fstab
[    9.553171] block: unable to load configuration (fstab: Entry not found)
[    9.559916] block: attempting to load /tmp/overlay/etc/config/fstab
[    9.566207] block: unable to load configuration (fstab: Entry not found)
[    9.572924] block: attempting to load /etc/config/fstab
[    9.580654] block: unable to load configuration (fstab: Entry not found)
[    9.587378] block: no usable configuration
[    9.593491] UBIFS (ubi0:3): Mounting in unauthenticated mode
[    9.599247] UBIFS (ubi0:3): background thread "ubifs_bgt0_3" started, PID 858
[    9.635463] UBIFS (ubi0:3): recovery needed
[    9.731280] UBIFS (ubi0:3): recovery completed
[    9.735777] UBIFS (ubi0:3): UBIFS: mounted UBI device 0, volume 3, name "rootfs_data"
[    9.743596] UBIFS (ubi0:3): LEB size: 253952 bytes (248 KiB), min./max. I/O unit sizes: 4096 bytes/4096 bytes
[    9.753493] UBIFS (ubi0:3): FS size: 39616512 bytes (37 MiB, 156 LEBs), max 166 LEBs, journal size 2031617 bytes (1 MiB, 8 LEBs)
[    9.765037] UBIFS (ubi0:3): reserved for root: 1871185 bytes (1827 KiB)
[    9.771637] UBIFS (ubi0:3): media format: w5/r0 (latest is w5/r0), UUID 1153DBF2-1E99-4AA8-AC57-7328748B3578, small LPT model
[    9.784902] block: attempting to load /tmp/ubifs_cfg/upper/etc/config/fstab
[    9.797380] block: extroot: device not present, retrying in 15 seconds
[   24.886313] block: extroot: cannot find device with UUID 122c29c3-0b94-4dc8-a96f-ac73c9fa0bb4

and I have the quirk:
root@OpenWrt:~# cat /etc/modules.d/usb-storage
usb-storage quirks=0634:5602:u

@frollic - I know and it was working, the attended sysupgrade to 25.12.1 messed this up. After the upgrade, couldn't anymore load the external overlay with usb-storage. Really not sure what I did different the first time, tried everything already! I just tried with UAS again, to check if I could retrace all my steps

Thanks for bearing with me

Honestly, I have little knowledge about how usb-storage quirks should work with modules.d, but you don't need the quirks anymore now that you don't have the UAS driver. Try removing that file?

EDIT: The /etc/modules.d/usb-storage file, just to clarify.

ok, just did a fresh flash, reinstalled everything and it's working fine, with external overlay on the disk. Not sure what happened during the upgrade, but something went wrong

Thank you both for the help, really appreciated!

1 Like