You are not logged in.

#1 2015-06-10 23:27:22

jwhendy
Member
Registered: 2010-04-01
Posts: 621

Arch and Win7 cannot open an NTFS partition created by the other

This is almost certainly related to another post where I was struggling to create logical partitions from Windows. Basically, Linux and Minitool Partition Wizard agreed that there were no logical partitions, but the built-in Windows disk utility said there was. I ended up using fdisk from Arch install media, and Minitool and Arch now both saw the logical partitions (Windows shows a big extended partition of free space). I installed Arch just fine, can boot to it and win7... life is good.

Not so much. A key to my setup is having an encrypted partition to share data between OS's. I used TrueCrypt with great success on my former laptop and am now having great difficulty!

Some preliminary information:

# fdisk -l /dev/sda

Disk /dev/sda: 238.5 GiB, 256060514304 bytes, 500118192 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disklabel type: dos
Disk identifier: 0x1e6513b3

Device     Boot     Start       End   Sectors  Size Id Type
/dev/sda1  *         2048   2101247   2099200    1G  7 HPFS/NTFS/exFAT
/dev/sda2         2101248 172433407 170332160 81.2G  7 HPFS/NTFS/exFAT
/dev/sda3       172433408 390537215 218103808  104G  7 HPFS/NTFS/exFAT
/dev/sda4       390537216 500118191 109580976 52.3G  5 Extended
/dev/sda5       390539264 391587839   1048576  512M 83 Linux
/dev/sda6       391589888 500118191 108528304 51.8G 83 Linux

I also went partition by partition to check Minitool's agreement on sectors (they match perfectly with the exception that it doesn't show the extended /dev/sda4 container). I triple checked the Minitool partition info properties as you can't copy and paste from it's window, and pasted the fdisk output to minimize errors. I'm showing a column for mini/Arch for both start/stop sectors, and just subtracted them to make sure I got 0. Appears to be perfect alignment:

| part | start (mini) | start (arch) | diff |   | end (mini) | end (arch) | diff |
|------+--------------+--------------+------+---+------------+------------+------|
| sda1 |         2048 |         2048 |    0 |   |    2101247 |    2101247 |    0 |
| sda2 |      2101248 |      2101248 |    0 |   |  172433407 |  172433407 |    0 |
| sda3 |    172433408 |    172433408 |    0 |   |  390537215 |  390537215 |    0 |
| sda4 |    390539264 |    390539264 |    0 |   |  391587839 |  391587839 |    0 |
| sda5 |    391589888 |    391589888 |    0 |   |  500118191 |  500118191 |    0 |

- Screenshot of how Minitool sees my disk
- Screenshot of how Windows disk utility sees my disk

I used TrueCrypt 7.1a on both OS's. I created a non-system encrypted partition using the GUI on Arch with the AES cipher/sha-512 hash, with filesystem as "none." Once created I did:

$ sudo cryptesetup --type tcrypt open /dev/sda3 vault

That worked fine, which I followed with:

$ sudo mkfs.ntfs /dev/mapper/vault

It initialized the device with zero's and then gave me the success/have a nice day message. Closed the volume and rebooted. When I tried to open the device from win7, I got "Incorrect password or not a TrueCrypt volume." Hmmm. I guess I'll try in reverse. I duplicated the procedure exactly as above from win7, this time having TrueCrypt automatically format with NTFS. All succeeds and I can open the device. Reboot into Arch and I get the same message from TrueCrypt! If I try with cryptsetup, it's "No device header detected with this passphrase."

Next, I tried just doing NTFS with no encryption. From Arch:

$ sudo mkfs.ntfs /dev/sda3

All goes well and I can mount it. I boot into Windows and it's not even listed! I used Minitool to issue it a drive letter, at which point clicking that pops up a windows dialog box asking me if I want to format the disk. Format the partition with NTFS in Windows, reboot into Arch and I get:

[jwhendy@arch_zbook ~]$ sudo mount /dev/sda3 /mnt/scratch/
NTFS signature is missing.
Failed to mount '/dev/sda3': Invalid argument
The device '/dev/sda3' doesn't seem to have a valid NTFS.
Maybe the wrong device is used? Or the whole disk instead of a
partition (e.g. /dev/sda, not /dev/sda1)? Or the other way around?

Doesn't matter if I add "-t ntfs" or "-t ntfs-3g." I get the same result.

----------

Just to add a couple more oddities... when I created the NTFS partition in Arch, I also created a file called vault.tc as a TrueCrypt file-based encrypted container. My thinking was that the issue was with TrueCrypt full-partitions and that I could get around it with a plain partition containing an encrypted file. Reboot into windows and the partition isn't shown (as stated above). From Minitool, if I right click the partition and choose "Explore," it lists the partition contents and there is my vault.tc file. Windows thinks it's unformatted!

I noticed the option to backup/restore a TrueCrypt header, and gave a shot at backing up the working TrueCrypt setup on windows to a flash drive, booting to Arch, and then restoring the /dev/sda3 header from the flash drive file. Arch still couldn't open it.

Lastly, I noticed when I go to select a device to encrypt in TrueCrypt, my logical partitions aren't showing up (just like Windows only sees the end of the disk as free space). I just can't help but think something is tweaked in the partition table... basically:
- TrueCrypt sees what Windows sees
- Arch sees what Minitool sees

How could I go about diagnosing further or fixing the issue. This is driving me crazy!

----------

I'd hate to do this given that I already setup my wm, configs, packages, etc... but my last resort attempt would be to wipe my logical partitions and see if I can at least get the win7 disk utility, minitool, arch, and truecrypt to like each other with respect to /dev/sda1-3... and then try to re-add the logicals afterward and re-install arch? I honestly don't know why this would be any different, but was just a thought. The issues from the other post seem to arise with logical partitions not being recognized the same between win/linux.

Or figure out how to just use primaries (like dedicated boot on a USB drive or something). Or fiddle with growing/shrinking windows to see if I can undo whatever is telling windows where/what things are? Really grasping at straws here.

Last edited by jwhendy (2015-06-10 23:32:22)

Offline

Board footer

Powered by FluxBB