Failed to mount '/data' (invalid argument)

Jan 2, 2016
13
1
0
please guys, help me i m stuck in TWRP recovery i was trying to repartition my mi3 system space using Repartition_MI3W_1_2GB zip file as instructed on miui forum but after repartion when i was trying to wipe my data while flasing in rom its show E:primary block device '/dev/block/platform/msm_sdcc.1/by-name/userdata' for mount point '/data' is not present !
Failed to mount '/data' (invalid argument)
unable to recreate /data/media folder.
.......same Failed to mount argument
unable to mount storage..
please folks help me asap
Thanking you in advance.:confused::confused::confused::mad:
 

1immortal

Senior Member
Aug 19, 2007
1,031
463
103
Petah Tiqwa
dogodroid.comuf.com
for fixing that, you need to flash the stock MIUI dev rom via Xiaomi's software.
this will repartition everything, and flash the correct file structure to your phone.
had that issue few times with different patches/repartitions, just follow the MIUI tutorials on how to flash MM rom correctly.
GL!
 
  • Like
Reactions: Devenderchouhan
Jan 2, 2016
13
1
0
thanks for your reply

for fixing that, you need to flash the stock MIUI dev rom via Xiaomi's software.
this will repartition everything, and flash the correct file structure to your phone.
had that issue few times with different patches/repartitions, just follow the MIUI tutorials on how to flash MM rom correctly.
GL!
can u please tell me which software you are talking about..?
pls reply asap
 

rajumack07

Senior Member
Aug 5, 2011
157
64
48
Bhubaneswar
I think if you should use the above link shared by @1immortal then make sure to select the flash all radio button at the bottom of the MiFlash app and also you should click on the down arrow besides the Browse button > then advanced > and then select "Flashall.bat" from the fastboot image folder and then flash it.
Note: This would delete the data partition and recreate it (I think you would already have lost your internal data).
If this didn't solve your problem, then there are other ways also like edl mode just google it you will find many threads or if there's ways if anyone else could point it out for if they would have faced these issue, then you're good to go. :)
 
Last edited:
  • Like
Reactions: Devenderchouhan

Dashur7

Senior Member
Aug 1, 2015
418
102
43
I think if you should use the above link shared by @1immortal then make sure to select the flash all radio button at the bottom of the MiFlash app and also you should click on the down arrow besides the Browse button > then advanced > and then select "Flashall.bat" from the fastboot image folder and then flash it.
I added this line in the flashall.bat file,
fastboot %* flash partition "%~dp0images\gpt_both0.bin" || @.echo "Flash partition" && exit /B 1

Before this line ...
fastboot %* flash tz %~dp0images\tz.mbn

Flashing this flashall.bat worked for me when I had messed up my partitions.:p

Note:----
No '.' before echo.
 
Last edited:
Jan 2, 2016
13
1
0
I added this line in the flashall.bat file,
fastboot %* flash partition "%~dp0images\gpt_both0.bin" || @.echo "Flash partition" && exit /B 1

Before this line ...
fastboot %* flash tz %~dp0images\tz.mbn

Flashing this flashall.bat worked for me when I had messed up my partitions.:p

Note:----
No '.' before echo.
dude how to add all you mention above ...pls explain me in some details
thanks
 

Dashur7

Senior Member
Aug 1, 2015
418
102
43
dude how to add all you mention above ...pls explain me in some details
thanks
I'm assuming that you have the latest fastboot ROM for your device and MiFlash downloaded.

1. Unzip the .tgz file(fastboot file) using any zip extractor and you should get a .tar file.
2. Unzip the .tar file and you should get a folder.
3. Now place the folder into a drive and not within folders. Example:- "E:\folder_name".
4. Open the folder and you should see a few .bat and .sh files. (image 1)path.png
5. Right click and edit the "flash_all.bat"(notepad++ prefered)([url]https://notepad-plus-plus.org/download/v6.9.2.html[/URL])
6. Add that this line as in the image shown(image 2)edit.png
Code:
fastboot %* flash partition "%~dp0images\gpt_both0.bin" || @echo "Flash partition" && exit /B 1
7. Save the file and close it.
8. Open MiFlash, click on browse.
9. Navigate to where you saved your folder and select the images folder inside it and click OK. Example:- "E:\folder_name\images".
10. Click the dropdown arrow on the side of the "Browse" button and select "Advanced".
11. Now click on the browse button near the "FastBoot Script" field and navigate to the edited flash_all.bat. Example:-"E:\folder_name\flash_all.bat".
12. Click OK.
13. Boot your device into bootloader mode and connect it to your PC.
14. After connecting click the "Refresh" button and your device should appear.
15. Select it and press "Flash".
16. Wait patiently for the process to complete and your device should automatically reboot.
17. Hit the thanks button if it worked:D
Else I'll try to solve your problem :cowboy:
 
Last edited:
  • Like
Reactions: Devenderchouhan
Jan 2, 2016
13
1
0
thanks buddy for great response

I'm assuming that you have the latest fastboot ROM for your device and MiFlash downloaded.

1. Unzip the .tgz file(fastboot file) using any zip extractor and you should get a .tar file.
2. Unzip the .tar file and you should get a folder.
3. Now place the folder into a drive and not within folders. Example:- "E:\folder_name".
4. Open the folder and you should see a few .bat and .sh files. (image 1)View attachment 3860603
5. Right click and edit the "flash_all.bat"(notepad++ prefered)([url]https://notepad-plus-plus.org/download/v6.9.2.html[/URL])
6. Add that this line as in the image shown(image 2)View attachment 3860610
Code:
fastboot %* flash partition "%~dp0images\gpt_both0.bin" || @echo "Flash partition" && exit /B 1
7. Save the file and close it.
8. Open MiFlash, click on browse.
9. Navigate to where you saved your folder and select the images folder inside it and click OK. Example:- "E:\folder_name\images".
10. Click the dropdown arrow on the side of the "Browse" button and select "Advanced".
11. Now click on the browse button near the "FastBoot Script" field and navigate to the edited flash_all.bat. Example:-"E:\folder_name\flash_all.bat".
12. Click OK.
13. Boot your device into bootloader mode and connect it to your PC.
14. After connecting click the "Refresh" button and your device should appear.
15. Select it and press "Flash".
16. Wait patiently for the process to complete and your device should automatically reboot.
17. Hit the thanks button if it worked:D
Else I'll try to solve your problem :cowboy:

dude if you feel comfortable then give me your address so that I can send my phone to you coz I tried my best but not able to correct my phone problem or just call me on my number so we can discuss in more details
mob: +919560565607


Thanks a lot for your great response:fingers-crossed::fingers-crossed:
 
Jan 2, 2016
13
1
0
dude if you feel comfortable then give me your address so that I can send my phone to you coz I tried my best but not able to correct my phone problem or just call me on my number so we can discuss in more details
mob: +919560565607


Thanks a lot for your great response:fingers-crossed::fingers-crossed:
dude device is not appearing in miflash tool.
 
Our Apps
Get our official app!
The best way to access XDA on your phone
Nav Gestures
Add swipe gestures to any Android
One Handed Mode
Eases uses one hand with your phone