I'm not very sure about this, but there's a way to format all the internal records partitions except the data partition via fastboot.. Maybe your recovery partition is corrupted.. If you don't want to do that, you can try this:
I had done this by mistake, but it helped me.. fastboot flash boot recovery.zip
This will flash your recovery to your boot partition.. Then, if you restart the phone, you'll be directly taken to the recovery.. Sideload a ROM and flash it.. If successful, you'll boot into the new ROM.. Then you can figure out how to format your recovery partition and install your recovery to the right partition..
Sent from my HTC One using Tapatalk 4
Always hit the "Thanks" Button