Unable to restore TWRP backup: "Failed to mount /system (Structure needs cleaning)" - Xiaomi Mi Mix 2 Questions & Answers

Unable to restore TWRP backup: "Failed to mount /system (Structure needs cleaning)"
Chiron latest version of TWRP, LOS15.1 and 16.0
I wanted to revert to the backup I made before upgrading to LOS16. So I launch TWRP, press restore, select all partitions, and I get to the Data partition when it says "extractTarFork() process ended with ERROR: 255".
I try again, this time without restoring the data partition, and I get to the very end of the process before it says "Failed to mount '/system' (Structure needs cleaning)". I try to repair /system, it fails. I format it to ext4, no help.
Now I've stopped trying anything. The phone can't be turned off, it'll just boot to fastboot, so I've left it on TWRP.
Edit: Alright. Formatted data, wiped System and Cache, installed the latest nightly of 15.1, installed the version of GApps I wanted, booted up just fine. Tried the restore, and it made it all the way through, no ERROR 255, nothing, until the very very end, when it again failed to mount /system, Structure needs cleaning. Rebooting to system sends me to fastboot.

Related

[HELP!] I can't mount data.

In Clockwork Recovery:
I get an error saying "cant mount dev/block/mmcblk0p1 (file exists)" when I try to wipe, mount, or advance restore the data partition.
In RA:
it says invalid argument
Mount data in adb says:
"mounting /dev/block/mmcblk0p1 on /data failed: Invalid argument"
Is this a hardware problem with my memory.
I was useing CM 6.0.1 and the last thing i did was allow windows to format the internal memory when i plugged it it.
Will using an RUU help or brick?
Any help is appreciated.
Thanks for the help guys!
Anyways, I figured it out on my own. I was afraid of flashing an RUU when DATA cant be mounted, so i decided to restore the stock RECOVERY and turn S-ON so I could call Big Red and say their OTA jacked up my phone.
To do so, I downloaded a stock nandroid backup and started to advance restore the partitions I could (boot, system, cache). Just to see what happens I booted up the phone and to my surprise.. it worked properly. I still dont know what happened or why.
Oh, also , i used Amon Ra Recovery to format the internal storage before I started restoring via nandroid. Hope my little ordeal helps someone if they come across the same problem.

[Q] Cannot backup via nandroid

After I flashed this d2we (v1.5) rom http://forum.xda-developers.com/showthread.php?p=11860001 , I decided to upgrade my recovery through Rom Manager.
I succeeded, but I cannot nan backup with it.
I flash the update.zip, I start the backup, it gets stuck on "Backing up Data..." (although the bar is full), and after a long waiting it says
"Error in CACHE:recovery/log
(No space left on device)"
I don't know how much space is left in my internal memory, because I'm using d2we, but I think it's supposed to be empty due to the d2we. anyway, is it suppose to interrupt?
Maybe a wipe will help things up?
Thanks!
Recovery info? Phone info? Bootloader version?
CWM 2.5.0.7.
What do u mean by phone info? (if amoled/slcd then it's amoled)
Where can I find the Bootloader version? (is it the HBOOT? if so, then it's 0.75)
Thank you for trying to help!
Maybe your /cache partition is full. Try doing Wipe Cache in recovery.
Clear cache.
If it does not works from recovery, then can try fastboot or ADB.
But it should in 2.5.0.7.
Still the same after I wiped the cache.
Could it be that it says that the cache was wiped, but it actually wasn't?
Try it from fastboot with erase cache command: Guide here.
Just skip the first two and start form getting into fastboot.
It will need the HBoot USB drivers (the same used for Unrevoked).
It did finish the backup; however, now it says
E:Can't mount /dev/block/mmcblk0p2
(File exists)
Could not mount sd-ext. sd-ext backup may not be supported on this device. Skipping backup of sd-ext.
Is it normal with d2we?
Anyway thank you very much, I can finally backup!
http://forum.cyanogenmod.com/topic/6433-solved-messed-up-partitions-on-internal-storage/
http://forum.xda-developers.com/showthread.php?t=809714
http://androidforums.com/incredible-all-things-root/124971-e-cant-mount-dev-block-mmcblk0p2-file-exists.html

Can't restore TWRP /data backup

Hi,
Hope you guys can help me getting my data back.
I messed around with Substratum in legacy mode on OOS 4.1.0 and ended up with a bootloop (I never saw the boot animation restart, just looping endlessly). To fix, I tried the following things:
Flashed the SubstratumRecovery_legacy.zip in TWRP 3.1.0-0 without any effect.
Dirty-flashed OnePlus3Oxygen_16_OTA_047_all_1703132116_f7372e67 without any effect.
Flashed OnePlus3Oxygen_16_OTA_047_all_1703132116_f7372e67 through ADB sideload without any effect.
Wiped data partition in recovery. System started normally, all data gone (obviously).
Before wiping, I had made a backup of my /data partition (through TWRP backup tool for Mac) and saved the content of /sdcard on the computer as well.
Now when I try to restore the /data backup through the same tool, I get an error:
E:Unable to find file system (first period).
E:Unable to find file system (first period).
E:Unknown restore method for '/data'
ADB Restore failed.
So what can I do to restore my data partition? That's all I care about.
Thanks in advance
Mount data in twrp?..
ASFAIK, /data is mounted rw automatically by TWRP. It also doesn't make a difference.
Moreover, I also cannot restore my boot partition (kernel), same error.
A while ago I changed my filesystem to f2fs. Can that be the culprit?
Nevermind, I've given up and accepted the loss of data. However, it would still be interesting to find out what the problem was
I had the same problem, tried several times. Then I went back and turned of the md5 check and it worked perfect.
Do u still have ur trwp backup or did u delete it
https://forum.xda-developers.com/showpost.php?p=53913623&postcount=22
I still have it on the computer and wouldn't mind making use of it (installed official Resurrection Remix after the data loss but that just wiped my /data partition after backing up kernel in TWRP)
@Bradl79: sounds interesting, will give that a go later when I have some time.

Problems with data partition

Hi,
I tried to flash viperOS using squid twrp for moto G5S, but something in the process i think i did wrong.
My phone model is montana xt1790.
I unlocked the bootloader.
I tried to install the recovery, but had same problem than @dau999
dau999 said:
Bootloader gives me a notification that the img is not signed or corrupt (squids one)
Click to expand...
Click to collapse
I tried to flash "no-verity-opt-encrypt-5.1.zip" file posted as solution here https://forum.xda-developers.com/showpost.php?p=74813124&postcount=23.
After this i have working the recovery, but i believe this is what did wrong:
With debug mode enabled, after a wipe clean (Cache, Data, Dalvik/ART and system) and format data (wipe all your apps, backups, pictures, videos, media and removes encryption on internal storage) got this errors:
Code:
Could not mount /data and unable to find crypto folder.
Failed to mount '/data' (Invalid argument)
Unable to recreate /data/media folder.
Unable to mount storage.
Unable to mount /data/media/TWRP/.twrps
Failed to mount '/data' (Invalid argument)
After this errors i flashed ViperOS, but after first boot it, first thing viper OS ask me was the phone password, after i enter it, the phone show up a message saying that password is ok but data is corrupt, restarting and trying to fix my phone without success (same errors like failed to mount /data)
Also i tried to use the "repair or change file system" selecting Data partition, twrp show me this: http://oi65.tinypic.com/2prin8y.jpg, also i got this errors:
Code:
/sbin/fsck.f2fs /dev/block/mmcblk0p54 process ended with ERROR: 255
Unable to repair Data
What should i do?, i don't know is related with an encryption on data partition, or if this can be solve.
EDIT:
Found the solution in reddit: www.reddit.com/r/AndroidQuestions/comments/7w5c75/used_the_format_data_option_in_twrp_recovery_on/
Just fixed the issue after making a second format in TWRP ( WIPE > FORMAT DATA)

Restoring a backup fails with "failed to mount /system (Structure needs cleaning)"

Restoring a backup fails with "failed to mount /system (Structure needs cleaning)"
I am an idiot
Read on Reddit that to delete GApps from LineageOS 15.1 and install microG, I had to wipe /system, flash LineageOS, install microG.
So I made a complete backup of every partition, backed that up on my computer, wiped /system, flashed the latest nightly of LOS , booted up to no GApps, perfection. Tried installing microG only to learn that it won't work, so I go back to TWRP, press Restore and select my backup, only to be met with "failed to mount /system (invalid argument)". Cue panic attack.
So I google furiously for a solution and find something. Advice is to wipe /system only, change it's file system to ext4 again, then Restore only the /system partition from my backup. I do that, and now I'm met with the current error "failed to mount /system (Structure needs cleaning)". I'm going to wait for some solid advice from people who know far more than me before doing anything else.
Tried flashing LOS and I get the same error
Update 2: changed filesystem to ext4 (even though it was already there), wiped system, successfully flashed LOS, restored only the Data partition of my backup. Boot to system, success, but I'm still without GApps when I want them back. Tried restoring entire backup again, same issue, failed to mount system.
stupidcanuck said:
Update 2: changed filesystem to ext4 (even though it was already there), wiped system, successfully flashed LOS, restored only the Data partition of my backup. Boot to system, success, but I'm still without GApps when I want them back. Tried restoring entire backup again, same issue, failed to mount system.
Click to expand...
Click to collapse
Format system as ext4, install the rom (as you explained in the update 2) and boot to system once.
Reboot to recovery again and install the gapps zip file and wipe cache only.

Categories

Resources