Unable to flash firmware - medkit

from the rescue shell try fdisk /dev/mmcblk0 and see whether it produces any error.

Perhaps also see Controller never released inhibit bit(s) since the output/symptoms seem similar.