Can't mount NAS drive for Roms (SOLVED)
-
Pi Model or other hardware: Pi 3B+
Power Supply used: special 5V - 6A - doubts on cable...
RetroPie Version Used : 4.7.12
Built From: Pre made SD Image
USB Devices connected: 2 controllers for joyticks, 1 keyboard for testsHi all !
I am sorry if this issue has already been related, but after many searches, I could not find any solving action...
My problem is simple and many times encountered : Before Retropie starts, I want my Raspberry to connect to a NAS (Synology) sharing its ROMs directory.
So, I inserted a supplementary line in Autostart.sh :
sudo mount --verbose -t cifs -o username=xxxxxxxx,sec=ntlmssp,nounix,noserverino,noauto,x-systemd.automount,password=xxxxxxx,vers=1.0,_netdev //192.168.1.85/roms /home/pi/RetroPie/roms
emulationstation #autoThis does NOT work ... BUT, once in OS, if I manually type in the exact same line :
sudo mount --verbose -t cifs -o username=xxxxxxx,sec=ntlmssp,nounix,noserverino,noauto,x-systemd.automount,password=xxxxxxx,vers=1.0,_netdev //192.168.1.85/roms /home/pi/RetroPie/roms
It works ! I do have my local directory connected to the NAS drive !When request "dmesg" :
[ 22.637616] FS-Cache: Netfs 'cifs' registered for caching
[ 22.664252] Key type cifs.spnego registered
[ 22.664317] Key type cifs.idmap registered
[ 22.670300] CIFS: Attempting to mount //192.168.1.85/ROMS
[ 22.670478] CIFS: VFS: Use of the less secure dialect vers=1.0 is not recommended unless required for access to very old servers
[ 27.889462] CIFS: Status code returned 0xc000000d NT_STATUS_INVALID_PARAMETER
[ 27.889519] CIFS: VFS: \192.168.1.85 Send error in SessSetup = -22
[ 27.889616] CIFS: VFS: cifs_mount failed w/return code = -22My question : Why my mount doesn't work in the Autostart.sh but works manually ? Only a question on network not ready when trying to connect to the NAS ?
In Raspi-config, I did check "on boot, wait for network".Thank you for any advice, I'm sure it's simple but I'm out of it !
-
@tomcat91fr said in Can't mount NAS drive for Roms:
Only a question on network not ready when trying to connect to the NAS ?
That's probably it, try adding a
sleep 3
before themount
command. I'd also recommend removing thevers=1.0, x-systemd.autmount,sec, _netdev, noauto
mount options and leave only the really necessary options in place (user,password,nounix,noserverino). -
Tks Mitu ,
Yes I will .... Sorry for the many options not necessary, I must say that when it doesn't work properly, you try any way to fix it ! And then many options arrive ! :)
I keep you advised !
-
Well, I did the changes, removing some options, and introducing a SLEEP ,
With a SLEEP 3, and moreover a SLEEP10, it doesn't change anything.
Worse, I don't have the feeling, during the boot, that it waits for 10 seconds ! I now wonder if it considers the script AutoStart.sh ?!?
Does it all the time before starting EmulationStation ?? Or is there an option to by-pass it ?
-
I do confirm ! Here is the AutoStart.sh that I use now (for test) :
sudo sleep 10
sudo echo "test !!!"
sudo sleep 10
sudo mount --verbose -t cifs -o username=tomcat91fr,sec=ntlmssp,nounix,noserverino,noauto,x-systemd.automount,password=gwen0000,vers=1.0,_netdev //192.168.1.85/roms /home/pi/RetroPie/roms
emulationstation #autoAs you see, with twice SLEEP 10, should see it during the boot, but I don't see anything ! Meaning that Autostart.sh is not called before launching Emulation Station...
Any idea ?!?
-
It's been a long while, but i remember that with the commands from the documentation, it didn't run right, eventually i ended up doing it like this whih has worked with several different (pi based) NAS systems.
sudo mount -t cifs -o sec=ntlmv2,username=pi,rw,file_mode=0777,dir_mode=0777,password=qwerty,nounix,noserverino //192.168.1.103/RETROPIE/roms /home/pi/RetroPie/roms sudo mount -t cifs -o sec=ntlmv2,username=pi,rw,file_mode=0777,dir_mode=0777,password=qwerty,nounix,noserverino //192.168.1.103/RETROPIE/configs/all/emulationstation/collections /opt/retropie/configs/all/emulationstation/collections sudo mount -t cifs -o sec=ntlmv2,username=pi,rw,file_mode=0777,dir_mode=0777,password=qwerty,nounix,noserverino //192.168.1.103/RETROPIE/configs/all/retroarch/overlay /opt/retropie/configs/all/retroarch/overlay sudo mount -t cifs -o sec=ntlmv2,username=pi,rw,file_mode=0777,dir_mode=0777,password=qwerty,nounix,noserverino //192.168.1.103/RETROPIE/bios /home/pi/RetroPie/BIOS kodi-standalone #auto emulationstation #auto
-
Thank you Crush,
Well, I don't see how it helps me because anyway, as I said, AutoStart.sh doesn't execute anyway, whatever I put inside...
-
@tomcat91fr So your pi doesnt boot into Emulationstation either?
Cause that is what the last line does. -
@Crush : You're absolutely right !
I did think the autostart.sh was not launching, but I tested something : Removing the line "emulationstation #auto" inside . And EmulationStation did not start. Then, it was easier to read the erros in the booting lines ...Finally, I found my problem : Yes indeed, I need to wait (sleep 3) before mount my NAS drive, likely because the network needs some time to connect...
Main mistake : I was working from my PC via a Telnet connection, and was editing my file autostart.sh with a windows editor ! Big mistake !!
I could see, once in linux using a linux editor (vi or nano) that windows added some characters at the end of each line ! Once removed, it works !!Thank you all for your advices, it was useful to me to persevere !
-
@tomcat91fr said in Can't mount NAS drive for Roms:
Main mistake : I was working from my PC via a Telnet connection, and was editing my file autostart.sh with a windows editor ! Big mistake !!
You can access the
config
folder via file shares (\\retropie\config
), you don't necessarily need the SSH (Telnet is not available on the Pi) connection. Either way, it's strange because nowadays Notepad (default Windows editor) supports Unix line endings.Either way, good you have this solved - when in doubt, use Notepad++ or edit directly on the Pi, using
nano
.
Contributions to the project are always appreciated, so if you would like to support us with a donation you can do so here.
Hosting provided by Mythic-Beasts. See the Hosting Information page for more information.