What's new

Auto mounting internal microSD card of the RT-N66U ?

jenom

Occasional Visitor
I have a good-old RT-N66U with Asuswrt, amtm+Entware installed on a 1 GB USB drive.
Added a 2 GB micro SD card into the INTERNAL slot, but it is not detected on main page as USB device, and of course does not exist in any Media Services & Servers.
Manually added as /dev/sdb1, formatted and mounted on /opt/media.
My plan is to use it as a mp3/m4a storage and music server with minidlna.
Edited /etc/minidlna.conf and changed db_dir to /opt/media/ location and restarted minidlna .....It worked!
However, this will get lost, when router reboots.
I would like to get this microSD card automatically detected & mounted, and maybe Media Services & Servers would find it .
Any suggestions? Thanks!
 
I wouldn't use /opt/media as a mount point if I were you. That would clash with Entware which is uses /opt. I would use the router's "normal" mount naming convention, like /tmp/mnt/media (where media is the volume label of the SD card).

Have a look through the router's syslog during boot up to see at what point the internal flash drive is detected. From what I remember, once the SD card has been formatted correctly it should be automatically mounted at boot time.
 
Last edited:
If I remember the internal card needs an EXT2 or EXT3 format.
 
attached a serial connection to check what is happening
both sda and sdb detected by "hotplug"

check_action 0
set_action 7
sd 0:0:0:0: [sda] Assuming drive cache: write through
sd 0:0:0:0: [sda] Assuming drive cache: write through
block hotplug INTERFACE=8/0/0 ACTION=add USBPORT=1-1.1 HOST=(null) DEVICE=sda
check_action 7
block hotplug INTERFACE=8/0/0 ACTION=add USBPORT=1-1.1 HOST=(null) DEVICE=sda1
check_action 7
block hotplug INTERFACE=8/0/0 ACTION=add USBPORT=1-1.1 HOST=(null) DEVICE=sda2
check_action 7
set_action 0
sd 1:0:0:0: [sdb] Assuming drive cache: write through
sd 1:0:0:0: [sdb] Assuming drive cache: write through


Next is the existing sda1 USB with ENTWARE gets mounted:

[310 hotplug:hotplug_usb +12] mount to dev: /dev/sda1
generate_wl_para(0x1010): unit 1EXT2-fs warning: mounting unchecked fs, running e2fsck is recommended
subunit -1
[310 hotplug:mount_r +13] USB ext2 fs at /dev/sda1 mounted on /tmp/mnt/ENTWARE.
num_of_mssid_support(0x0096): [mssid] support [3] mssid


There is no USB memory in second USB, so nothing gets mounted:

[310 hotplug:hotplug_usb +23] end of mount
[319 hotplug:hotplug_usb +23] mount to dev: /dev/sda2
[319 hotplug:mount_r +23] USB /dev/sda2(unknown) failed to mount at the first try!
[319 hotplug:mount_r +23] give it another try - guess fs.
[319 hotplug:hotplug_usb +23] end of mount


However, "hotplug" does not try to mount internal microSD card located on /dev/sdb !
 
And how about the idea, not to start any media server in GUI, and just install minidlna (maybe mediatomb) in Entware....so it would keep it's settings on reboot?
 

Support SNBForums w/ Amazon

If you'd like to support SNBForums, just use this link and buy anything on Amazon. Thanks!

Sign Up For SNBForums Daily Digest

Get an update of what's new every day delivered to your mailbox. Sign up here!
Back
Top