Openwrt router can't use SD Card as overlay, block: extroot: cannot find device with UUID

Need help getting SD Card on USB dongle/modem to work as exroot storage

I install
opkg install block-mount kmod-fs-ext4 e2fsprogs fdisk kmod-usb-storage kmod-usb-uhci kmod-usb-net-cdc-ether usb-modeswitch

on TP-Link TL-MR3020_v3

and get the following on preinit stage of boot log (as per the troubleshooting exroot guidelines)

root@OpenWrt:~# block info; uci show fstab; logread | sed -n -e "/- preinit -/,/- init -/p"
/dev/mtdblock3: UUID="7c5eed31-ae17fbc8-caba8b62-e61e3dfd" VERSION="4.0" MOUNT="/rom" TYPE="squashfs"
/dev/mtdblock4: MOUNT="/overlay" TYPE="jffs2"
/dev/sda1: UUID="8e1fc956-98a9-4168-9977-fdb664ce0bfe" VERSION="1.0" TYPE="ext4"
fstab.@global[0]=global
fstab.@global[0].anon_swap='0'
fstab.@global[0].anon_mount='0'
fstab.@global[0].auto_swap='1'
fstab.@global[0].auto_mount='1'
fstab.@global[0].delay_root='5'
fstab.@global[0].check_fs='0'
fstab.rwm=mount
fstab.rwm.device='/dev/mtdblock4'
fstab.rwm.target='/rwm'
fstab.overlay=mount
fstab.overlay.uuid='8e1fc956-98a9-4168-9977-fdb664ce0bfe'
fstab.overlay.target='/overlay'
Fri Oct  7 23:28:11 2022 user.info kernel: [    2.764059] init: - preinit -
Fri Oct  7 23:28:11 2022 kern.notice kernel: [    3.993505] random: jshn: uninitialized urandom read (4 bytes read)
Fri Oct  7 23:28:11 2022 kern.notice kernel: [    4.109969] random: jshn: uninitialized urandom read (4 bytes read)
Fri Oct  7 23:28:11 2022 kern.notice kernel: [    4.215388] random: jshn: uninitialized urandom read (4 bytes read)
Fri Oct  7 23:28:11 2022 kern.info kernel: [    7.812908] usb 1-1: new high-speed USB device number 2 using ehci-platform
Fri Oct  7 23:28:11 2022 kern.notice kernel: [    9.275559] jffs2: notice: (422) jffs2_build_xattr_subsystem: complete building xattr subsystem, 35 of xdatum (29 unchecked, 4 orphan) and 54 of xref (10 dead, 0 orphan) found.
Fri Oct  7 23:28:11 2022 user.info kernel: [    9.298572] mount_root: loading kmods from internal overlay
Fri Oct  7 23:28:11 2022 user.info kernel: [    9.522419] kmodloader: loading kernel modules from /tmp/overlay/upper/etc/modules-boot.d/*
Fri Oct  7 23:28:11 2022 kern.notice kernel: [    9.895170] SCSI subsystem initialized
Fri Oct  7 23:28:11 2022 kern.info kernel: [    9.923086] ehci-pci: EHCI PCI platform driver
Fri Oct  7 23:28:11 2022 kern.info kernel: [    9.939342] uhci_hcd: USB Universal Host Controller Interface driver
Fri Oct  7 23:28:11 2022 kern.info kernel: [    9.948372] ohci-pci: OHCI PCI platform driver
Fri Oct  7 23:28:11 2022 kern.info kernel: [    9.976202] usb-storage 1-1:1.0: USB Mass Storage device detected
Fri Oct  7 23:28:11 2022 kern.info kernel: [    9.983108] usb-storage 1-1:1.0: Quirks match for vid 19d2 pid 1225: 1
Fri Oct  7 23:28:11 2022 kern.info kernel: [    9.990699] scsi host0: usb-storage 1-1:1.0
Fri Oct  7 23:28:11 2022 kern.info kernel: [    9.995779] usbcore: registered new interface driver usb-storage
Fri Oct  7 23:28:11 2022 user.info kernel: [   10.003658] kmodloader: done loading kernel modules from /tmp/overlay/upper/etc/modules-boot.d/*
Fri Oct  7 23:28:11 2022 user.info kernel: [   10.176976] block: attempting to load /tmp/jffs_cfg/upper/etc/config/fstab
Fri Oct  7 23:28:11 2022 user.info kernel: [   10.187610] block: extroot: device not present, retrying in 5 seconds
Fri Oct  7 23:28:11 2022 kern.notice kernel: [   11.063666] scsi 0:0:0:0: CD-ROM            DEMO     USB SCSI CD-ROM  2.31 PQ: 0 ANSI: 2
Fri Oct  7 23:28:11 2022 kern.info kernel: [   14.237251] usb 1-1: USB disconnect, device number 2
Fri Oct  7 23:28:11 2022 kern.info kernel: [   14.692915] usb 1-1: new high-speed USB device number 3 using ehci-platform
Fri Oct  7 23:28:11 2022 kern.info kernel: [   14.897487] usb-storage 1-1:1.2: USB Mass Storage device detected
Fri Oct  7 23:28:11 2022 kern.info kernel: [   14.906488] scsi host0: usb-storage 1-1:1.2
Fri Oct  7 23:28:11 2022 user.err kernel: [   15.301320] block: extroot: cannot find device with UUID 8e1fc956-98a9-4168-9977-fdb664ce0bfe
Fri Oct  7 23:28:11 2022 user.info kernel: [   15.311562] mount_root: switching to jffs2 overlay
Fri Oct  7 23:28:11 2022 kern.warn kernel: [   15.319958] overlayfs: upper fs does not support tmpfile.
Fri Oct  7 23:28:11 2022 user.warn kernel: [   15.375219] urandom-seed: Seeding with /etc/urandom.seed
Fri Oct  7 23:28:11 2022 user.info kernel: [   15.535235] procd: - early -
Fri Oct  7 23:28:11 2022 user.info kernel: [   15.538623] procd: - watchdog -
Fri Oct  7 23:28:11 2022 kern.notice kernel: [   16.023128] scsi 0:0:0:0: Direct-Access     DEMO MMC  Storage 2.31         PQ: 0 ANSI: 2
Fri Oct  7 23:28:11 2022 kern.warn kernel: [   16.045186] sd 0:0:0:0: Power-on or device reset occurred
Fri Oct  7 23:28:11 2022 kern.notice kernel: [   16.063988] sd 0:0:0:0: [sda] 124735488 512-byte logical blocks: (63.9 GB/59.5 GiB)
Fri Oct  7 23:28:11 2022 kern.notice kernel: [   16.150040] sd 0:0:0:0: [sda] Write Protect is off
Fri Oct  7 23:28:11 2022 kern.debug kernel: [   16.154982] sd 0:0:0:0: [sda] Mode Sense: 0f 00 00 00
Fri Oct  7 23:28:11 2022 kern.notice kernel: [   16.155852] sd 0:0:0:0: [sda] Write cache: enabled, read cache: enabled, doesn't support DPO or FUA
Fri Oct  7 23:28:11 2022 kern.info kernel: [   16.185517]  sda: sda1
Fri Oct  7 23:28:11 2022 kern.notice kernel: [   16.194629] sd 0:0:0:0: [sda] Attached SCSI removable disk
Fri Oct  7 23:28:11 2022 kern.notice kernel: [   16.318663] random: jshn: uninitialized urandom read (4 bytes read)
Fri Oct  7 23:28:11 2022 kern.notice kernel: [   16.638731] random: jshn: uninitialized urandom read (4 bytes read)
Fri Oct  7 23:28:11 2022 user.info kernel: [   16.690720] procd: - watchdog -
Fri Oct  7 23:28:11 2022 user.info kernel: [   16.698677] procd: - ubus -
Fri Oct  7 23:28:11 2022 kern.notice kernel: [   16.993179] random: ubusd: uninitialized urandom read (4 bytes read)
Fri Oct  7 23:28:11 2022 user.info kernel: [   17.034269] procd: - init -
root@OpenWrt:~# 

I've tried all the troubleshooting tips on

after following the steps to transfer to USB, none worked.

It's a ethernet ready dongle, no settings, nothing required. Plug and play, shows up as eth1, how to I utilize the SD Card on it, thanks.

Edit:
Edited my fstab
Increased the delay to 15 seconds
Option enabled to 1

config global
        option anon_swap '0'
        option anon_mount '0'
        option auto_swap '1'
        option auto_mount '1'
        option delay_root '15'
        option check_fs '0'

config mount
        option target '/mnt/sda1'
        option uuid '8e1fc956-98a9-4168-9977-fdb664ce0bfe'
        option enabled '1'

It now mounts df -h

root@OpenWrt:~# df -h
Filesystem                Size      Used Available Use% Mounted on
/dev/root                 3.8M      3.8M         0 100% /rom
tmpfs                    28.1M    268.0K     27.9M   1% /tmp
/dev/mtdblock4            2.0M      1.8M    220.0K  89% /overlay
overlayfs:/overlay        2.0M      1.8M    220.0K  89% /
tmpfs                   512.0K         0    512.0K   0% /dev
/dev/sda1                58.2G      3.9M     55.2G   0% /mnt/sda1

I don't know if I'll be able to help here, but does the dongle expose the SD card directly (plug-n-play style) if you connect the dongle directly to a regular computer (Mac, Win, Linux)?

If not, the dongle may either not expose the card at all, or may require a special driver to do so.

Can you clarify what exactly didn't work? Are you unable to mount the card? Does the card mount but you can't get extroot working? Can you post the output of cat /proc/partitions /proc/mounts ?

Also, I suggest using f2fs over ext4. It will perform better and reduce wear on the sd card.

Which USB modem/dongle are you talking about?
It might need a usb_modeswitch application before the USB drive pops up. On some devices, the mode can be configured to default to the required one, effectively eliminating the need for the mode switch.

It exposes the sdcard as a drive on my computer.

usb 1-1: USB disconnect, device number 6
[   36.512979] usb 1-1: new high-speed USB device number 7 using ehci-platform
[   36.739884] usb-storage 1-1:1.2: USB Mass Storage device detected
[   36.784840] scsi host0: usb-storage 1-1:1.2
[   37.864180] scsi 0:0:0:0: Direct-Access     DEMO MMC  Storage 2.31         PQ: 0 ANSI: 2
[   37.893826] sd 0:0:0:0: Power-on or device reset occurred
[   37.904731] sd 0:0:0:0: [sda] 124735488 512-byte logical blocks: (63.9 GB/59.5 GiB)
[   37.925706] sd 0:0:0:0: [sda] Write Protect is off
[   37.930643] sd 0:0:0:0: [sda] Mode Sense: 0f 00 00 00
[   37.943009] sd 0:0:0:0: [sda] Write cache: enabled, read cache: enabled, doesn't support DPO or FUA
[   37.984211]  sda: sda1

It shows up via openwrt as well.

The dongle is a chinese brand, I've written to the manufacturer, no response.

I tried sending AT commands, as per the exroot troubleshooting, there is no ttyUSB available, the dongle is unresponsive to it as it's a direct ethernet, there are no settings required to be set via openwrt.

AT and ttyUSB are not related to extroot -- those would be needed only for the other functions (i.e. the modem functions), if available on the device.

Where specifically have you gotten stuck?

I will change the filesystem once I get it to work.

Will post the output once I revert back and try, there is no space so I had to revert to my original settings to make the router usable at the moment.

All the troubleshooting didn't work, I tried one at a time.

On boot, the openwrt router fails to read the Sd card present on the USB dongle. That's where I am stuck, it doesn't show the additional space or the sd card

You said that it does show up -- is that only post-boot?

Is your sd card formatted as ext4?
Did you successfully run the extroot commands (that actually clone the main files over to the card)?
Did you run the fstab commands?

Were there any errors reported along the way?
What is the output of df -h

You said that it does show up -- is that only post-boot?

Yes, post boot it shows up, I tried the wait 15 seconds via the troubleshooting

Is your sd card formatted as ext4?

Yes ext4, I followed the steps

Did you successfully run the extroot commands (that actually clone the main files over to the card)?

Yes, at the last stage, after reboot, it does not show desired results

Did you run the fstab commands?

Yes, followed to the T

Were there any errors reported along the way?

No errors

What is the output of df -h

I will try now and revert, I moved back to my old settings to make internet usable

root@OpenWrt:~# df -h
Filesystem                Size      Used Available Use% Mounted on
/dev/root                 3.8M      3.8M         0 100% /rom
tmpfs                    28.1M     96.0K     28.0M   0% /tmp
/dev/mtdblock4            2.0M      1.8M    224.0K  89% /overlay
overlayfs:/overlay        2.0M      1.8M    224.0K  89% /
tmpfs                   512.0K         0    512.0K   0% /dev
root@OpenWrt:~# block info
/dev/mtdblock3: UUID="7c5eed31-ae17fbc8-caba8b62-e61e3dfd" VERSION="4.0" MOUNT="/rom" TYPE="squashfs"
/dev/mtdblock4: MOUNT="/overlay" TYPE="jffs2"
/dev/sda1: UUID="8e1fc956-98a9-4168-9977-fdb664ce0bfe" VERSION="1.0" TYPE="ext4"
root@OpenWrt:~#

I see your point, it isn't mounted as shown in df -h but shows up in block info

output of cat /proc/partitions /proc/mounts

root@OpenWrt:~# cat /proc/partitions /proc/mounts
major minor  #blocks  name

  31        0        128 mtdblock0
  31        1       7808 mtdblock1
  31        2       2144 mtdblock2
  31        3       5663 mtdblock3
  31        4       2048 mtdblock4
  31        5         64 mtdblock5
  31        6        192 mtdblock6
   8        0   62367744 sda
   8        1   62366703 sda1
/dev/root /rom squashfs ro,relatime 0 0
proc /proc proc rw,nosuid,nodev,noexec,noatime 0 0
sysfs /sys sysfs rw,nosuid,nodev,noexec,noatime 0 0
cgroup2 /sys/fs/cgroup cgroup2 rw,nosuid,nodev,noexec,relatime,nsdelegate 0 0
tmpfs /tmp tmpfs rw,nosuid,nodev,noatime 0 0
/dev/mtdblock4 /overlay jffs2 rw,noatime 0 0
overlayfs:/overlay / overlay rw,noatime,lowerdir=/,upperdir=/overlay/upper,workdir=/overlay/work 0 0
tmpfs /dev tmpfs rw,nosuid,noexec,noatime,size=512k,mode=755 0 0
devpts /dev/pts devpts rw,nosuid,noexec,noatime,mode=600,ptmxmode=000 0 0
debugfs /sys/kernel/debug debugfs rw,noatime 0 0
none /sys/fs/bpf bpf rw,nosuid,nodev,noexec,noatime,mode=700 0 0
root@OpenWrt:~#

Does it successfully mount if you mount it manually?
What do you see in the /etc/config/fstab file?

I just edited the fstab and I now see it on boot!

config global
        option anon_swap '0'
        option anon_mount '0'
        option auto_swap '1'
        option auto_mount '1'
        option delay_root '15'
        option check_fs '0'

config mount
        option target '/mnt/sda1'
        option uuid '8e1fc956-98a9-4168-9977-fdb664ce0bfe'
        option enabled '1'

earlier option enabled was 0
and
delay root was 5
I changed those ...

Tried following the exroot instructions but now says

root@OpenWrt:~# mkfs.ext4 ${DEVICE}
mke2fs 1.46.5 (30-Dec-2021)
/dev/sda1 is mounted; will not make a filesystem here!

I guess I'll have to unmount to format and make the transition of overlay

The logs show the device is resetting itself disconnecting and reconnecting every few seconds. That is not going to be usable. Make sure the power supply to the router is adequate. The power from the micro-USB input goes directly to the USB host port. Don't use a cheap phone charger for power.

1 Like

Thanks, I was using a power bank to power the router to account for power outages, still no joy though.
Have moved to a direct phone charger now.

Thank you.

I remember reading the notes for the router, slipped my mind. (https://openwrt.org/toh/tp-link/tl-mr3020_v3)

This specific TP-Link router requires a usb 1.1 powered hub for any additional power, like reading a sd card, I suppose. I did try multiple chargers and cords before I remembered and went back to read the notes.

Thank you though! Appreciate it!

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