Wait for Mount Operations to Finish

Kernel, Main, Utilities & Applications, Miscellaneous Devices.
Louthrax
Posts: 22
Joined: Sun Dec 20, 2020 7:38 pm

Wait for Mount Operations to Finish

Unread post by Louthrax »

Hi everyone,

I've configured my MiSTer to mount at startup almost all folders from my NAS. I like this type of setup because everything is stored at the same place on my NAS, and can be easily accessed, edited and backuped.

Everything works fine except for the "config" folder, that seems to be mounted after the "menu" initialization. The consequence is that I can't save the default joystick configuration on my NAS. Core-specific configurations are working OK, because they are only loaded after that.

So I'm looking for a way to make the mounting of my NAS folder blocking at startup, so that when the menu is launched, everything is in place (and the NAS version of "input_0079_0006_v3.map" is available).

Things I've already tried with no success:
* Add a "waitmount=x" line in mister.ini
* Add a "sleep x" line after mounting by NAS folder.
* Put the "mount" command in /etc/profile.d instead of /media/fat/linux/user-startup.sh.

Let me know if you have any hints :) !
Louthrax
Posts: 22
Joined: Sun Dec 20, 2020 7:38 pm

Re: Wait for Mount Operations to Finish

Unread post by Louthrax »

Some more details: I can see that the mount operation is still in progress when the menu is displayed as the contents of the cores ("Arcade", "Computer", etc...), need some time to "populate". That can be solved by entering / exiting them until contents are available, but the "config" folder contents can't be reloaded this way.

EDIT: I've found a workaround by creating on my SDCard a cifs/config/inputs folder containing my "input_0079_0006_v3.map" file. This folder is replaced by the NAS version once the mount is performed, so all core-specific config files are working. Only drawback is that I can't edit the default input_0079_0006_v3.map inputs from the MiSTer (I have to ssh on the MiSTer, copy the file somewhere, unmount, and then copy back the file to make changes persistent. I'll probably add a script to do that automatically waiting for a better solution...).
Emubastard
Posts: 56
Joined: Wed May 27, 2020 10:06 pm
Has thanked: 18 times
Been thanked: 46 times

Re: Wait for Mount Operations to Finish

Unread post by Emubastard »

I wonder if a better way to solve this was ever found.

I run two misters and find that having all the configs and games etc on a network mount is extremely useful. Everything is great except for this one issue and as I occasionally switch controllers, having to copy this map file back every time I switch seems awful.

my cifs_mount.ini looks like this

SERVER="x.x.x.x"
SHARE="mister"
USERNAME="mister"
PASSWORD="password"
LOCAL_DIR="*"
WAIT_FOR_SERVER="true"
MOUNT_AT_BOOT="true"
RO_ROOT="false"
SPECIAL_DIRECTORIES="linux|System Volume Information"

Hackshed_Carl
Posts: 121
Joined: Mon May 25, 2020 3:22 pm
Has thanked: 37 times
Been thanked: 52 times
Contact:

Re: Wait for Mount Operations to Finish

Unread post by Hackshed_Carl »

I haven't used it for a while but there is a setting to save your config to cloud storage. Might have been dropbox
I used to use it but don't anymore so can't remember its name and I'm not near my MiSTer to check but it's worth having a look - might be the scripts folder I'm thinking of

Post Reply