Fli
04-04-2020, 11:24 AM
After unclean drive disconnect on Linux i have seen error mounting the VeraCrypt encrypted container file:
Error: $MFTMirr does not match $MFT (record 0).
Failed to mount '/dev/loop0': Input/output error
NTFS is either inconsistent, or there is a hardware fault, or it's a
SoftRAID/FakeRAID hardware. In the first case run chkdsk /f on Windows
then reboot into Windows twice. The usage of the /f parameter is very
important! If the device is a SoftRAID/FakeRAID then first activate
it and mount a different device under the /dev/mapper/ directory, (e.g.
/dev/mapper/nvidia_eahaabcc1). Please see the 'dmraid' documentation
for more details.
And i was able to fix it. Here is what i did:
I was afraid to do any modification to a container file (using ntfsfix tool for example) so i copied the file to a external HDD.
After connecting the external HDD to a Windows computer, i found that this ext. partition does not appear in Windows explorer. In the Disk manager i found the folume but was unable to assing a letter to it. Using other software (Minitool partition wizard) i found the partition is filesystem type EXT4. Then i found free software that can read files in such partitions and copy it into standard Windows partitions. Software is: DiskInternals Linux Reader.
After copying the file using that app, i ran Veracrypt on Windows and surprisingly (unlike on Linux Raspbian) mounted this container without problem. After mounting, i could right click the mounted drive in Veracrypt and select Repair filesystem option. It found and repaired one problem:
1 unindexed files scanned.
Recovering orphaned file abc.ext (137941) into directory file 719.
1 unindexed files recovered to original directory.
0 unindexed files recovered to lost and found.
Stage 3: Examining security descriptors ...
Security descriptor verification completed.
14767 data files processed.
CHKDSK is verifying Usn Journal...
Usn Journal verification completed.
Correcting errors in the master file table's (MFT) BITMAP attribute.
Correcting errors in the master file table's (MFT) BITMAP attribute.
Windows has made corrections to the file system.
Then i moved the fixed container file back to Linux Raspbian and mounted without problem:
ntfs-3g[11634]: Version 2017.3.23AR.3 integrated FUSE 28
ntfs-3g[11634]: Mounted /dev/loop0 (Read-Write, label "", NTFS 3.1)
ntfs-3g[11634]: Cmdline options: rw,uid=1001,gid=1001,umask=077
ntfs-3g[11634]: Mount options: allow_other,nonempty,relatime,rw,default_permissio ns,fsname=/dev/loop0,blkdev,blksize=4096
ntfs-3g[11634]: Global ownership and permissions enforced, configuration type 7
Error: $MFTMirr does not match $MFT (record 0).
Failed to mount '/dev/loop0': Input/output error
NTFS is either inconsistent, or there is a hardware fault, or it's a
SoftRAID/FakeRAID hardware. In the first case run chkdsk /f on Windows
then reboot into Windows twice. The usage of the /f parameter is very
important! If the device is a SoftRAID/FakeRAID then first activate
it and mount a different device under the /dev/mapper/ directory, (e.g.
/dev/mapper/nvidia_eahaabcc1). Please see the 'dmraid' documentation
for more details.
And i was able to fix it. Here is what i did:
I was afraid to do any modification to a container file (using ntfsfix tool for example) so i copied the file to a external HDD.
After connecting the external HDD to a Windows computer, i found that this ext. partition does not appear in Windows explorer. In the Disk manager i found the folume but was unable to assing a letter to it. Using other software (Minitool partition wizard) i found the partition is filesystem type EXT4. Then i found free software that can read files in such partitions and copy it into standard Windows partitions. Software is: DiskInternals Linux Reader.
After copying the file using that app, i ran Veracrypt on Windows and surprisingly (unlike on Linux Raspbian) mounted this container without problem. After mounting, i could right click the mounted drive in Veracrypt and select Repair filesystem option. It found and repaired one problem:
1 unindexed files scanned.
Recovering orphaned file abc.ext (137941) into directory file 719.
1 unindexed files recovered to original directory.
0 unindexed files recovered to lost and found.
Stage 3: Examining security descriptors ...
Security descriptor verification completed.
14767 data files processed.
CHKDSK is verifying Usn Journal...
Usn Journal verification completed.
Correcting errors in the master file table's (MFT) BITMAP attribute.
Correcting errors in the master file table's (MFT) BITMAP attribute.
Windows has made corrections to the file system.
Then i moved the fixed container file back to Linux Raspbian and mounted without problem:
ntfs-3g[11634]: Version 2017.3.23AR.3 integrated FUSE 28
ntfs-3g[11634]: Mounted /dev/loop0 (Read-Write, label "", NTFS 3.1)
ntfs-3g[11634]: Cmdline options: rw,uid=1001,gid=1001,umask=077
ntfs-3g[11634]: Mount options: allow_other,nonempty,relatime,rw,default_permissio ns,fsname=/dev/loop0,blkdev,blksize=4096
ntfs-3g[11634]: Global ownership and permissions enforced, configuration type 7