Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

How do I create an ntfs truecrypt container? There isn't much documentation on commandline usage. I tried the following:

$ truecrypt -t -c mycontainer

// .. Go through options, selected 'None' when asked for filesystem

$ mkfs.ntfs -f -L myNTFS mycontainer
mycontainer is not a block device.
Refusing to make a filesystem here!
share|improve this question
    
The documentation says "For information on command line usage applying to the Linux and Mac OS X versions, please run: truecrypt –h" –  martineau Jul 23 '13 at 20:42
add comment

3 Answers

Here's what worked for me (though I used the GUI for most steps):

  • Create a container of the desired size with any filesystem (I used FAT).
  • Mount it using the TrueCrypt GUI.
  • From a console window, run mount. Find the entry that corresponds to your Truecrypt container, and note down its device name. It should be something like /dev/mapper/truecrypt1 (the last part of it should correspond to the name of your TrueCrypt volume). This is the 'raw device' for your volume against which you can do low-level operations such as dd, mkfs and the like.
  • Now unmount the volume with sudo umount /dev/mapper/truecrypt1 (replacing the path as needed).
  • Format as NTFS: sudo mkfs.ntfs -f -L SOME_LABEL /dev/mapper/truecrypt1. Use a label of your own choice as SOME_LABEL, and be sure to use the correct device path (as above).
  • Unmount the volume in TrueCrypt GUI (it will still show up as mounted).
  • Mount it again.

Et voilà! You can verify it really is an NTFS volume by copying a large (>4 GB) file to it.

share|improve this answer
add comment

I think you are putting the horse before the buggy. You must create the partition and add the filesystem before encrypting it with truecrypt.

If you want to make a truecrypt container in linux, that's different. This is because a Truecrypt container is different than a NTFS filesystem that's encrypted with Truecrypt. Think of it as a Truecrypt partition instead of an NTFS partition. Truecrypt is the go-between for the 'container' and the OS, linux in this case.

share|improve this answer
    
I wanted to create a truecrypt container that I could access from both a linux and windows environment. When going through the container creation options, I saw options for ext4, ext3, FAT, etc. The ext filesystem won't be recognized by windows, and FAT doesn't support files greater than a few gigabytes. It seems possible to create an NTFS truecrypt container. I can't seem to figure that out through the console. A container is preferrable because I wouldn't have to mess with repartitioning my harddrive. –  user1812844 Jul 24 '13 at 14:06
    
Well, that's a bit different, I figured that's what you wanted to do. The link you provided does what I suggested, the ntfs filesystem is already on the device and is merely being mounted as a truecrypt container first, which is correct. However, have you tried creating a truecrypt container on a Windows machine, then trying to open that in linux? that seems like an easy way if it works. –  BigHomie Jul 24 '13 at 14:22
add comment

If you create a file container sized 1GB, use:

dd if=/dev/zero of=file bs=1M count=1000

and then you can use:

mkntfs -fF file

Under Linux TrueCrypt use the command:

truecrypt --help

and you have all options.

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.