I have a raspbian installed on SD on my raspi 3 and I wanted to download a crypto currency and compile it on the pi. However my SD is just 8GB and already full so I wanted to run that whole compiling process from USB. However when I try to download the project using git clone, the ssh connection dies and when I reconnect, the raspi has rebooted, all mounts are gone and I have to start again.
First thought was maybe a damaged USB stick so I tried another one. It's a new 32GB stick but the same happens.
pi@raspberrypi:~ $ uname -a Linux raspberrypi 4.9.35-v7+ #1014 SMP Fri Jun 30 14:47:43 BST 2017 armv7l GNU/Linux
The power the device pulls seems normal 200mA
pi@raspberrypi:~ $ sudo lsusb -v|grep Power (Bus Powered) MaxPower 200mA
I also tried upgrading and dist-upgrading the device but that didn't help either. What could be the problem here?
Edit: Same happens now when I try to pull it to the SD card?
remote: Counting objects: 22788, done. remote: Total 22788 (delta 0), reused 0 (delta 0), pack-reused 22788 Receiving objects: 100% (22788/22788), 23.12 MiB | 2.59 MiB/s, done. Resolving deltas: 85% (14527/17044)
Stops and reboots at 19% or 70% or 85% or any other random %