You don't need to know the size of a partition to encrypt it with True Crypt. You only need to specify a size if you are creating a hidden volume. First let me say that I am using True Crypt v4.2a so if there are changes with the new version I am unaware of them. Here is what you do.
Encrypt the partition using truecrypt -c.
Map the partition using truecrypt.
Make a file system on the virtual device using mkfs.
Mount the virtual device.
Then when you need to remount the device you just map the partition to a True Crypt virtual device and mount the virtual device. You can do this in one step once the partition has a file system.
This is how to do it for /dev/hda1. First encrypt the partition using truecrypt.
Code:
truecrypt -c /dev/hda1
Volume type:
1) Normal
2) Hidden
Select [1]: 1
Filesystem:
1) FAT
2) None
Select [1]: 2
Hash algorithm:
1) RIPEMD-160
2) SHA-1
3) Whirlpool
Select [1]: 1
Encryption algorithm:
1) AES
2) Blowfish
3) CAST5
4) Serpent
5) Triple DES
6) Twofish
7) AES-Twofish
8) AES-Twofish-Serpent
9) Serpent-AES
10) Serpent-Twofish-AES
11) Twofish-Serpent
Select [1]: 1
Enter password for new volume '/dev/hda1':
Re-enter password:
Enter keyfile path [none]:
TrueCrypt will now collect random data.
Is your mouse connected directly to computer where TrueCrypt is running? [Y/n]:
Please move the mouse randomly until the required amount of data is captured...
Mouse data captured: 100%
Done: 8578.22 MB Speed: 15.12 MB/s Left: 0:00:00
Volume created.
Then map the partition to a virtual True Crypt device.
Code:
truecrypt /dev/hda1
Enter password for '/dev/hda1':
Create a file system on the virtual device. Note that you can use truecrypt -l to list True Crypt virtual devices.
Code:
truecrypt -l
/dev/mapper/truecrypt1 /dev/hda1
/dev/mapper/truecrypt0 /dev/hda7
mkfs -t ext3 /dev/mapper/truecrypt1
mke2fs 1.39 (29-May-2006)
Filesystem label=
OS type: Linux
Block size=4096 (log=2)
Fragment size=4096 (log=2)
1098880 inodes, 2196880 blocks
109844 blocks (5.00%) reserved for the super user
First data block=0
Maximum filesystem blocks=2252341248
68 block groups
32768 blocks per group, 32768 fragments per group
16160 inodes per group
Superblock backups stored on blocks:
32768, 98304, 163840, 229376, 294912, 819200, 884736, 1605632
Writing inode tables: done
Creating journal (32768 blocks): done
Writing superblocks and filesystem accounting information: done
This filesystem will be automatically checked every 26 mounts or
180 days, whichever comes first. Use tune2fs -c or -i to override.
Now you can mount the virtual device using the mount command.
Code:
mount /dev/mapper/truecrypt1 /mnt/hda1
You don't have to worry about dismounting the True Crypt volume when the system shuts down. If you want to dismount and unmap a True Crypt virtual device you can do this.
Code:
umount /mnt/hda1
truecrypt -d /dev/mapper/truecrypt1
Now, since the partition has been set up you can mount it any time with one command.
Code:
truecrypt /dev/hda1 /mnt/hda1
Enter password for '/dev/hda1':
You can even tell True Crypt about mount options for the partition using the -M parameter of the truecrypt utility.
Code:
truecrypt -M noexec,sync /dev/hda1 /mnt/hda1
Enter password for '/dev/hda1':
I don't know if you wanted that much information but your question suggested that you didn't understand how to use True Crypt.