ihaveamac / ninfs

FUSE filesystem Python scripts for Nintendo console files
MIT License
436 stars 18 forks source link

Mount the Switch with memloader on Linux with sudo privileges #100

Closed glu8716 closed 1 year ago

glu8716 commented 1 year ago

I'm sorry if this is a dumb question but I'm not familiar with this. I want to mount the user partition of my Switch with memloader on my Arch Linux machine. I've installed ninfs with pip by using the command in the release page, however I can't mount the partition, which is on /dev/sdd, as it seems the local ninfs installation can't be run with sudo privileges.

sudo mount_nandhac /dev/sdd /home/lorenzo/Games/Switch/Mount/ -o allow_other --keys /home/lorenzo/Games/Switch/bis.keys

Traceback (most recent call last):                                                     
  File "/home/lorenzo/.local/bin/./mount_nandhac", line 5, in <module>                 
    from ninfs.main import main                                                        
ModuleNotFoundError: No module named 'ninfs'

Do I have to install ninfs system-wide?

glu8716 commented 1 year ago

Never mind, I found out about virtual environments and that works with sudo privileges.

ihaveamac commented 1 year ago

The reason this happened is because if you installed ninfs using --user, it was installed to your local user directory. When you use sudo, it will use root's directory which wouldn't have it.