MT300A SD card issues

I recently updated from 2.264 to 3.026. The new web interface is much better than before! But one thing that isn’t quite working for me anymore is the SD card. Other devices can see a folder named ‘data’ when access the network, work upon trying to open ‘data’, I get a message that the network name can’t be found. Plugging in a USB works perfectly fine.

When I ssh into the router and do ‘df’ I get the following:

Filesystem           1K-blocks      Used Available Use% Mounted on
/dev/root                10496     10496         0 100% /rom
tmpfs                    62504       696     61808   1% /tmp
/dev/mtdblock6            3968       860      3108  22% /overlay
overlayfs:/overlay        3968       860      3108  22% /
tmpfs                      512         0       512   0% /dev
/dev/mmcblk0p1        15650812     23800  15627012   0% /mnt/SD

So I would be expecting the SD card contents to show up in a folder called ‘SD’
As for system logs, I assume the relevant bits are:

Mon Aug 19 12:19:54 2019 kern.info kernel: [ 7.877535] mmc0: new high speed SDHC card at address 0007
Mon Aug 19 12:19:54 2019 kern.info kernel: [ 7.887547] mmcblk0: mmc0:0007 2&DRP 14.9 GiB
Mon Aug 19 12:19:54 2019 kern.info kernel: [ 7.900718] mmcblk0: p1
Mon Aug 19 12:20:05 2019 daemon.notice ntfs-3g[1473]: Mounted /dev/mmcblk0p1 (Read-Write, label “SD”, NTFS 1.2)
Mon Aug 19 12:20:05 2019 daemon.notice ntfs-3g[1473]: Cmdline options: utf8
Mon Aug 19 12:20:05 2019 daemon.notice ntfs-3g[1473]: Mount options: utf8,allow_other,nonempty,relatime,fsname=/dev/mmcblk0p1,blkdev,blksize=4096
Mon Aug 19 12:20:05 2019 daemon.notice ntfs-3g[1473]: Ownership and permissions disabled, configuration type 1

(I tried posting the whole log but it went over the character count; if necessary I will post the entire log in the comments)

Also, there is an empty folder in /mnt called ‘data’, which I assume is related to the folder my devices are seeing. Any ideas as to why the SD card can’t been seen/ accessed? The SD card is formatted as NTFS.

Also, was the 2.264 firmware taken down for the MT300A? I cannot seem to find it at https://dl.gl-inet.com/firmware/mt300a/v1/

can you get the content of /etc/config/samba

Here are the contents:

config samba
option workgroup ‘WORKGROUP’
option homes ‘1’
option name ‘GL-MT300A’
option description ‘GL-MT300A-5a3’
option interface ‘loopback lan wan’

config sambashare
option name ‘data’
option path ‘/data’
option read_only ‘no’
option guest_ok ‘yes’

Can you check what is the real folder of the SD card using

mount

If it is /mnt/SD pls change /mnt/data to /mnt/SD

Then restart

So I tried/changed a few things and it’s almost working? I think
mount currently gives me this:

/dev/root on /rom type squashfs (ro,relatime)
proc on /proc type proc (rw,nosuid,nodev,noexec,noatime)
sysfs on /sys type sysfs (rw,nosuid,nodev,noexec,noatime)
tmpfs on /tmp type tmpfs (rw,nosuid,nodev,noatime)
/dev/mtdblock6 on /overlay type jffs2 (rw,noatime)
overlayfs:/overlay on / type overlay (rw,noatime,lowerdir=/,upperdir=/overlay/upper,workdir=/overlay/work)
tmpfs on /dev type tmpfs (rw,nosuid,relatime,size=512k,mode=755)
devpts on /dev/pts type devpts (rw,nosuid,noexec,relatime,mode=600,ptmxmode=000)
debugfs on /sys/kernel/debug type debugfs (rw,noatime)
/dev/mmcblk0p1 on /mnt/sd type fuseblk (rw,relatime,user_id=0,group_id=0,allow_other,blksize=4096)
(I changed SD to lowercase)

So the SD card is mounting in /mnt/sd
but /etc/config/samba is currently:

config samba
option workgroup ‘WORKGROUP’
option homes ‘1’
option name ‘GL-MT300A’
option description ‘GL-MT300A-5a3’
option interface ‘loopback lan wan’

config sambashare
option name ‘data’
option path ‘/data’
option read_only ‘no’
option guest_ok ‘yes’

I added

config sambashare
option name ‘sd’
option path ‘/mnt/sd’
option read_only ‘no’
option guest_ok ‘yes’
to /etc/config/samba. and

[sd]
path = /mnt/sd
read only = no
guest ok = yes

to /etc/samba/sm.conf and /var/etc/smb.conf. I don’t know if those are necessary, but even after a restart I can still access the sd card on other devices.
…Until I plug in an USB. Then all my entries disappear and I stop seeing the sd card on my other devices. I assume the steps above are supposed to be done automatically for it to work; when I remove the sd card, the ‘data’ samabashare disappears so I’m guessing it does it work, but only for ‘data’ instead.

So as a work around, I created a folder, /data, and just made a symbolic link between /data and /mnt/sd and called it a day. I works even after a reboot, and even after plugging in a USB.

I do want to find out what the correct procedure was supposed to be, but after hours of troubleshooting I think I’m okay with calling this ‘good enough’

The problem may be caused that you upgrade and the router kept the original mount options.

So if you reset (revert) the firmware and start over this may be fixed.

Do you know where I can find the 2.264 firmware? I tried already the ‘revert firmware’ option in the web ui, but instead of downgrading to 2.264, it stayed at 3.026 and reset everything. And I also don’t see a link for openwrt-mt300a-2.264.bin anymore at GL.iNet download center; it seems to be missing.

We had fixed the security vulnerabilities based on v2.264.

Please download the v2.265 from GL.iNet download center

Thanks for your feedback. We had fixed the bug in v3.027-0822. You can download the testing firmware from GL.iNet download center

Thanks for the help. I’m still getting a similar issue on v3.027-0822, and I like the UI on v3 enough that I’m not sure I’d like to dowgrade back down to v2.265.

Anyways, for anyone who has the same sd card problem I have, this is what I did in detail to resolve it (on v3.027-0822):

  1. Open a terminal and SSH into your MT300A: generally, unless you changed some settings, the default command will be

    ssh -p 22 root@192.168.8.1

  2. Enter password

  3. Create a symbolic link between ‘/data’ (which shouldn’t exist atm, if it does delete it) and whatever directory your sd card mounts to. In my experience, by default the sd card was mounted to /mnt/sd, where ‘sd’ was the label of card, so it’ll likely change depending on your label

    ln -s /mnt/$label /data

    (replace $label with the name of the label of your sd card)

And then you should be able to access sd card contents normally.