What's new

How to mount a remote samba/cifs filesystem in asuswrt-merlin

  • SNBForums Code of Conduct

    SNBForums is a community for everyone, no matter what their level of experience.

    Please be tolerant and patient of others, especially newcomers. We are all here to share and learn!

    The rules are simple: Be patient, be nice, be helpful or be gone!

elrengo

Regular Contributor
Hi! I would like to mount a two samba share from my WDLXTVLIVE. Because I have connected the WDLXTVLIVE to router to ethernet. To copy the data donloaded by transmission from router more stable than wifi.

I looking for it in intenet I found that syntaxis:

mount \\\\192.168.1.30\\My_Book /cifs1 -t cifs -o "username=elrengo,password=xxxxx"

This mount but I do not where is the mount point:

elrengo@RT-AC3100:/tmp/mnt# mount
rootfs on / type rootfs (rw)
/dev/root on / type squashfs (ro,relatime)
devtmpfs on /dev type devtmpfs (rw,relatime,size=257528k,nr_inodes=64382,mode=755)
proc on /proc type proc (rw,relatime)
tmpfs on /tmp type tmpfs (rw,relatime)
sysfs on /sys type sysfs (rw,relatime)
devpts on /dev/pts type devpts (rw,relatime,mode=600)
/dev/mtdblock4 on /jffs type jffs2 (rw,noatime)
usbfs on /proc/bus/usb type usbfs (rw,relatime)
/dev/sda2 on /tmp/mnt/sda2 type ext4 (rw,nodev,relatime,user_xattr,barrier=1,data=ordered)
/dev/sdb1 on /tmp/mnt/Fotos type tntfs (rw,nodev,relatime,uid=0,gid=0,umask=00,nls=utf8,min_prealloc_size=64k,max_prealloc_size=256M,readahead=1M,user_xattr,case_sensitive,fail_safe,hidden=show,dotfile=show,errors=continue,mft_zone_multiplier=1)
\134\134192.168.1.30\134My_Book on /cifs1 type cifs (rw,mand,relatime,unc=\\192.168.1.30\My_Book,username=elrengo,uid=0,noforceuid,gid=0,noforcegid,addr=192.168.1.30,posixpaths,serverino,acl,rsize=16384,wsize=57344)

I can access but I try with:
mount -t cifs \\\\192.168.1.30\\My_Book /cifs1 /mnt/My_Book
result:
elrengo@RT-AC3100:/tmp/mnt# mount -t cifs \\\\192.168.1.30\\My_Book /cifs1 /mnt/My_Book
BusyBox v1.20.2 (2016-03-20 15:54:02 EDT) multi-call binary.

Usage: mount [OPTIONS] [-o OPTS] DEVICE NODE

Mount a filesystem. Filesystem autodetection requires /proc.

-a Mount all filesystems in fstab
-i Don't run mount helper
-r Read-only mount
-w Read-write mount (default)
-t FSTYPE[,...] Filesystem type(s)
-O OPT Mount only filesystems with option OPT (-a only)
-o OPT:
loop Ignored (loop devices are autodetected)
[a]sync Writes are [a]synchronous
[no]atime Disable/enable updates to inode access times
[no]diratime Disable/enable atime updates to directories
[no]relatime Disable/enable atime updates relative to modification time
[no]dev (Dis)allow use of special device files
[no]exec (Dis)allow use of executable files
[no]suid (Dis)allow set-user-id-root programs
[r]shared Convert [recursively] to a shared subtree
[r]slave Convert [recursively] to a slave subtree
[r]private Convert [recursively] to a private subtree
[un]bindable Make mount point [un]able to be bind mounted
[r]bind Bind a file or directory [recursively] to another location
move Relocate an existing mount point
remount Remount a mounted filesystem, changing flags
ro/rw Same as -r/-w

There are filesystem-specific -o flags.

and then I try with the same result:

mount –t cifs 192.168.1.30/My_Book /mnt/My_Book –o username=elrengo,workgroup=morsashouse
mount –t cifs 192.168.1.30/My_Book /mnt/My_Book

If any can help me!
 
Did the syntax changed?
Code:
BusyBox v1.25.1 (2017-09-11 17:43:39 EDT) multi-call binary.

Usage: mount [OPTIONS] [-o OPT] DEVICE NODE

I tried like this but still does not work:
Code:
mount -t cifs -o "username=test,password=test" \\\\192.168.1.3\\New Volume-c /cifs1
 
Did the syntax changed?
Code:
BusyBox v1.25.1 (2017-09-11 17:43:39 EDT) multi-call binary.

Usage: mount [OPTIONS] [-o OPT] DEVICE NODE

I tried like this but still does not work:
Code:
mount -t cifs -o "username=test,password=test" \\\\192.168.1.3\\New Volume-c /cifs1
I think it's the space in your volume name
 
Hi there,
what are the differences between ac68u / ac88u and ax86u / ax88u when mounting?

share on Synology NAS (smb3-max, smb1-min)

mount \\\\ 192.168.1.100 \\ ShareName / cifs1 -t cifs -o "username = User, password = Pass" -o vers = 2.0
ax router: everything is ok

ac router:
vers = 2.0 failed: Permission denied
vers = 1.0 failed: Permission denied
 
IIRC, cifs has been removed from certain firmware versions. You can check for it's existence by modprobe cifs or strings cifs.ko. The first will return nothing if the module is absent, the second should give a 'not found' message.

You can place a compatible version of cifs.ko in a persistent location (e.g., jffs) and call it during boot. I did this for a while a year or so back before realizing I really didn't need cifs (I extracted cifs.ko from the last version of Merlin to have it - but that was pre-386, so I don't know if this would work anymore).
 
IIRC, cifs has been removed from certain firmware versions. You can check for it's existence by modprobe cifs or strings cifs.ko. The first will return nothing if the module is absent, the second should give a 'not found' message.

You can place a compatible version of cifs.ko in a persistent location (e.g., jffs) and call it during boot. I did this for a while a year or so back before realizing I really didn't need cifs (I extracted cifs.ko from the last version of Merlin to have it - but that was pre-386, so I don't know if this would work anymore).
I my second router, RT-AC66U the result is:

Code:
elrengo@RT-AC66U_B1:/jffs/scripts# modprobe cifs
elrengo@RT-AC66U_B1:/jffs/scripts# strings cifs.ko
strings: cifs.ko: No such file or directory
elrengo@RT-AC66U_B1:/jffs/scripts#

I would like to mount a CIFS shared on my RT-AC3100 for backup propose. Other CIFS Mount, just my WDHDTVLive I've no issue to mount.
Thanks!

Guido.
 
If you can extract cifs.ko from a fairly recent Merlin or AsusWRT image, you can try the steps outlined here: https://www.linksysinfo.org/index.php?threads/jffs-no-space-available-reported.75119/post-311122 . Note: reading this post it apparently in reference to Tomato on MIPs, but the steps would be the same as Merlin on ARM: extract it, store it in jffs, insmod to load.

I have no idea when cifs stopped being supported (might be earlier than the 384 version) and I have no idea if a pre-386 cifs.ko will work on a 386 kernel (or if the kernel will even support it any more). Others may have a better idea.
 
elrengo@RT-AC66U_B1:/jffs/scripts# strings cifs.ko

That command doesn't do anything, you are trying here to view the content of a file named cifs.ko within /jffs/scripts - which obviously doesn't exist.

You need to run "lsmod" to see which modules are loaded.
 
That command doesn't do anything, you are trying here to view the content of a file named cifs.ko within /jffs/scripts - which obviously doesn't exist.

You need to run "lsmod" to see which modules are loaded.
Thanks RMerlin!
It's Loaded

Code:
ASUSWRT-Merlin RT-AC68U 384.17_0 Sun Apr 26 02:25:09 UTC 2020
elrengo@RT-AC66U_B1:/tmp/home/root# lsmod
Module                  Size  Used by    Tainted: P
sr_mod                 10842  0
cdrom                  30901  1 sr_mod
usblp                  10321  0
thfsplus               84702  0
tntfs                 493645 13
tfat                  186782  0
ext2                   52776  0
ext4                  221674  0
crc16                   1007  1 ext4
jbd2                   48993  1 ext4
ext3                  106409  0
jbd                    42367  1 ext3
mbcache                 4599  3 ext2,ext4,ext3
usb_storage            34290  2
sg                     19855  0
sd_mod                 21983  4
scsi_wait_scan           416  0
scsi_mod              108738  4 sr_mod,usb_storage,sg,sd_mod
cdc_mbim                3137  0
qmi_wwan                5792  0
cdc_wdm                 7252  2 cdc_mbim,qmi_wwan
cdc_ncm                 8762  1 cdc_mbim
rndis_host              5256  0
cdc_ether               4036  1 rndis_host
asix                   10856  0
cdc_acm                12614  0
usbnet                 11900  6 cdc_mbim,qmi_wwan,cdc_ncm,rndis_host,cdc_ether,asix
mii                     3367  2 asix,usbnet
ohci_hcd               17926  0
ehci_hcd               32382  0
xhci_hcd               51132  0
usbcore               102572 15 usblp,usb_storage,cdc_mbim,qmi_wwan,cdc_wdm,cdc_ncm,rndis_host,cdc_ether,asix,cdc_acm,usbnet,ohci_hcd,ehci_hcd,xhci_hcd
-----> cifs                  214080  7 <--------
jffs2                  91274  1
zlib_deflate           19489  1 jffs2
nf_nat_pptp             1602  0
nf_conntrack_pptp       3355  1 nf_nat_pptp
nf_nat_proto_gre         887  1 nf_nat_pptp
nf_conntrack_proto_gre     3296  1 nf_conntrack_pptp
nf_nat_ftp              1144  0
nf_conntrack_ftp        4909  1 nf_nat_ftp
wl                   4198524  0
dpsta                  12782  1 wl
et                     65134  0
igs                    11887  1 wl
emf                    15225  2 wl,igs
ctf                    21199  0
elrengo@RT-AC66U_B1:/tmp/home/root#
 

Latest threads

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!
Top