Moto g partitions deleted .How to flash internal partitions again Emmc UPDATE

I have found this xda post with the partition table and sizes of the moto g.
http://forum.xda-developers.com/showpost.php?p=48855450&amp;postcount=35

I also found this xda post where they partition the emmc 
http://forum.xda-developers.com/showthread.php?t=2596521
, if someone could help me identify what should I put in adb.

My first gen moto g is stuck in a bootloop, everything i have done so far has not worked.I have tried to flash using fastboot and mfastboot with diferent stock images in all I get failed to erase partition, remote failure.

The internal storage says it has 0 mb of space.
I have Twrp installed and using cat /proc/partitions finds no partitions

~ # ←[6ncat /proc/partitions
cat /proc/partitions
major minor  #blocks  name

I have managed to push a Stock rom but can´t flash it with mount data error,mount sd card error, mount system error and mount cache error..

I have tried to use Adb remount but it fails

remount failed: Success

Any help will be greatly appreciated
Assuming you selected correct partition info file (I didnt verify that from first link you posted, so thats up to you), I will only tell you what you asked-> What to really do in terminal from that tutorial.

Part one of tutorial is settings up ADB and getting things ready. You can also follow this tutorial to get adb ready. Then its about backing up things and getting ready (follow tutorial for all steps).

Part two is where main terminal process begins and all you have to really enter in terminal is those commands inside "boxes" (or code area). Just be open minded and read the outputs and interpret them carefully.

If you are trying to repartition and assuming partitions are corrupt because of this->


  I have managed to push a Stock rom but can´t flash it with mount data
  error,mount sd card error, mount system error and mount cache error..


Then dont. Because your method of mounting partitions from adb is kinda... (incomplete?). Try entering these commands first and then flashing (whatever method you are using from adb)->

adb shell
su
mount -o rw,remount -t yaffs2 /system
mount -o rw,remount -t yaffs2 /data
mount -o rw,remount -t yaffs2 /cache


This should mount your partitions and you should be able to proceed with flashing. Even if you want to flash through twrp, you can go to Mounts option and make sure system, data, sdcard, cache etc is mounted by check marking them. Though I still cant understand how you are trying to flash a stock rom through sdcard/adb (I never owned a moto so idk what methods are used for flashing process).... but anyway, I told you method to mount those partitions. You need root to use those commands. See if they work. Because a mount error does not mean partitions are corrupt in any way.
And make sure that adb can access your phone as root.