[Moto G Q&A, Help & Troubleshooting] ravibhat:
[MENTION=1006674]lost101[/MENTION] :

ok here's the new o/p

~ # ←[6nmke2fs -n /dev/block/mmcblk0p36

mke2fs -n /dev/block/mmcblk0p36

mke2fs 1.42.9 (28-Dec-2013)

/dev/block/mmcblk0p36 is apparently in use by the system; will not make a filesy

stem here!

~ # ←[6numount /data

umount /data

~ # ←[6nmke2fs -n /dev/block/mmcblk0p36

mke2fs -n /dev/block/mmcblk0p36

mke2fs 1.42.9 (28-Dec-2013)

Filesystem label=

OS type: Linux

Block size=4096 (log=2)

Fragment size=4096 (log=2)

Stride=0 blocks, Stripe width=0 blocks

846976 inodes, 3386336 blocks

169316 blocks (5.00%) reserved for the super user

First data block=0

Maximum filesystem blocks=3468689408

104 block groups

32768 blocks per group, 32768 fragments per group

8144 inodes per group

Superblock backups stored on blocks:

32768, 98304, 163840, 229376, 294912, 819200, 884736, 1605632, 2654208

~ # ←[6n e2fsck -b 4096 /dev/block/mmcblk0p36

e2fsck -b 4096 /dev/block/mmcblk0p36

e2fsck 1.42.9 (28-Dec-2013)

e2fsck: Bad magic number in super-block while trying to open /dev/block/mmcblk0p

36

The superblock could not be read or does not describe a correct ext2

filesystem. If the device is valid and it really contains an ext2

filesystem (and not swap or ufs or something else), then the superblock

is corrupt, and you might try running e2fsck with an alternate superblock:

e2fsck -b 8193 <device>

~ # ←[6n mke2fs -b 4096 -g 32768 -S /dev/block/mmcblk0p36

mke2fs -b 4096 -g 32768 -S /dev/block/mmcblk0p36

mke2fs 1.42.9 (28-Dec-2013)

Filesystem label=

OS type: Linux

Block size=4096 (log=2)

Fragment size=4096 (log=2)

Stride=0 blocks, Stripe width=0 blocks

846976 inodes, 3386336 blocks

169316 blocks (5.00%) reserved for the super user

First data block=0

Maximum filesystem blocks=3468689408

104 block groups

32768 blocks per group, 32768 fragments per group

8144 inodes per group

Superblock backups stored on blocks:

32768, 98304, 163840, 229376, 294912, 819200, 884736, 1605632, 2654208

Allocating group tables: done

Writing superblocks and filesystem accounting information: done

~ # ←[6n e2fsck /dev/block/mmcblk0p36

e2fsck /dev/block/mmcblk0p36

e2fsck 1.42.9 (28-Dec-2013)

ext2fs_open2: Bad magic number in super-block

e2fsck: Superblock invalid, trying backup blocks...

e2fsck: Bad magic number in super-block while trying to open /dev/block/mmcblk0p

36

The superblock could not be read or does not describe a correct ext2

filesystem. If the device is valid and it really contains an ext2

filesystem (and not swap or ufs or something else), then the superblock

is corrupt, and you might try running e2fsck with an alternate superblock:

e2fsck -b 8193 <device>

~ # ←[6n mount /data

mount /data

d~ # ←[6ndf

ddf

/sbin/sh: ddf: not found

~ # ←[6ndf

df

Filesystem 1K-blocks Used Available Use% Mounted on

tmpfs 445808 32 445776 0% /dev

tmpfs 445808 445808 0 100% /tmp

/dev/block/sda1 15133280 14309984 823296 95% /usb-otg

/dev/block/mmcblk0p33

667328 107216 560112 16% /cache

/dev/block/mmcblk0p36

13543280 9942104 3503016 74% /data

~ # ←[6n

I will take this to the service centre and see if those guys can help,if not,i'll try upgrading the bootloader.

BTW how did you infer that the bootloader is corrupt?

I was able to boot directly into TWRP,Philz Touch but not flash them i.e. mfastboot boot twrp.img works while mfastboot flash recovery twrp.img will revert back to stock recovery after reboot.

Also i thought the problem is with the partition table and maybe the internal sd card and not the bootloader as such.

[MENTION=6335704]sjandroiddeveloper[/MENTION] : any thoughts on this?