Nexus 5 with zero-length partitions So something is wrong with either the partition or the eMMC. TWRP is unable to erase/reformat/repair any partition (console lists partitions that fail to mount: /data, /data/media, /system, /cache) and e2fsck -pcfv /dev/block/mmcblk0p27 says it is zero-length partition. In fact, under TWRP, the partition sizes are System(0MB), Data(0MB), Cache(12MB), Boot(22MB), EFS(6MB). Any help?
Probably your best shot at this point is to flash a factory image. Complete instructions are at the top of that page, but the general gist is:


Download and extract the factory image (you'll probably want the latest one - MRA58K)
Boot your device into fastboot mode (in TWRP go to reboot -> bootloader, or run adb reboot bootloader)
Run the flash-all script (make sure that fastboot from the SDK is in your PATH - set PATH=&lt;path-to-fastboot-folder&gt;;%PATH% in windows, and export PATH=&lt;path-to-fastboot-folder&gt;:$PATH in OSX/Linux)
Your device should work again! You'll have to flash TWRP again, though.