Page 1 of 1

Scripts folder and cifs__mount

Posted: Fri Feb 25, 2022 4:12 pm
by GreyAreaUK
I've had a rather pleasant afternoon getting MiSTer to run from my NAS using the cifs_mount script. However, one thing puzzles me.

I did a completely fresh install of MiSTer Fusion onto the stock 8GB card that comes with the DE10, after I'd copied the /media/fat folder structure and contents to the share I'd created from the previous 65GB card I was using.

Once I had it running (tested with a few games that could only be on the NAS) I decide to run the update_all script just to make sure everything was shipshape. Except...the update_all script wasn't there.

Long story short, the Script menu was still accessing /media/fat/Scripts instead of /media/fat/cifs/Scripts. My cifs_mount script has only had the IP address, username/password, and the two options to make it wait until the share is available. All other options are stock.

Am I correct in thinking the Scripts menu doesn't know/care about the cifs mount? I've solved this by creating a symlink after renaming the /media/fat/Scripts folder to be 1-Scripts

cd /media/fat
ln -s ./cifs/Scripts

This seems to work but I'm curious to know if this is recommended, or even expected behaviour.

Lots to learn still!

Re: Scripts folder and cifs__mount

Posted: Fri Feb 25, 2022 4:24 pm
by GreyAreaUK
Ok, replying to myself here - I think I see the issue. If you do something really stupid like renaming the /etc/media/Scripts folder, then /etc/network/if-up.d is unable to run the cifs_mount script, due to it being on the share it's actively trying to mount.

D'oh!

So yes, the Scripts folder should indeed be local to the card.

Re: Scripts folder and cifs__mount

Posted: Fri Feb 25, 2022 4:45 pm
by cursedverses
Something else to look at is the contents of your /etc/fstab file. If you have noexec in your options you can kiss running any kind of script from that mount goodbye.

Re: Scripts folder and cifs__mount

Posted: Fri Feb 25, 2022 4:48 pm
by GreyAreaUK
cursedverses wrote: Fri Feb 25, 2022 4:45 pm Something else to look at is the contents of your /etc/fstab file. If you have noexec in your options you can kiss running any kind of script from that mount goodbye.
I think it's ok:

Code: Select all

/etc# cat fstab
# <file system> <mount pt>      <type>  <options>       <dump>  <pass>
/dev/root       /               ext4    rw,noauto,noatime,nodiratime    0       1
proc            /proc           proc    defaults        0       0
devpts          /dev/pts        devpts  defaults,gid=5,mode=620,ptmxmode=0666   0       0
tmpfs           /dev/shm        tmpfs   mode=0777       0       0
tmpfs           /tmp            tmpfs   mode=1777       0       0
tmpfs           /run            tmpfs   mode=0755,nosuid,nodev  0       0
sysfs           /sys            sysfs   defaults        0       0
tmpfs           /var/lib/samba  tmpfs   mode=1777       0       0

Re: Scripts folder and cifs__mount

Posted: Fri Feb 25, 2022 4:48 pm
by cursedverses
Looks good to my eyes!

Re: Scripts folder and cifs__mount

Posted: Fri Feb 25, 2022 4:52 pm
by jca
cursedverses wrote: Fri Feb 25, 2022 4:45 pm Something else to look at is the contents of your /etc/fstab file. If you have noexec in your options you can kiss running any kind of script from that mount goodbye.
You can remove the noexec which I tested when I was using Switch to USB:

Edited the file /etc/usbmount/usbmount.conf and replaced the line
MOUNTOPTIONS="sync,nodev,noexec,noatime,nodiratime"
with
MOUNTOPTIONS="sync,nodev,noatime,nodiratime"
in order to be able to run MISTer scripts.