[Solved] ZBT-WG3526 sd card slot problem

(poor - english sorry)

When mounting 'normal way' it is working.

When using as 'extroot'

  • first time (after formatting sd) work ok
  • after first reboot in dmesg i get ' extroot: UUID mismatch (root: some_uid /overlay: random_binary_data)' and sd is not used

Checked that several times - always same, maybe sometimes it hangs while booting.
Checked that with USB sd card reader and same card - everything work ok.
Checked other sd card - same.
On SD there is created file .extroot_uuid with same random data from dmesg.
After changing file content to wrong uuid i get dmesg message with that wrong uuid, but if i change it to proper uuid i get same message but with malformed uuid...
It was with ext4.
With f2fs there i get no dmesg error - every time mount /overlay is ok, but filesystem is some way malformed.
Every reboot data are moved to new dir without name so last written config is not readed.

I'm using own builds (last snapshot and last stable) with extra (nilfs2) module but as i understand it should be not loaded when testing that (not installed). I can test it again with stable oficial builds if it is really possible.

Any idea what more can i check?
I found message from dmesg in
build_dir/target-mipsel_24kc_musl/fstools-2017-02-11-7d78836d/block.c:1256 but i think reason is else where. Mtk_sd.ko??

What's the contents of both "fstab" files (the one in the router's memory and the one in the SD card)?

One of configs i tried:

 root@LEDE:/# cat /etc/config/fstab
 config 'global'
         option  anon_swap       '0'
         option  anon_mount      '0'
         option  auto_swap       '1'
         option  auto_mount      '1'
         option  delay_root      '5'
         option  check_fs        '0'
 config 'mount'
         option  target  '/overlay'
         option  device  '/dev/mmcblk0p1'
 #       option  uuid    'fef89252-995f-45b5-bec7-253d2546a48b'
         option  enabled '1'
 #not important, tested before without that
 config 'mount'
         option  target  '/mnt/sda1'
         option  uuid    '24ba910c-88ba-4f7c-a6fa-2767ee4c4ab9'
         option  enabled '1'
 config 'mount'
         option  target  '/mnt/sda2'
         option  uuid    '834b74af-aed2-486a-955e-a34d282b2ce1'
         option  enabled '1'

 config 'mount'
         option  target  '/mnt/sda3'
         option  uuid    'c7fda4cd-ee83-4957-8c6a-dd8172553441'
         option  enabled '1'

 root@LEDE:/# cat /etc/fstab
 # <file system> <mount point> <type> <options> <dump> <pass>
 root@LEDE:/#

 Fist boot:

 Press the [1], [2], [3] or [4] key and hit [enter] to select the debug level
 [   12.260000] jffs2: notice: (488) jffs2_build_xattr_subsystem: complete building xattr subsystem, 0 of xdatum (0 unchecked, 0 orphan) and 0 of xref (0 dead, 0 orphan) found.
 [   12.280000] mount_root: loading kmods from internal overlay
 [   12.300000] kmodloader: loading kernel modules from /tmp/overlay/upper/etc/modules-boot.d/*
 [   12.310000] kmodloader: done loading kernel modules from /tmp/overlay/upper/etc/modules-boot.d/*
 [   12.600000] block: attempting to load /tmp/jffs_cfg/upper/etc/config/fstab
 [   12.620000] EXT4-fs (mmcblk0p1): mounted filesystem with ordered data mode. Opts:
 [   12.740000] mount_root: switched to extroot
 [   12.740000] urandom-seed: Seed file not found (/etc/urandom.seed)

 Second boot:

 Press the [1], [2], [3] or [4] key and hit [enter] to select the debug level
 [   12.170000] jffs2: notice: (487) jffs2_build_xattr_subsystem: complete building xattr subsystem, 0 of xdatum (0 unchecked, 0 orphan) and 0 of xref (0 dead, 0 orphan) found.
 [   12.200000] mount_root: loading kmods from internal overlay
 [   12.220000] kmodloader: loading kernel modules from /tmp/overlay/upper/etc/modules-boot.d/*
 [   12.230000] kmodloader: done loading kernel modules from /tmp/overlay/upper/etc/modules-boot.d/*
 [   12.530000] block: attempting to load /tmp/jffs_cfg/upper/etc/config/fstab
 [   12.730000] EXT4-fs (mmcblk0p1): recovery complete
 [   12.780000] EXT4-fs (mmcblk0p1): mounted filesystem with ordered data mode. Opts:
 [   12.790000] block: extroot: UUID mismatch (root: fe33e976-64679013-90a55436-eedade12, overlay: @<@)
 PuTTY[   13.020000] mount_root: switching to jffs2 overlay

 Next:

 Press the [1], [2], [3] or [4] key and hit [enter] to select the debug level
 [   12.180000] jffs2: notice: (488) jffs2_build_xattr_subsystem: complete building xattr subsystem, 0 of xdatum (0 unchecked, 0 orphan) and 0 of xref (0 dead, 0 orphan) found.
 [   12.210000] mount_root: loading kmods from internal overlay
 [   12.230000] kmodloader: loading kernel modules from /tmp/overlay/upper/etc/modules-boot.d/*
 [   12.240000] kmodloader: done loading kernel modules from /tmp/overlay/upper/etc/modules-boot.d/*
 [   12.570000] block: attempting to load /tmp/jffs_cfg/upper/etc/config/fstab
 [   12.580000] EXT4-fs (mmcblk0p1): mounted filesystem with ordered data mode. Opts:
 [   12.590000] block: extroot: UUID mismatch (root: fe33e976-64679013-90a55436-eedade12, overlay: ~▒u▒▒<=կ▒▒͆▒▒▒▒M▒E▒▒▒▒޾▒wC)
 [   12.790000] mount_root: switching to jffs2 overlay
 [   12.810000] urandom-seed: Seeding with /etc/urandom.seed

I get it working with SD over USB and i don't understand difference, only device file is another.
Never touched /etc/fstab .
SD was empty.

mtk_sd module look strange.
I can uload it while it is used and it cause unmount.
In lsmod output there is some number and it is always 0, in usb_storage module when i mount device it is incremented.

Example of unloading used module:

root@LEDE:~# lsmod |grep mtk_sd
mmc_core 73680 3 mmc_block,sdhci,mtk_sd
mtk_sd 18352 0
root@LEDE:~# mount /dev/mmcblk0p1 /mnt/
mmcblk0p1/ sda1/ sda2/ sda3/
root@LEDE:~# mount /dev/mmcblk0p1 /mnt/mmcblk0p1/
root@LEDE:~# lsmod |grep mtk_sd
mmc_core 73680 3 mmc_block,sdhci,mtk_sd
mtk_sd 18352 0
root@LEDE:~# ls /mnt/mmcblk0p1/
etc lost+found upper work
root@LEDE:~# rmmod mtk_sd
root@LEDE:~# ls /mnt/mmcblk0p1/
root@LEDE:~#

Example of other module that block unloading:

root@LEDE:~# lsmod |grep usb_storage
scsi_mod 81616 3 usb_storage,libata,sd_mod
usb_storage 37024 0
usbcore 114864 6 ledtrig_usbport,usb_storage,xhci_mtk,xhci_plat_hcd,xhci_pci,xhci_hcd
root@LEDE:~# mount /dev/sdb1 /mnt/mmcblk0p1/
root@LEDE:~# lsmod |grep usb_storage
scsi_mod 81616 3 usb_storage,libata,sd_mod
usb_storage 37024 1
usbcore 114864 6 ledtrig_usbport,usb_storage,xhci_mtk,xhci_plat_hcd,xhci_pci,xhci_hcd
root@LEDE:~# rmmod usb_storage
unloading the module failed
root@LEDE:~# umount /mnt/mmcblk0p1/
root@LEDE:~# rmmod usb_storage
root@LEDE:~#

Can it be reason that mtk_sd is wrong?
Information that anybody have working SD card mounted on boot as /overlay with WG3526 will be helpful.

Hi,Sir

I am Irene from ZBT, do you have solved the SD card slot problem ? If not, i think I can help you .

We have firmware which supports SD card slot . By the way, who sell you this product ?

Best regards
Irene
skype: zbt-sales02

Solved not but worked around with USB hub.
Why mentioned firmware is not in LEDE repository? (or where to found it)
Or what more can I know about solution?
I like to use some extra module and LEDE is up to date so I like to use it.
Problem is not 'mission critical' just home router i want to configure proper.
Router is from one of ali... websites, why is it intresting?

Because i want to know if you buy it directly from our company . If so , i can ask the seller to give you technical supports.

Actually , our firmware(openwrt) supports SD card . Are you interested in it ? If yes, you can contact me via email, sales02@zbt-china.com

Still no solution.
One more thing I don't understand is when I set mkt_sd module in menuconfig as built-in I'm still able to load/unload it.

It is working with latest snapshot.

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