Problem installing Unity directly to USB

Hi,

I’ve been trying to install the most recent version of Unity3D on my computer, but do not have enough space, so I need to make a portable install onto a USB. I have seen that it is possible, so that’s not the question, rather, my question is how to direct where it installs to. On Linux, I use the dpkg command to install it from the .deb file and I add --root to specify my preferred directory (the USB). However, despite this, Unity continues to install onto my hard drive instead. I’m not too familiar with --root, as I only just learned about it through an internet search to try to fix this problem, so let me know if I’m using it incorrectly. I’m running Ubuntu 16.04.

Thanks,
ETPOF

You might be better off using the .sh installer and passing -o /path/to/usb/drive

When running,

sudo bash file.sh -o /media/removable/UNITITLED

I get this:

Unpacking Unity 2017.2.0xb6Linux ...

bzip2: Data integrity error when decompressing.
    Input file = (stdin), output file = (stdout)

It is possible that the compressed file(s) have become corrupted.
You can use the -tvv option to test integrity of such files.

You can use the `bzip2recover' program to attempt to recover
data from undamaged sections of corrupted files.

tar: Child died with signal 13
tar: Error is not recoverable: exiting now
chown: cannot access '/media/removable/UNTITLED/unity-editor-2017.2.0xb6Linux/Editor/chrome-sandbox': No such file or directory
chmod: cannot access '/media/removable/UNTITLED/unity-editor-2017.2.0xb6Linux/Editor/chrome-sandbox': No such file or directory
Extraction complete. Run /media/removable/UNTITLED/unity-editor-2017.2.0xb6Linux/Editor/Unity to begin

Just to mess around with it, I created the directories it claimed were missing (unity-editor-2017.2.0xb6Linux/Editor/Unity).

Running the command again gives me:

Unpacking Unity 2017.2.0xb6Linux ...

bzip2: Data integrity error when decompressing.
    Input file = (stdin), output file = (stdout)

It is possible that the compressed file(s) have become corrupted.
You can use the -tvv option to test integrity of such files.

You can use the `bzip2recover' program to attempt to recover
data from undamaged sections of corrupted files.

tar: Child died with signal 13
tar: Error is not recoverable: exiting now
chown: changing ownership of '/media/removable/UNTITLED/unity-editor-2017.2.0xb6Linux/Editor/chrome-sandbox': Operation not permitted
chmod: changing permissions of '/media/removable/UNTITLED/unity-editor-2017.2.0xb6Linux/Editor/chrome-sandbox': Operation not permitted
Extraction complete. Run /media/removable/UNTITLED/unity-editor-2017.2.0xb6Linux/Editor/Unity to begin

The only thing that has changed is that now I seem to have some permission problems with my USB. Then I ran,

chmod -R 777 /media/removable/UNTITLED/unity-editor-2017.2.0xb6Linux/

But it doesn’t change a thing. Still getting the same “operation not permitted” error. Suggestions?

EDIT:
I did a little more experimenting to get some more info, and when trying to begin the install without specifying the install location,

sudo bash file.sh

The same first error (no such file or directory) is reproduced. After creating the missing directories once again (this time in my home directory), the chown errors are no longer present. This would obviously mean that there are definitely permission errors on my USB. However, the rest of the errors above it still prevent me from installing Unity either way. I continued to format the USB to make it Linux-ready and the permission errors are now gone there as well.

Data integrity [error](http://unity3d.com/support/documentation/ScriptReference/30_search.html?q=error) when decompressing probably means the download was corrupted. Does the checksum for the .sh file match the one published for the build?

A simple reinstall of the script worked. Something must’ve gone strange the first time. Unity is now installed to the USB, but I’m now getting permission errors when trying to execute it:

sudo '/media/removable/USB Drive/unity-editor-2017.2.0xb6Linux/Editor/Unity'

results in,

sudo: unable to execute /media/removable/USB Drive/unity-editor-2017.2.0xb6Linux/Editor/Unity: Permission denied
Hangup

I’ve tried both chmod and chown on the entire USB. The file is marked as an executable file in its properties and has r+w privileges for all. Finally, the USB is ext4. What could I be missing?

Mount flags/umask on the drive? Are you able to run any executable from it?

I’m not able to run other exes from it, so it must be the drive. How would I go about changing the mount flags?

EDIT:
Nevermind! Turns out it was the mount flags. After a little looking at the man page for mount, I ended up remounting it with the exec option and Unity now runs perfectly. Thank you!

Hello is this possbile to do in windows ? My usb became ‘write protected’