How to Mount windows shared folder on Xavier?

I tried to mount a windows shared folder on Xavier, but did not success. Here are the steps:

  1. run apt-get install cifs-utils, and id nvidia show the following info
    uid=1001(nvidia) gid=1001(nvidia) groups=1001(nvidia),4(adm),27(sudo),29(audio),44(video),124(gdm)

  2. Both Windows machine (Win 7) and Xavier (JetPack 4.1.1) are connecting with the same router. Windows machine Ip: 10.0.3.100, Xavier Ip: 10.0.3.102, two machines can ping each other.

  3. create a shared folder in windows: //10.0.3.100/abc, and make a dir /mnt/abc in Xavier .

  4. create /home/nvidia/.smbcredentials, which has:
    username=winloginUser
    password=winLoginPwd

  5. Tried the following two options one by one in /etc/fstab
    //10.0.3.100/abc /mnt/abc cifs credentials=/home/nvidia/.smbcredentials,iocharset=utf8,gid=1001,uid=1001,file_mode=0777,dir_mode=0777,vers=1.0 0 0

//10.0.3.100/abc /mnt/abc cifs credentials=/home/nvidia/.smbcredentials,iocharset=utf8,gid=1001,uid=1001,file_mode=0777,dir_mode=0777,sec=ntlmssp,ro 0 0

  1. When execute sudo mount -a, both have the following error msg:
    mount error(79): Can not access a needed shared library
    Refer to the mount.cifs(8) manual page (e.g. man mount.cifs)

using tail -f /var/log/kern.log
Feb 8 11:59:38 jetson-0423418009953 kernel: [ 1133.610070] CIFS VFS: CIFS mount error: iocharset utf8 not found

I tried all the suggestions from google on “iocharset utf8 not found” message, But do not lucky to have a fix, any suggestions?

Thanks!

Does first a manual mount works ?

sudo su
mount -t cifs //server/share /mnt/abc -o username=<win_user>,domain=<win_domain>,uid=1001,gid=1001
...give windows passwd
ls /mnt/abc
exit

If not the above, then NFS may be can be used?
Like to install at windows NFS server somehow and mount it as NFS share from jetson device?
Otherwise, mount the samba as Honey_Patouceul advise, please.
But you may need to check couple of times that all network share permissions are set correctly as well as read/write permissions in windows configuration.

unix may not like any other other languages but english in folder names

However the issue seems caused by absence of the module

/lib/modules/4.9.108-tegra/kernel/fs/nls/nls_utf8.ko

on a host pc I would try:

sudo apt install linux-modules-extra-4.18.0-15-generic

that would install

/lib/modules/4.18.0-15-generic/kernel/fs/nls/nls_utf8.ko

Thus the issue seems to derive into an issue of building the kernel module for the particular xavier version of kernel, as it seems to me.
First steps should be like:

sudo su
cd /usr/src/linux-headers-4.9.108-tegra/kernel-4.9
make modules_prepare

Then I would download the source from github and would try make

References:
https://github.com/torvalds/linux/blob/master/fs/nls/nls_utf8.c
https://askubuntu.com/questions/519796/unable-to-mount-cifs-with-iocharset-utf8-in-trusty

1 Like

HI Honey_Patouceul,

Thanks for your message. After your step 3, i got the following message
“mount error(112): Host is down
Refer to the mount.cifs(8) manual page (e.g. man mount.cifs)”

For better advice, could you please post the exact command you’re running, as well as the L4T version (or JetPack version) and details if you have a non standard setup ?
Does the server still reply to ping before testing ?

Thanks Andrey1984!

Your guess is correct, modprobe says that nls_utf8.ko cannot be found at

/lib/modules/4.9.108-tegra

however i did installed linux-modules-extra-4.15.0-39-generic, and find cmd tells me this

root@jetson-0423418009953:/# sudo find / -name nls_utf8.ko
find: ‘/run/user/1001/gvfs’: Permission denied
/lib/modules/4.15.0-39-generic/kernel/fs/nls/nls_utf8.ko

The lsmod tells this

root@jetson-0423418009953:/# lsmod
Module                  Size  Used by
binfmt_misc            13103  1
bnep                   16619  2
fuse                  103334  3
cifs                  443686  0
nvs_bmi160             22076  0
nvs                    53924  1 nvs_bmi160
bluedroid_pm           14104  0
ip_tables              18922  0
x_tables               29079  1 ip_tables

Now question is that how to add nls_utf8.ko into the tegra kernel

@Honey_Patouceul
Here is a copy from my screen

root@jetson-0423418009953:/# mount -t cifs //10.0.3.100/abc /mnt/abc -o username=wus1200,domain=JHUABC,gid=1001,uid=1001
Password for wus1200@//10.0.3.100/abc:  *********
mount error(112): Host is down
Refer to the mount.cifs(8) manual page (e.g. man mount.cifs)
root@jetson-0423418009953:/#

You will have to start with

sudo su
cd /usr/src/linux-headers-4.9.108-tegra/kernel-4.9
make modules_prepare

than download and build the source code somehow
You may find an example of how to build a kernel module for xavier [v4l2loopback] at the website https://sites.google.com/site/jetsontricks/xavier
Then using similar approach github repo can be cloned and approached, in m y opinion.
I started downloading the whole repo that seems huge

git clone https://github.com/torvalds/linux/

may be there are other rather tiny ways.
I have not enough space to download the entire repo probably at the moment. Thus it will be up to you to sort out. or approach the method at your side. Or, otherwise other folks from forum will advise.
However, why do not you use NFS instead meanwhile?

Are you able to reach the server with ping ?

Or you can setup Linux Docker [at windows computer] and map the shares to linux container. To the Xavier device you will attach them via mounting them as linux network shares , e.g. using sshfs

@Honey_Patouceul

Yes, I can ping each other from the very beginning.

my guess [ what I can see from his first post]

is that network connection abrupts at the point when it fails to find the module

@Andrey1984
I am developing and client(windows)-server(linux) kind of project, some codes are shared by both sides, the windows side was developed in Visual Studio. I plan to store and edit all the source code in windows machine, the linux side only executes Makefiles (which are in windows machine also) and stores the building output files.

Just used to be in that way to share windows files, will take a look at NFS.

Thank you so much, and really appreciate your help!

Ok, so you may try adding version:

mount -t cifs //10.0.3.100/nextGenVideo /mnt/nextGenVideo -o username=wus1,domain=JHUAPL,gid=1001,uid=1001,vers=2.0

or try vers=3.0 or 1.0 if this doesn’t work.

Tried before, vers=2.0 give an “Invalid argument” error

root@jetson-0423418009953:/# mount -t cifs //10.0.3.100/nextGenVideo /mnt/nextGenVideo -o username=wus1,domain=JHUAPL,gid=1001,uid=1001,vers=2.0
Password for wus1@//10.0.3.100/nextGenVideo:  *********
mount error(22): Invalid argument
Refer to the mount.cifs(8) manual page (e.g. man mount.cifs)
root@jetson-0423418009953:/# mount -t cifs //10.0.3.100/nextGenVideo /mnt/nextGenVideo -o username=wus1,domain=JHUAPL,gid=1001,uid=1001,vers=1.0
Password for wus1@//10.0.3.100/nextGenVideo:  *********
mount error(112): Host is down
Refer to the mount.cifs(8) manual page (e.g. man mount.cifs)
root@jetson-0423418009953:/# mount -t cifs //10.0.3.100/nextGenVideo /mnt/nextGenVideo -o username=wus1,domain=JHUAPL,gid=1001,uid=1001,vers=3.0
Password for wus1@//10.0.3.100/nextGenVideo:  *********
mount error(22): Invalid argument
Refer to the mount.cifs(8) manual page (e.g. man mount.cifs)

his log file explicitly pointed to .ko file as to the cause.
probably mount attempts above are logged at /var/log/ as well with some particular cause or error specified

Sorry, I have no Windows share for testing from Xavier, but I did that on various L4T releases on TX1 and it was straight forward with cifs-utils in my case.

Does your Windows server run an old version of Windows ?

Windows 7, I have used this way to share my windows files with Linux platforms since my 1st cross platform development. Never had a problem before.

Do you see any logged events of the mount attempts that failed? [at /var/log/ files]
What if you use mount in verbose mode? [-v]

mount -t cifs //10.0.3.100/nextGenVideo /mnt/nextGenVideo -o -v username=wus1,domain=JHUAPL,gid=1001,uid=1001,vers=1.0

It might be something like version 2.1.

That might be my last proposal, have you installed keyutils package ?

sudo apt-get install keyutils