Mount error in Linux: invalid argument

hi

i have an android phone which i think is bricked, so wanted to see what the actual issue is, I flashed it with TWRP recovery image and launched terminal i, was able understand that mount is not happening, it says invalid argument and no such file or directory. Below is what i get while mounting

mount -a 
mount :mounting /dev/block/mmcblk0p21 on /system failed: invalid argument.

tried to do an e2fsck also, it says 

e2fsck  /dev/block/mmcblk0p21 

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

I tried deleting /system and creating, dint work, tried to mount in a different mount point still dint work, please help

What are you trying to achieve overall?

Have you successfully flashed TWRP? Can you boot into TWRP recovery by holding whatever buttons on the Android as you power up?

What make/model of phone/tablet is it?

If you can boot TWRP recovery it should give you a menu offering all kinds of things like formatting different partitions, possibly resizing partitions, etc.

If you can boot into TWRP then your device is certainly NOT bricked.

Hi
My intention is to flash a rom so that the phone works

I was able to flash twrp via nexus root tool but once it reboots it goes back to te boot loader screen

Phone is lg nexus 4

From fastboot boot and twrp and tried from nexus tool. also, I tried to flash the rom but it says The above error and is not mounting either system, cache or any mount,

so trying to mount manually Using the terminal in twrp

Please help

Are you sure that you successfully flashed your recovery partition with TWRP? Did you unlock your bootloader first?

See this:
How to Boot and Enter Google Nexus 4 Recovery Mode

You should be able to hold buttons (see the link) when you power up and then boot into recovery. If you can do that then you should be able to put your new ROM file onto your memory card (using a PC), insert it into your phone, boot recovery, and then select "flash ROM from SDcard".

Are you actually getting a TWRP menu on the screen?

If you have no SDcard slot then you can use a USB memory stick if you have the right cable.

lg nexus 4 sd card slot - Google Search

Yes I have unlocked the boot loader at the moment if you turn on the phone it default loads the boot loader nothing else works from here

I am getting all options on the twrp but no options work

LG Nexus 4

Tried as well but still only boot loader loads and twrp is not loading even with button combo. Only loads with nexus tool

---------- Post updated at 12:16 AM ---------- Previous update was at 12:15 AM ----------

I think the mount issue should be fixed as it loads only tempfs only

What command did you use to flash TWRP recovery?

 fastboot flash recovery twrp.img

Have you got fastboot drivers on your PC?

Yes the same command it says flash write error.
Fast boot drivers are good as I am able to see the device listed and other devices also and able to flash them.

I think that I would go back to the factory stock image first, and then start again with bootloader unlock, etc.

[Guide]How to flash a Nexus Factory Image manually. - Android Development | Android Forums

Thanks so much for your quick support on this

Even that is not happening I tried al most all methods then found that there is mount error

Unless you believe that the internal memory card has gone bad I wouldn't give up just yet.

Is there a later version of TWRP (and perhaps specific to your phone) that you could try?

I have tried with 3.1 mako which is the latest for this phone,
I was actually able to delete and re create directories, files and do all other operations except the mount which has that super block issue.

Are you holding both volume up and volume down buttons when powering up?

Have you tried Clockwork Mod recovery instead? (See the link that I posted previously)

At the moment once the device is powered on it default loads to the fastboot screen, power and volume up loads a blank screen, have to reboot it.
Clockwork mod or any other recovery is not flashable, could load the twrp also with nexus root tool only

target didn't report max-download-size
sending 'recovery' (7008 KB)...
OKAY [  0.422s]
writing 'recovery'...
FAILED (remote: flash write failure)
finished. total time: 0.438s

this is the error i get

---------- Post updated at 06:23 AM ---------- Previous update was at 06:05 AM ----------

using twrp, i went into logs, and found the below

E: failed to write /dev/block/mmcblk0p19: I/O error
could not mount /data and unable to find crypto footer
failed to mount /data invalid argument
unable to recreate /data/media folder
failed to mount /cache invalid argument

also when i used the file manager i could see all the directories but nothing is there in them

please help ...

It seems that the flashing of TWRP recovery to the phone has failed.

In order for this to work you must have:

  1. Unlocked the bootloader
  2. Rooted the phone
  3. Have adb running on your PC
  4. Have USB debug enabled on the phone

Then:

 
 fastboot flash recovery <TWRPxxxxx.img>
 

should succeed.

If you hold the required buttons (vol dwn or perhaps vol dwn+vol up) when you power up, which recovery do you get???? If it's the original recovery that the phone comes with then you should be able to flash a stock ROM onto it and then start again from there.

cannot enable the debug on the phone as it does not boot at all...

i am able to flash the twrp recovery and did all the flashing via nexus tool kit as per the previus guide shared, dint show any error but after everything it rebooted to boot loader again, and i tried to start it and it stays on the balck screen....

---------- Post updated at 11:11 AM ---------- Previous update was at 10:48 AM ----------

hi what ever i do it always says below for /system, /data , cache

failed to mount /system invalid argument