SMB/CIFS Mount
-
- Top Contributor
- Posts: 1441
- Joined: Mon May 25, 2020 7:54 pm
- Has thanked: 496 times
- Been thanked: 467 times
Re: SMB/CIFS Mount
About the shared folder, does it need to have everything from MiSTer's media/fat/ in it? Or is just having the /games/ folder's structure and content enough?
CRT SCR$ Project - building a collection of high-quality photos of CRT displays
CRT ART Books - retro-gaming books with authentic CRT photos
-
- Top Contributor
- Posts: 1911
- Joined: Wed May 27, 2020 1:59 pm
- Has thanked: 145 times
- Been thanked: 454 times
Re: SMB/CIFS Mount
Do you have any special reason for using a shared folder? Using a USB drive is way easier. The drawback is that you will not learn anything about networking
-
- Top Contributor
- Posts: 1441
- Joined: Mon May 25, 2020 7:54 pm
- Has thanked: 496 times
- Been thanked: 467 times
Re: SMB/CIFS Mount
CRT SCR$ Project - building a collection of high-quality photos of CRT displays
CRT ART Books - retro-gaming books with authentic CRT photos
-
- Top Contributor
- Posts: 860
- Joined: Wed Feb 09, 2022 11:50 pm
- Has thanked: 64 times
- Been thanked: 194 times
Re: SMB/CIFS Mount
This is a complex problem, and it's one outside the scope of Mister entirely. If you're not willing to learn things, you're not going to make it work.akeley wrote: ↑Wed Mar 09, 2022 9:16 am Really? How I wish you were here 2 years ago, you could've saved me a lotta cash and time with this helpful advice.
*eyeroll*
These kind of preachy, elitist attitudes are the reason why so many people stay away from the FPGA scene.
Not that it really needs explaining, but there are limited hours in the day, especially for an adult with a job/family life. So, wasting time on "learning" something that I have inherent dislike for, that has actually very little connection to this "emulation project", and what I will most likely never need again, seems quite pointless.
To run a network share, you need to learn some networking, both physical and logical. And to do it safely, you'll probably need to learn a little more. Your description of your setup makes it sound like you might not even have a firewall; opening a network share on a non-firewalled Windows machine is not usually a very good idea.
Announcing that you want to do something complex, but that you are absolutely unwilling to do any work or learning to make it happen, more or less demanding that everyone else do it for you, is not a recipe for success.
-
- Posts: 157
- Joined: Sun Aug 30, 2020 12:04 am
- Has thanked: 98 times
- Been thanked: 46 times
Re: SMB/CIFS Mount
_Computer
_Console
cheats
font
games
saves
Shadow_Masks
wallpapers
I would do _arcade, but the symlinks I have in there don't play nicely with the network share I have setup.
-
- Top Contributor
- Posts: 1441
- Joined: Mon May 25, 2020 7:54 pm
- Has thanked: 496 times
- Been thanked: 467 times
Re: SMB/CIFS Mount
This is an extreme projection, which you have based on one out-of-context quote. It was as uncalled for and unjustified as your eyebrow rising conjecture about my setup's safety...smh.
Yes, I'm unwilling to spend extra money on extra hardware and/or vast amounts of time learning everything about networking from scratch That's because the problem I'm trying to solve is not worth it for me (I've been using MiSTer nearly 2 years without this functionality) and, more importantly, these measures are not necessary at all in the first place to solve it. What I am willing to do though, is follow some focused advice and directions, which is something that has been happening already, no thanks to your input though.
The "demanding that everyone else do it for you" jibe is a nonsensical low blow. You might as well go and apply it to any other basic query that's being asked on this or any other board, but as it happens there still exist a zillion step-by-step guides out there which serve the purpose of accomplishing some task without learning the entire background behind it, or people who don't have problem answering even silliest of questions. It's, for example, something I've done when connecting my Playstation 2 to a shared folder (took less than an hour), and what I'm pretty sure you and all the other people who use this jibe hypocritically also have done at some point in their lives.
This is my last post on this subject. If you or anybody else want to continue with this pointless, and rather ugly derail, by all means, go ahead, but please be aware it really makes you look like an insufferable, high horse riding nerd caricature.
CRT SCR$ Project - building a collection of high-quality photos of CRT displays
CRT ART Books - retro-gaming books with authentic CRT photos
-
- Top Contributor
- Posts: 1911
- Joined: Wed May 27, 2020 1:59 pm
- Has thanked: 145 times
- Been thanked: 454 times
Re: SMB/CIFS Mount
If you use a wired connection via your router things will be improved. This is the way I upload stuff to my MISTer. It is not a speed demon but I don't mind.
-
- Posts: 10
- Joined: Mon Apr 11, 2022 4:24 pm
- Has thanked: 4 times
- Been thanked: 2 times
Re: SMB/CIFS Mount
Where on the MiSTer do the mount/unmiunt scripts and ini file go?
Do they run every time it boots? And if so do they need to be added to a startup script somewhere?
When would I want to unmount?
-
- Top Contributor
- Posts: 860
- Joined: Wed Feb 09, 2022 11:50 pm
- Has thanked: 64 times
- Been thanked: 194 times
Re: SMB/CIFS Mount
Networking only comes up after the GUI is displayed. It gets DHCP, runs the cifs_mount.sh script, and runs the time sync script. cifs_mount.sh doesn't seem to read an ini, you have to put the values for server, username, and password directly into the file. It will normally mount stuff on /media/fat/cifs, where you want to immediately make a "games" subdir.
edit: I went and looked closely, and the patch notes on the script claim to read values from the same name as the original script, with an ini extension. So you should be able to create a "cifs_mount.sh.ini" file with the necessary variables set; you'll have to read the main script to know what the variables are, however. That will hopefully let you keep your settings even if the script gets overwritten by an update, so it's probably a good idea.
second edit: after testing, the ini file needs to be named cifs_mount.ini.
Most cores in update_all will automatically update themselves to /media/fat/cifs/games/corename preferentially to the normal /media/fat/games/corename, but not all of them do, so you sometimes have to copy files into cifs.
I think the only time you'd maybe want an explicit umount would be if you're going to reboot the server. And even then, it would be of pretty limited utility.
-
- Top Contributor
- Posts: 860
- Joined: Wed Feb 09, 2022 11:50 pm
- Has thanked: 64 times
- Been thanked: 194 times
Re: SMB/CIFS Mount
"I want to go to the moon, but I refuse to ride in a rocketship or travel through vacuum. Anyone insisting that I need a rocketship and must travel through vacuum is an insufferable nerd."This is my last post on this subject. If you or anybody else want to continue with this pointless, and rather ugly derail, by all means, go ahead, but please be aware it really makes you look like an insufferable, high horse riding nerd caricature.
Re: SMB/CIFS Mount
Loving the MiSTer, mostly been enjoying the c64 core so far (so awesome to be running my JD 1571 drive via IEC) though just getting into the AO486 now.
I was actually writing this post to ask for help, seeing as though my CIFS share was mounting/browsing perfectly, but cores where acting funny, and AO486 wasn't booting from any VHD or IMG from the share, even though I could browse and select them, and they were the same VHDs and IMG files I'd created and booted from on the SD.
Seeing as though I'm here, I may as well post my own solution if it might save someone some time (as I was just about to scrap the idea altogether and load up a USB HDD)...
- ssh'd in using putty
- double checked that the share was mounted rw with the mount command
- navigated to /media/fat/games and tried to mkdir a test directory - permission denied (i thought it had something to do with write access)
- double checked share permissions via windoze. I'd initially shared the folder using 'advanced sharing' on properties>sharing tab, adding the user account and assigning r/w/full control
- however when i went through 'share' on the properties>sharing tab, it had assigned the account 'read-only'. Go figure.
I changed it to read/write and it's all fixed, can mkdir/rmdir a test directory, and now all the VHDs and IMGs load no problem.
-
- Top Contributor
- Posts: 860
- Joined: Wed Feb 09, 2022 11:50 pm
- Has thanked: 64 times
- Been thanked: 194 times
Re: SMB/CIFS Mount
I think of Windows as being a big jerk about permissions: it's looking for any reason it can find to prevent access. Denies always override everything else, so if there's any way a deny rule applies to a login, access is refused. If no explicit permission is granted, access is refused. Thus, in general, I stick to Allow rules only, since if something isn't allowed, it's denied. You rarely need anything explicit to prevent access. That happens all by itself.
Re: SMB/CIFS Mount
-
- Top Contributor
- Posts: 860
- Joined: Wed Feb 09, 2022 11:50 pm
- Has thanked: 64 times
- Been thanked: 194 times
Re: SMB/CIFS Mount
The whole CIFS setup is very weird. I wish you could just load a share point with /etc/fstab instead. In fact, the whole Mister setup around filesystems is deeply strange. It makes no sense to me to have the root filesystem on a loopback.
-
- Posts: 157
- Joined: Sun Aug 30, 2020 12:04 am
- Has thanked: 98 times
- Been thanked: 46 times
Re: SMB/CIFS Mount
Here's my cifs_mount:
Code: Select all
SERVER="SYNOLOGYNAS"
SHARE="mister"
USERNAME="mister"
PASSWORD="passwordgoeshere"
LOCAL_DIR="*"
WAIT_FOR_SERVER="true"
MOUNT_AT_BOOT="true"
ADDITIONAL_MOUNT_OPTIONS="vers=2.0"
In the "mister" shared folder on the synologynas, I have the following folders:
_Computer
_Console
_Games
_Other
_Utility
BIOS
bootrom
cheats
config
docs
Filters
Filters_Audio
font
games
Gamma
Presets
saves
savestates
Shadow_Masks
ALL of them mount to /media/fat. Have to wait about 10 - 15 seconds after MiSTer power-on for DHCP and the cifs script to kick in.
NONE of them mount to /media/fat/cifs. Don't even have a cifs folder on the sdcard
-
- Top Contributor
- Posts: 860
- Joined: Wed Feb 09, 2022 11:50 pm
- Has thanked: 64 times
- Been thanked: 194 times
Re: SMB/CIFS Mount
In other words:
Code: Select all
cd /media/fat
mkdir cifs
This is what my cifs_mount.ini looks like:
Code: Select all
SERVER="W.X.Y.Z"
SHARE="mister"
USERNAME="mister"
PASSWORD="[redacted]"
DOMAIN=""
LOCAL_DIR="cifs"
ADDITIONAL_MOUNT_OPTIONS="vers=3.11"
WAIT_FOR_SERVER="true"
MOUNT_AT_BOOT="true"
#========= ADVANCED OPTIONS =========
BASE_PATH="/media/fat"
#MISTER_CIFS_URL="https://github.com/MiSTer-devel/CIFS_MiSTer"
KERNEL_MODULES="md4.ko|md5.ko|des_generic.ko|fscache.ko|cifs.ko"
IFS="|"
SINGLE_CIFS_CONNECTION="true"
#Pipe "|" separated list of directories which will never be mounted when LOCAL_DIR="*"
SPECIAL_DIRECTORIES="config|linux|System Volume Information"
With those settings, you end up with a base path of /media/fat in Advanced options, and then a local dir of cifs, so it concatenates them and mounts at /media/fat/cifs.
Most of the update scripts will preferentially put stuff in /media/fat/cifs/games. There are at least a couple of cores that don't do that, AO486 being one. With that core, you have to copy everything from /media/fat/games/AO486 to /media/fat/cifs/games/AO486 manually.
Because of that, I would recommend not making a cifs folder until you're ready to get the share pointed at it; the next update is gonna put a hurricane of stuff in there, even if it's not correctly mounted. Don't run any updates until you know the share is live and that you can successfully create, read, and delete files and directories there.
-
- Posts: 10
- Joined: Mon Apr 11, 2022 4:24 pm
- Has thanked: 4 times
- Been thanked: 2 times
Re: SMB/CIFS Mount
Today I finally built my MiSTer. Started up on the first try! Then I did an update.Malor wrote: ↑Tue Apr 12, 2022 11:11 am The scripts should be built-in. They're in /media/fat/Scripts.
Networking only comes up after the GUI is displayed. It gets DHCP, runs the cifs_mount.sh script, and runs the time sync script. cifs_mount.sh doesn't seem to read an ini, you have to put the values for server, username, and password directly into the file. It will normally mount stuff on /media/fat/cifs, where you want to immediately make a "games" subdir.
Then I setup the cifs_mount, and verified it is mounting my shared folders on the NAS.
Running another update (download) does nothing because all the current files are in the /media/fat folders from the original update.
Do I manually move them to the shared folder? Or delete them and re-update?
-
- Top Contributor
- Posts: 860
- Joined: Wed Feb 09, 2022 11:50 pm
- Has thanked: 64 times
- Been thanked: 194 times
Re: SMB/CIFS Mount
Code: Select all
BIOS
Cheats
config
docs
games
saves
savestates
Code: Select all
(before typing this, be sure the cifs mount is active at /media/fat/cifs!)
cd /media/fat
mv BIOS cifs
Code: Select all
cd /media/fat
ln -s /media/fat/cifs/BIOS BIOS
ln -s /media/fat/cifs/Cheats Cheats
....
Another option is to edit the update ini settings so that it's hard-pointed at /media/fat/cifs instead. But I like my way better, because there's definitely only one copy of everything, and it's definitely in the cifs directory. Anything incorrectly looking in regular /media/fat will be transparently redirected into cifs.
The only real downside is that you have to do this from a Linux console, there's no reasonable way to do it from a Windows host. I'd suggest getting ssh running before you start tinkering, and then do it all that way. It's a lot easier when you can cut and paste.
-
- Posts: 10
- Joined: Mon Apr 11, 2022 4:24 pm
- Has thanked: 4 times
- Been thanked: 2 times
- thisisamigaspeaking
- Posts: 244
- Joined: Mon May 23, 2022 12:28 am
- Has thanked: 80 times
- Been thanked: 23 times
Re: SMB/CIFS Mount
There are several ways you can approach it. Since I was starting from a fresh installation, what I did is set:SmokyBarnable wrote: ↑Sun Jun 26, 2022 10:32 pmToday I finally built my MiSTer. Started up on the first try! Then I did an update.Malor wrote: ↑Tue Apr 12, 2022 11:11 am The scripts should be built-in. They're in /media/fat/Scripts.
Networking only comes up after the GUI is displayed. It gets DHCP, runs the cifs_mount.sh script, and runs the time sync script. cifs_mount.sh doesn't seem to read an ini, you have to put the values for server, username, and password directly into the file. It will normally mount stuff on /media/fat/cifs, where you want to immediately make a "games" subdir.
Then I setup the cifs_mount, and verified it is mounting my shared folders on the NAS.
Running another update (download) does nothing because all the current files are in the /media/fat folders from the original update.
Do I manually move them to the shared folder? Or delete them and re-update?
LOCAL_DIR="*"
in cifs_mount.sh and create the directories I wanted to be hosted on my NAS in the share, then the script will mount each of those directories to that location on "/media/fat/*". I.e. the "games" directory on the share will be placed in /media/fat/games if and only if it exists on the share, and any directories that don't exist there will be left on the local drive.
SPECIAL_DIRECTORIES="config|linux|System Volume Information"
These will not be automatically mounted if LOCAL_DIR="*".
Then I ran update_all and it filled those directories for me. If you wanted to preserve your existing directories from the flash drive, I'm not sure what the best way to do it would be, I'd just read the directories from the flash drive on a computer and put it in the SMB share, using the LOCAL_DIR="*" setting to automatically mount them from the MiSTer, but there might be a better way.
-
- Top Contributor
- Posts: 860
- Joined: Wed Feb 09, 2022 11:50 pm
- Has thanked: 64 times
- Been thanked: 194 times
Re: SMB/CIFS Mount
The conclusion I drew: keep the Mister binary and the config directory on the same filesystem.
Re: SMB/CIFS Mount
With this client side parameter mister can't see and/or create symlinks that are at the base of the arcade organiger (and other triks) on the mister environment.
I know that i can store on my nas just games folder but my question is that someone know how to solve this problem...
Thanks.
Re: SMB/CIFS Mount
This way is not very clean solution.... someone know how to remove "nounix" from mount option? I know how add genera parameters but not how to remove a parameter...
- thisisamigaspeaking
- Posts: 244
- Joined: Mon May 23, 2022 12:28 am
- Has thanked: 80 times
- Been thanked: 23 times
Re: SMB/CIFS Mount
BTW, glad I looked at that, I didn't know why that organize the arcade games thing was failing.
Re: SMB/CIFS Mount
mfsymlinks is like a tricks to use symlinks under windows.
-
- Posts: 1
- Joined: Fri May 26, 2023 3:44 am
- Has thanked: 1 time
Re: SMB/CIFS Mount
Hello. New to the forum and had a quick question. Looks like this is a necrobump, but figured it's the right topic.
I got my CIFS up and going, but it's not working the way I expected it to. I got frustrated and just copied all my games directory contents to my QNAP NAS and set the local_dir for "games" in cifs_mount.sh. It's all working, but now everything is on the NAS. I was wanting to keep some cores on the SD card to play in case I took my MiSTer to a friends house.
The reason I ended up that route is because if I used either "" as the local_dir or "cifs" anytime I would run update_all, it would copy everything back to the local SD card rather than to the NAS. I'm not sure how the update_all.sh is picking up everybody else's directories that either use "" or "cifs" as their local directory in cifs_mount.sh. Like I said, it's working, but now I'm just tethered to my NAS.
I was thinking it would see both the local SD and NAS directories at the same time, but that doesn't seem to be the case. With cifs mounted it sees what's on the NAS, with it not, it sees what's on the SD card. I'm sure my explanation is confusing, but I'm just trying to understand how it works.
Re: SMB/CIFS Mount
Hi guys,
Recently started up the mister after a long hiatus (and wanted to give the N64 core a go). Anyway, I am getting an error when running cifs_mount.sh
mount: /tmp/cifs_mount: mount(2) system call failed: Host is down.
It worked previously but doesn't seem to be working now , I confirmed that NAS is reachable by pinging it from MiSTer.
Thank you in advance.
Re: SMB/CIFS Mount
When I see that, I usually have network issue somewhere.
I don't recall if I installed extra linux packages on my mister system, but maybe these commands will help for troubleshooting.
Code: Select all
# my NAS ip is 10.0.0.33, so obviously you would change it to your IP config in the examples below.
# check to see if smb server is running
# from the mister
/root# nc -v 10.0.0.33 445
10.0.0.33 445 open
# check to see what smb share are available to you
# from the mister
/root# smbclient -L //10.0.0.33/ -U nas
Enter MISTER\nas's password:
Sharename Type Comment
--------- ---- -------
print$ Disk Printer Drivers
nas Disk NAS share
mister Disk MiSTer share
mister2 Disk MiSTer backup share
IPC$ IPC IPC Service (ubuntu server (Samba, Ubuntu))
SMB1 disabled -- no workgroup available