about restoring partition,
1) do you have twrp recovery installed if not flash it.
2) open twrp go to advanced section and click terminal button
3) terminal will show us just type df and then some lines will show up as seen in image
see carefully at right corner my phone (samsung) has /sdcard and /external_sd
so my internal storage is that sdcard one your phone may show internal storage as internal storage so look carefully
what i mean from all this things is to look at left most corner of image against sdcard block no is mmcblk0p23 which is important thing to see then rest is just command
after you find your block just use
replace ?????? with block name for your phones internal storage
and then abra ka dabra your internal storage is alive.
be happy bro.