Hi,

On 11/22, Stephanos Mallouris wrote:
> Dear all,
> 
> I have backup my f2fs android partition via netcat and adb.
> After loosing the original partition, tried to restore it on a local
> drive and access it via linux but i am encountering the following
> issues:
> 
> A. trying the command
> 
>  sudo mount -t f2fs /dev/sdc1 /mnt
> 
> gives the following error
> 
>  F2FS-fs (sdc1): Failed to read root inode
> 
> B1. Tried to fsck the file system , see bellow:
> 
> sudo fsck.f2fs -a  /dev/sdc1
> 
> result:
> 
> Info: Fix the reported corruption.
> Info: sector size = 512
> Info: total sectors = 22310913 (10894 MB)
> Info: MKFS version
>   "Linux version 4.1.46-EliteKernelReborn-v5+ (hassanmirza01@ubuntu)
> (gcc version 4.9 20150123 (prerelease) (GCC) ) #1 SMP PREEMPT Fri Jan
> 19 17:16:04 PKT 2018"
> Info: FSCK version
>   from "Linux version 4.4.0-169-generic (buildd@lgw01-amd64-022) (gcc
> version 5.4.0 20160609 (Ubuntu 5.4.0-6ubuntu1~16.04.12) ) #198-Ubuntu
> SMP Tue Nov 12 10:34:23 UTC 2019"
>     to "Linux version 4.4.0-169-generic (buildd@lgw01-amd64-022) (gcc
> version 5.4.0 20160609 (Ubuntu 5.4.0-6ubuntu1~16.04.12) ) #198-Ubuntu
> SMP Tue Nov 12 10:34:23 UTC 2019"
> Info: superblock features = 0 :
> Info: superblock encrypt level = 0, salt = 00000000000000000000000000000000
> Info: total FS sectors = 22310912 (10894 MB)
> Info: CKPT version = 1307e4
> Info: No error was reported
> 
> Still unable to mount the partiotion , gives the same error.
> 
> B2. Tried
> sudo fsck.f2fs -f  /dev/sdc1

Could you try: fsck.f2fs -d 3 -f /dev/sdc1?
It seems you didn't back up the entire partition which is missing root inode
block.

Thanks,

> 
> result
> 
> Info: Force to fix corruption
> Info: sector size = 512
> Info: total sectors = 22310913 (10894 MB)
> Info: MKFS version
>   "Linux version 4.1.46-EliteKernelReborn-v5+ (hassanmirza01@ubuntu)
> (gcc version 4.9 20150123 (prerelease) (GCC) ) #1 SMP PREEMPT Fri Jan
> 19 17:16:04 PKT 2018"
> Info: FSCK version
>   from "Linux version 4.4.0-169-generic (buildd@lgw01-amd64-022) (gcc
> version 5.4.0 20160609 (Ubuntu 5.4.0-6ubuntu1~16.04.12) ) #198-Ubuntu
> SMP Tue Nov 12 10:34:23 UTC 2019"
>     to "Linux version 4.4.0-169-generic (buildd@lgw01-amd64-022) (gcc
> version 5.4.0 20160609 (Ubuntu 5.4.0-6ubuntu1~16.04.12) ) #198-Ubuntu
> SMP Tue Nov 12 10:34:23 UTC 2019"
> Info: superblock features = 0 :
> Info: superblock encrypt level = 0, salt = 00000000000000000000000000000000
> Info: total FS sectors = 22310912 (10894 MB)
> Info: CKPT version = 1307e4
> Info: checkpoint state = 1 :  unmount
> [ASSERT] (sanity_check_nid: 362)  --> nid[0x3] ino is 0
> 
> [FSCK] Unreachable nat entries                        [Ok..] [0x0]
> [FSCK] SIT valid block bitmap checking                [Ok..]
> [FSCK] Hard link checking for regular file            [Ok..] [0x0]
> [FSCK] valid_block_count matching with CP             [Ok..] [0x0]
> [FSCK] valid_node_count matcing with CP (de lookup)   [Ok..] [0x0]
> [FSCK] valid_node_count matcing with CP (nat lookup)  [Ok..] [0x0]
> [FSCK] valid_inode_count matched with CP              [Ok..] [0x0]
> [FSCK] free segment_count matched with CP             [Ok..] [0x1519]
> [FSCK] next block offset is free                      [Ok..]
> [FSCK] fixing SIT types
> [FSCK] other corrupted bugs                           [Fail]
> [move_curseg_info:1471] Move curseg[0] 0 -> 0 after 5000
> [move_curseg_info:1471] Move curseg[1] 1 -> 1 after 5000
> [move_curseg_info:1471] Move curseg[2] 2 -> 2 after 5000
> [move_curseg_info:1471] Move curseg[3] 3 -> 3 after 5000
> [move_curseg_info:1471] Move curseg[4] 4 -> 4 after 5000
> [move_curseg_info:1471] Move curseg[5] 5 -> 5 after 5000
> 
> Done.
> 
> 
> 
> Trying to mount it , no success, gives
> 
> F2FS-fs (sdc1): Failed to read root inode.
> 
> 
> Any help or advice will be much appreciated.
> Keep up the great work on f2fs.
> 
> Kindest Regards
> 
> Stephanos Mallouris
> 
> 
> _______________________________________________
> Linux-f2fs-devel mailing list
> Linux-f2fs-devel@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/linux-f2fs-devel


_______________________________________________
Linux-f2fs-devel mailing list
Linux-f2fs-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/linux-f2fs-devel

Reply via email to