-
-
Notifications
You must be signed in to change notification settings - Fork 289
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
switch - access denied when trying to mount NAS share for roms etc. #1922
Comments
Thank you for the report! |
@Ntemis , i tried this on the 17-JAN build and got he same results |
Searching for this issue yields results relating to selinux, but I don't think that applies here. Still, you can try to run |
lakka (official): devel-20240123161432-37de45a (Switch.aarch64) lakka-switch:~ # ls /storage/.config/system.d/ lakka-switch:~ # cat /storage/.config/system.d/storage-nas.mount [Mount] [Install] @synthic |
ow! missed the switch part. Reopening and assigning to the proper person |
This works for me, just need to set protocol version in options line..... testing against samba version packaged in libreelec/lakka, the needed protocol version is 2.1, though that is depending on your server.
Oh, I missed the enable part..... yeah, no idea why that isnt working, though if I had to guess, it has to do with the fact it is trying to change permissions on a file on a fat partition, which it cant. you can start the service manually, but probably will never be able to enable it on boot, due to this limitation, without creating a new image, and including the mount in the image..... Actually.... I might be able to work around this issue, though, I cant promise it will work, if it tries to connect mount before wifi comes up, I would still expect it to fail on boot. |
Ok, figured out what is going on here....... Not really sure how to fix it properly though..... I might be able to hack something together, but this comes down to how systemd enables services(Creates Symlinks in a bunch of folders, to the service/mount file). Unfortunatly, fat32/exfat do not support symbolic links at all, hince the access denied when trying to enable it. This issue has probably existed since the first version of lakka on the switch(Before I re-ported/upstreamed), and no one noticed it, because no one else was trying to add systemd unit files to storage and enable them. lol. That being said, I am going to test some stuff, and see if I can work around the issue for you, probably wont be the cleanest fix ever, but the other option is moving storage to a proper linux partition on the SDcard which kind of ruins the magic of what lakka does for the average switch user. That and for something like libreelec, that will be absolutly needed for things like VPN bring up...... so ..... |
actually that makes a lot of sense about the symlinks. |
The reality is, this should be fixed, to keep uniformity with all builds. While I agree with you this should be added to the gui, which is also possible, and then have it start the services for systemd, if the user enables them at boot time...... that is kind of a dirty hack though. Currently, you should be able to use the mount file you created....... |
The not so pretty way to work around this would be to call a script in this file: https://github.com/libretro/Lakka-LibreELEC/blob/Lakka-v5.x/packages/lakka/retroarch_base/retroarch/scripts/retroarch-config then you can put the systemctl command in a script on your sdcard, and still start it before retroarch starts. That being said, it would still need a new image, so let me play with some more messed up, but also more uniform options, that might fix the issue, as that would be ideal. The more uniform way is to see if mergerfs's newish symlink support works across file systems, and to do some trickery in initramfs...... in which case, I can create the symlinks in an ext4 based image, and overlay the filesystems like we do with the retroarch configs. which in therory should "properly" fix the issue. Assuming I understand how this new support actually works. lol. |
Is there any options to set with mount to support Unicode charsets like CJK with the default fat32 partition or other new partitions ?? |
If you run A possible workaround is to unsquash the Here are the steps I follow:
This process will successfully mount the SMB folder at boot. You'll be able to browse the files. However, LibreELEC ignores the If you try to save a game or a state, it will get stuck at "Saving 0%," and you won't be able to restart, reboot, or shut down. You'll have to force power down the Switch and inject the payload to start Hekate again. I spent an entire weekend figuring this out, so I'm taking a break for now. If someone else can figure out how to overcome the My next idea is to add an |
While this works, it is not a solution. The real solution is fake permissions via rewritefs, but support needs to be added..... It is on my list of things to fix, but I am not coding on a phone/tablet. Also, this issue effects Kodi add-ons as well, that need to execute apps in the background..... As they try to set execute permissions in the Kodi add-on side, and when it can't, it kills the plugin.... Ironically everything is considered executable anyway. Lol. |
I ended up going with a
Although this seems to work great at home, I am not sure how it is going to behave when I take the Switch on the road to a different network. I would need to use a VPN in that case anyways. In earlier tests, the whole RetroArch interface would freeze up if WiFi is lost, and cause me to have to force it to power down, then go through the whole inject payload routine. Which is not ideal on the go. Knowing that my whole setup purely relies on my local NAS, I would like to at least be able to boot back into Hekate to use the normal Switch games in Atmosphere if the mounted folder becomes inaccessible, without relying on a payload mechanism. So I am brainstorming some sort of watchdog script to make the network folder service more reliable, maybe even auto toggle VPN when needed. Another issue is that RetroArch likes to revert save/state directories to default if they become inaccessible before saving the config. It's probably done as some sort of nuance with directory permissions. I might make a bug report on that if I can confirm the cause. I'm still coming up to speed on how the whole project is put together: For the Edit: |
Rewritefs was a hack added to original switch port to make Bluetooth paths work on fat32. This isn't in libreelec, nor is it likely to ever be. It seems to be the only real solution, since the whole idea was to install it as simply as possible, for people that don't want to partition, or want stock and lakka, and don't want the headache. |
when following the steps to mount a NAS share for roms as described in the lakka documentation:
https://www.lakka.tv/doc/Serving-ROMs-from-a-NAS/
When you reach the step to enable the storage-{path}.mount service you get an Access denied error:
Lakka:~ # systemctl enable storage-nas.mount
Failed to enable unit: Access denied
This issue is present on 4.3 and still an issue in the 5.x nightly builds (tested on 15-JAN nightly build)
The text was updated successfully, but these errors were encountered: