Where should we store programs on the Onion? Can we make users?
Just got my onion in the mail and did a few simple GPIO python programs to test things out. I noticed that / (and /root) are mounted as r/o, and the only thing with enough space to actually use is /tmp, which doesn't seem to be persisted across reboots. I've been mounting usb devices to /tmp/sda1 instead of /mnt because /mnt is in a r/o partition as well.
What was the intention here? I would love to actually make a user and not log in as root all the time, but the common ways of making users (adduser, useradd) don't seem to be available. Its great that there is a nodejs package now, but I can't install it because I don't have enough space in the partition that it installs to.
I've been storing programs in /root. It's not read-only (at least not on mine).
Clearly shows /root as drwxr-xr-x - i.e. full access as root - the only user that you can use on the Omega (see belwo)
Shows rootfs on / type rootfs (rw) - i.e. / is mounted for read and write
So, unless there is something wrong/odd with you Omega, you can just use /root for your own files
However, before doing so, I would urge that you ensure that your Omega is upgraded to the latest firmware using the command oupgrade - earlier versions of the firmware would cause the contents of /root to be lost over an oupgrade
Regarding adding other users: The Omega runs a very much cut down version of Linux - OpenWrt - originally intended for embedded systems such as routers and the like. As such, it does not have the capabilities for adding additional users. Everything has to be run as root
Finally, regarding available space: if you are concerned about insufficient space on your Omega, you can increase space using a USB drive and following the instructions described here: https://wiki.onion.io/Tutorials/Using-USB-Storage-as-Rootfs
I have done this using a 32GB USB thumb drive and it works well. This will add effective disk space up to the size of your USB drive.
If you need more usable RAM space, you can even set up your Omega with a swap drive using information described in: https://community.onion.io/topic/9/how-to-install-gcc/47
I am currently doing this to provide 1GBytes of swap space
If the problem still persists, try doing a factory reset by holding down the Reset button for 10 seconds and releasing.
Let us know how it goes.
Thanks for the help guys. I don't know what the issue was, or why they were read only, but running
oupgrade -f) and rebooting fixed the issue. I was able to use that wiki that Kit linked to set up the USB storage as well.
I can confirm that adding a USB drive (16GB in my case) according to the instructions in
worked very well. I have written a few simple Python scripts and stored them in /root, and have also installed Ruby and tested a very simple "Hello, World" program. I'm generally very happy with the Onion, but would be even happier to have the Onion's schematic so I can design circuits to take full advantage of the GPIO interface!
@Jeff-Verive We're working on open sourcing the schematics!
Hopefully the GPIO pinouts and diagrams will help in your hardware design: https://wiki.onion.io/Hardware/Omega-Hardware#the-hardware_gpios
Let us know how it goes!