Couldn't acquire root after running superboot I've already done all steps for getting root at my MotoG (2nd generation) but still can't acquire the privilege.


Unlocked bootloader:


Started developer mode + USB debug
Ran fastboot oem unlock UNLOCK_CODE



I'm even getting the "warranty void" message at startup, so it seems that the bootloader was really unlocked.


Getting root privileges:


Downloaded r2-motog-superboot
Went to fastbook screen again with developer mode + UDB debugging
ran sudo chmod +x superboot-linux.sh and sudo ./superboot-linux.sh



The superboot-linux.sh has only these two commands:

 chmod +x fastboot-linux
 ./fastboot-linux boot boot.superboot.img


The phone restarted but superuser wasn't installed and no root privilege acquired. What can I be missing? Thanks
Because that way (superboot) is old and doesn't work on the current software releases, TBH I am surprised it still boots at all after that, probably because you just just manually booted it and didn't flash it. 

I will assume this is the Titan (non-LTE) version. The proper way to do this if you are unlocked is simple... Download the latest TWRP for your device and SuperSU and place the later on your device.

Start the device in bootloader mode, and in the terminal enter

sudo fastboot boot twrp.img &lt;- Replace filenames with appropriate ones for your installation

Once TWRP is loaded, Install (flash) SuperSU ZIP you downloaded from the link above.

Reboot, enjoy root on your device. 

BTW, you didn't mention your Linux distro or fastboot version, you may need to get the current releases from the Android Dev package if your repos do not have current ones.