Scripts folder and cifs__mount

For topics which do not fit in other specific forums.
User avatar
GreyAreaUK
Posts: 133
Joined: Wed Feb 02, 2022 12:58 pm
Has thanked: 62 times
Been thanked: 23 times

Scripts folder and cifs__mount

Unread post 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!
Orbiting inside the Roche Limit of sanity.
User avatar
GreyAreaUK
Posts: 133
Joined: Wed Feb 02, 2022 12:58 pm
Has thanked: 62 times
Been thanked: 23 times

Re: Scripts folder and cifs__mount

Unread post 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.
Orbiting inside the Roche Limit of sanity.
cursedverses
Posts: 156
Joined: Sun May 24, 2020 9:13 pm
Has thanked: 163 times
Been thanked: 23 times

Re: Scripts folder and cifs__mount

Unread post 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.
User avatar
GreyAreaUK
Posts: 133
Joined: Wed Feb 02, 2022 12:58 pm
Has thanked: 62 times
Been thanked: 23 times

Re: Scripts folder and cifs__mount

Unread post 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
Orbiting inside the Roche Limit of sanity.
cursedverses
Posts: 156
Joined: Sun May 24, 2020 9:13 pm
Has thanked: 163 times
Been thanked: 23 times

Re: Scripts folder and cifs__mount

Unread post by cursedverses »

Looks good to my eyes!
jca
Top Contributor
Posts: 1911
Joined: Wed May 27, 2020 1:59 pm
Has thanked: 145 times
Been thanked: 454 times

Re: Scripts folder and cifs__mount

Unread post 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.
Post Reply