FAQ SearchLogin
Tuxera Home
View unanswered posts | View active topics It is currently Wed Nov 25, 2020 10:00



Post new topic Reply to topic  [ 8 posts ] 
Unable mount 4KB sector size USB Truecrypted HD on Odroid C1 
Author Message

Joined: Mon Feb 02, 2015 04:11
Posts: 4
Post Unable mount 4KB sector size USB Truecrypted HD on Odroid C1
Hi,

I get the following error message when I try to mount 3TB large external USB hard drives with an AES encrypted NTFS partition with TrueCrypt on Odroid C1:

Error: Incomplete multi-sector transfer: magic: 0x454c4946 size: 4096 usa_ofs: 48 usa_count: 4 data: 8609 usn: 2: Input/output error
Record 1 has no FILE magic (0x44414142)
Failed to open inode $MFTMirr: Input/output error
Failed to load $MFTMirr: Input/output error
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.

chkdsk /f on Windows finds no errors and so repairs nothing.

The hard drives work on Windows, as well as Debian Wheezy (3.12.35+ # 730 PREEMPT Fri Dec 19 18:31:24 GMT 2014 armv6l - ntfs-3g 15/01/2012) on a RaspberryPi without problems/errors.
Error seems to occur only with hard drives with a sector size of 4KB and Odroid C1. Sector size of 512B is no problem.

The error occurs with the following variants/versions:

2 different WD Elements Desktop 3TB 4KB sector size USB 2.0; WD Elements Desktop 3TB 4KB sector size USB 3.0

Ubuntu 14.04.1 LTS 3.10.66-47 # 1 SMP PREEMPT Fri January 30 20:32:58 BRST 2015 armv7l armv7l armv7l GNU / Linux
Debian Wheezy 03/10/44 - g7302e7a # 1 SMP PREEMPT Sun January 11 08:35:07 CST 2015 armv7l GNU / Linux

ntfs-3g 2014.2.15
ntfs-3g 2013.1.13
ntfs-3g 2012.1.15

truecrypt 7.1a

Who can help or isolate the problem further?
I would be very grateful for any advice!
Thanks in advance for your help/effort/time.


Mon Feb 02, 2015 05:13
Profile
NTFS-3G Lead Developer

Joined: Tue Sep 04, 2007 17:22
Posts: 1286
Post Re: Unable mount 4KB sector size USB Truecrypted HD on Odroid C1
Hi,

Quote:
Error: Incomplete multi-sector transfer: magic: 0x454c4946 size: 4096 usa_ofs: 48 usa_count: 4 data: 8609 usn: 2: Input/output error

The magic header is wrong, and the usa_count should be 8 for a cluster size of 4096.
Quote:
Error seems to occur only with hard drives with a sector size of 4KB and Odroid C1. Sector size of 512B is no problem.

Was the file system formatted for 4K sectors ? Even when having formatted for 512 bytes, it is usable on computers which have a 512 byte emulation for 4K sectors. Please post the output of
Code:
# as root, with disk decryption enabled :
ntfsinfo -fm /dev/the-ntfs-partition

Quote:
The error occurs with the following variants/versions:
[...]
ntfs-3g 2014.2.15
ntfs-3g 2013.1.13
ntfs-3g 2012.1.15

Do not use an ntfs-3g earlier than 2013.1.13AR.2, a bug related to 4K sectors was fixed in that version (ntfs-3g 2013.1.13 is earlier than 2013.1.13AR.2). Please indicate which ntfs-3g version is behaving improperly (Ubuntu or Debian versions are probably unrelated to the issue).
Quote:
Who can help or isolate the problem further?
I would be very grateful for any advice!
Thanks in advance for your help/effort/time.

If your drive is correctly accessed on Ubuntu or Debian, and not on Odroid with the same ntfs-3g version, the bug is probably not in ntfs-3g.

Regards

Jean-Pierre


Mon Feb 02, 2015 09:56
Profile

Joined: Mon Feb 02, 2015 04:11
Posts: 4
Post Re: Unable mount 4KB sector size USB Truecrypted HD on Odroid C1
Hi again,

Quote:
The magic header is wrong, and the usa_count should be 8 for a cluster size of 4096.


Ok, so I wonder why it works on other systems.

Code:
ntfsinfo -fm /dev/the-ntfs-partition


puts out:
Code:
Volume Information
        Name of device: /dev/mapper/truecrypt1
        Device state: 11
        Volume Name:
        Volume State: 27
        Volume Version: 3.1
        Sector Size: 4096
        Cluster Size: 4096
        Index Block Size: 4096
        Volume Size in Clusters: 732565939
MFT Information
        MFT Record Size: 4096
        MFT Zone Multiplier: 0
        MFT Data Position: 24
        MFT Zone Start: 786432
        MFT Zone End: 92357174
        MFT Zone Position: 786432
        Current Position in First Data Zone: 92357174
        Current Position in Second Data Zone: 0
        LCN of Data Attribute for FILE_MFT: 786432
        FILE_MFTMirr Size: 4
        LCN of Data Attribute for File_MFTMirr: 2
        Size of Attribute Definition Table: 2560
FILE_Bitmap Information
        FILE_Bitmap MFT Record Number: 6
        State of FILE_Bitmap Inode: 80
        Length of Attribute List: 0
        Attribute List: (null)
        Number of Attached Extent Inodes: 0
FILE_Bitmap Data Attribute Information
        Decompressed Runlist: not done yet
        Base Inode: 6
        Attribute Types: not done yet
        Attribute Name Length: 0
        Attribute State: 3
        Attribute Allocated Size: 91574272
        Attribute Data Size: 91570744
        Attribute Initialized Size: 91570744
        Attribute Compressed Size: 0
        Compression Block Size: 0
        Compression Block Size Bits: 0
        Compression Block Clusters: 0


Today, i get Arch Linux (3.10.66-1-ARCH #1 SMP PREEMPT Wed Jan 28 18:12:35 MST 2015 armv7l GNU/Linux ntfs-3g 2014.2.15) to work on the Odroid-C1 for test purposes and I wonder, drives work without problems. So I think it's not a C1 problem.

Thank you for the quick response!

Regards


Tue Feb 03, 2015 00:57
Profile
NTFS-3G Lead Developer

Joined: Tue Sep 04, 2007 17:22
Posts: 1286
Post Re: Unable mount 4KB sector size USB Truecrypted HD on Odroid C1
Hi,

Quote:
Quote:
The magic header is wrong, and the usa_count should be 8 for a cluster size of 4096.

Ok, so I wonder why it works on other systems.

What is the ntfs-3g version which went into this error ?
Quote:
Code:
ntfsinfo -fm /dev/the-ntfs-partition

puts out:
[...]

This is formatted for 4K sectors.

If you got the error with a recent ntfs-3g version, please post the contents of sectors 786432 and 786433 (and/or sectors 2 and 3, which should be the same) :
Code:
dd if=/dev/mapper/truecrypt1 skip=786432 bs=4096 count=2 | od -t x1

Please compress the output (required by this forum), and post as an attachment.

Regards

Jean-Pierre


Tue Feb 03, 2015 10:06
Profile

Joined: Mon Feb 02, 2015 04:11
Posts: 4
Post Re: Unable mount 4KB sector size USB Truecrypted HD on Odroid C1
Hi,

Quote:
What is the ntfs-3g version which went into this error ?

Like I wrote, the error occurs with the 3 versions I tried:
ntfs-3g 2014.2.15,
ntfs-3g 2013.1.13 and
ntfs-3g 2012.1.15.

The result of
Code:
dd if=/dev/mapper/truecrypt1 skip=786432 bs=4096 count=2 | od -t x1

is attached. (Sectors 2 and 3, are the same, like you wrote)

Many Thanks again.

Regards


Attachments:
File comment: Master File Table Sector 786432 & 786433
mft_786432.txt.gz [715 Bytes]
Downloaded 1185 times
Tue Feb 03, 2015 23:34
Profile
NTFS-3G Lead Developer

Joined: Tue Sep 04, 2007 17:22
Posts: 1286
Post Re: Unable mount 4KB sector size USB Truecrypted HD on Odroid C1
Hi,

First, I have to correct my diagnosis on the error :
Code:
Error: Incomplete multi-sector transfer: magic: 0x454c4946 size: 4096 usa_ofs: 48 usa_count: 4 data: 8609 usn: 2: Input/output error
Record 1 has no FILE magic (0x44414142)

The magic value is correct, and the usa_count is actually a decremented count, with the value 4 meaning the error was detected at the end of the fourth 512-byte record (out of eight) in the second sector of the MFT. In the contents of the sectors you sent, there is no such error. To get the same error, I have inserted 8609 (0xa1 0x21) at the location which corresponds to 013776 (octal) in your sector dump.

The error occurs in a consistency check intended to make sure the sector was fully written and has been fully read, and the error message means that less than half the sector has been fed in. As the magic value and the usa_offs are correct, the correct sector is likely to have been read. In the error message the usn is 2, but in the sector dump it is 4, probably because you ran chkdsk in the meantime and it had to fix something in that record.

Note that the record 1 is the second record being read for mounting, the first one is record 0 which presumably was fully read with no error. This tends to discard the possibility of a buffer truncation in the device driver or in the decryption process.

I cannot explain further, more information may help :

- Does the error consistently happen at the same location ?
- If so, does it show the same data value (8609) or a slightly bigger one ?
- Was your sector dump made in the same conditions as the error ?

Regards

Jean-Pierre


Wed Feb 04, 2015 15:51
Profile

Joined: Mon Feb 02, 2015 04:11
Posts: 4
Post Re: Unable mount 4KB sector size USB Truecrypted HD on Odroid C1
Hi,

Quote:
Does the error consistently happen at the same location ?


I'm not sure what you mean. Error appears always when I try to mount the external encrypted USB Drive with 4KB sector size on an Odroid-C1 with Ubuntu (14.04.1 LTS (GNU/Linux 3.10.67-55 armv7l)).

Quote:
If so, does it show the same data value (8609) or a slightly bigger one ?


Indeed the data value and also the usn value are not always equal. Sorry that I haven't noticed earlier. I wrote a script which mount automatically 1000 times and therefore nine different errors appears randomly. Three of them with over 96% proportion.

42,9%:
Code:
Error: Incomplete multi-sector transfer: magic: 0x454c4946  size: 4096  usa_ofs: 48  usa_count: 6  data: 3092  usn: 19266: Input/output error
Record 0 has no FILE magic (0x44414142)


30,1%:
Code:
Error: Incomplete multi-sector transfer: magic: 0x454c4946  size: 4096  usa_ofs: 48  usa_count: 6  data: 25512  usn: 19266: Input/output error
Record 0 has no FILE magic (0x44414142)


23,2%:
Code:
Error: Incomplete multi-sector transfer: magic: 0x454c4946  size: 4096  usa_ofs: 48  usa_count: 6  data: 7246  usn: 19266: Input/output error
Record 0 has no FILE magic (0x44414142)


<1%:
Code:
Record 1 has no FILE magic (0x44414142)


So the error message (in the second record) I posted at the beginning wasn't typical. Sorry again. (But error remains error)

Quote:
Was your sector dump made in the same conditions as the error?


Previously, I made the sector dump on the RaspberryPi, because it works only there. Errors appeared only on the Odroid-C1.
Today, I looked again (on Odroid-C1) and noticed that dump is still equal.

By the way - I'm now able to mount correctly on the Odroid-C1 because of a kernel-update (as a result on a inquiry in the Odroid forum). This allows truecrypt to use directly crypto ciphers which implemented in the kernel (I think it's closer to low-level programming and therefore in comparison very quick). Before, I had to set a switch in truecrypt not to used the missing kernel-ciphers. This is also possible on the RaspberryPi without errors (only slower).
Maybe this point is an another hint.

Nevertheless, I'm very thankful for your dedication.
From now it's not important for me to work further on the problem, because of what I pointed out above.
But I would love to continue to help to pinpoint the fault.

Regards


Thu Feb 05, 2015 15:55
Profile
NTFS-3G Lead Developer

Joined: Tue Sep 04, 2007 17:22
Posts: 1286
Post Re: Unable mount 4KB sector size USB Truecrypted HD on Odroid C1
Hi,

Quote:
Quote:
Does the error consistently happen at the same location ?

I'm not sure what you mean

I wanted to know if you always get the same error parameters. From your tests, I see the error may occur either in record 0 or record 1. When it occurs in record 0, the usn is always 19266 which is the value shown in your sector dump, but the data (which should be the same as the usn), show several unexpected values. So, most likely, bad buffer contents are fed into ntfs-3g.
Quote:
By the way - I'm now able to mount correctly on the Odroid-C1 because of a kernel-update (as a result on a inquiry in the Odroid forum).

Good news.
Quote:
This allows truecrypt to use directly crypto ciphers which implemented in the kernel (I think it's closer to low-level programming and therefore in comparison very quick). Before, I had to set a switch in truecrypt not to used the missing kernel-ciphers.

Most likely there is something wrong in your initial procedure. Is this procedure compatible with 4K encryption blocks ? You said you get no error with 512-byte sectors, and in your error samples, the first 512 bytes of a 4K block are correct.

Regards

Jean-Pierre


Thu Feb 05, 2015 23:04
Profile
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 8 posts ] 


Who is online

Users browsing this forum: No registered users and 4 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group.
Original forum style by Vjacheslav Trushkin.