mrchrisster / 0mhz-collection

A curated collection of configurations for individually bootable DOS games for the ao486 core on MiSTer
23 stars 1 forks source link

Not quite working as expected with CIFS Share #4

Open cdaters opened 3 months ago

cdaters commented 3 months ago

Is there a way to fix this script for cifs shares so I can just run the script and not have to worry about copying content after the fact? I tried to work out the bash script and update things on my own, but my bash scripting is very padawan to your jedi mastery and I could not get it to work.

My environment is a stock MiSTer config which uses the cifs_mount.sh script to mount a "MiSTer" share from my NAS to the /media/fat/cifs mount point.

In the downloader script, I have the following defined appropriately...

games_loc="/media/fat/cifs"

On my NAS, the MiSTer share is essentially the /media/fat/games/ directory. That is to say all of the core directories (the content inside of the /games/ directory) reside at the root level of the MiSTer share. There is no "games" directory at my MiSTer share. It is simply all of the individual directories for the relevant cores.

Before using the 0mhz_downloader.sh script, my manually installed .mgl files can find the /AO486/media/<game directory> content that I've loaded myself manually into the MiSTer share and launch games just fine.

After running the 0mhz_downloader.sh script as configured above (and with the cifs_mount.sh script having been run), games are downloaded into the location /games/ao486/media/<game directory> in the MiSTer share at the same root level as, or alongside, my AO486 core directory.

The problem with this, is that the /games/directory created by the script, sits alongside the /AO486/directory at the root level, so I have to manually cp the content in the /games/ao486/media directory into my /AO486/media directory for the previously downloaded mgl files sitting in the /media/fat/_DOS Games directory to see everything as configured in the relevant mgl.

I'd like to point out as well, that in a previous earlier iteration of this downloader script, I had updated the ${base_dir} variable as thus:

base_dir="${games_loc}/AO486"

And once I had done that, the script was working perfect, however...I see that there have been quite a few changes since my earlier grab of this downloader script from a week or so prior... I just thought it may be helpful to include this change I had made in the event it is helpful...

I've noticed that after the script self updates (when I set that option to 'true'), that variable changes to"

base_dir="/games/ao486/media/"

This is where the problem lies, I then have at my share, a AO486 directory, and a games directory sitting alongside each other. So I have a /AO486/media folder that sits empty (except for my manually copied games) and a /games/ao486/media directory that has all the content downloaded by the script.

I apology if I was overly redundant or verbose in my explanation. I just wanted to make sure everything is clear.

sairuk commented 3 months ago

You don't have to mount remote to cifs but if you want to currently the script doesn't accommodate that afaik.

As an alternative on the MiSTer you can use the SINGLE_CIFS_CONNECTION="true" with LOCAL_DIR="*" options in your cifs_mount.ini to mount in-place under fat then this script and update_all will work just fine to write across to your remote.

You can refer to the retronas wiki for how we recommend it is setup here regardless of if you use retronas or not.

if you just want to mount AO486 inplace you can try these opts

SINGLE_CIFS_CONNECTION="false"
LOCAL_DIR="AO486|"
cdaters commented 3 months ago

Thank you for the tips! I will have to visit the RetroNAS project and look at the documentation you referenced.

I had given the RetroNAS project a cursory look recently when I stumbled across it on YouTube, adn because...RETRO...in the name, lol!

But I had already previously settled on the OpenMediaVault package for a Pi4 I set up to use in a GeekWorm NASPi v2.0 case along with a 2TB SSD for the NAS storage and had that pretty much fully setup.

My intent initially was to setup a Pi that could be my travel router/firewall, as well as a NAS platform for movies, music, and MiSTer content (when I recently stumbled into that rabbithole, lol!) should we take any road trips in the near future.

sairuk commented 3 months ago

Nothing specific to retronas in the config, the initial installer is the retronas part (even that is standard ansible+symlinks) everything else is just a standard cifs share and the mister config so the information should help with any cifs setup for mister.