# Cannot find truecrypt partition "truecrypt1p1"

## MartinB

Hi,

I've just installed truecrypt and used it to encrypt the external USB hard drive /dev/sdh.  After this process completed, I mounted the device successfully, which then appears under /dev/mapper/truecrypt1.

So, I ran cfdisk /dev/mapper/truecrypt1 to create a partition on the encrypted drive.  cfdisk shows the correct information (e.g. capacity, free space, etc.).  I created a single primary partition of type 83 (Linux) using 100% of the drive.  The cfdisk table shows this as expected, with truecrypt1p1 as the name of the partition.

So I wrote the partition table and then exited cfdisk.

Now I just need to make the ext4 filesystem on this partition and finally mount it, but I can't find the partition anywhere in /dev.  I was expecting a device file, such as /dev/mapper/truecrypt1p1 or /dev/truecrypt1 or even /dev/sdh1, but no such device files exist.

Does anyone know where I can find the partition I've created?

Cheers,

Martin

----------

## MotivatedTea

If you're using the whole drive, there's no need to create a partition. Just create a filesystem on the entire device /dev/mapper/truecrypt1. I've never tried creating a partition table within an encrypted volume, but I think it's probably similar to creating a partition table within a file: you might need to do a loopback mount using the "-offset" parameter of "losetup". That requires you to know (or calculate) the offset to the start of the partition.

If you want to create multiple partitions, you could just create a normal partition table on the device and encrypt each partition separately. The only benefit you'd get by creating partitions within the encrypted device (including the partition table - as you're doing now) is that you would be "hiding" the sizes of each of the partitions. However, if you're using the whole drive, that's already not an issue.

----------

## MartinB

Thanks!  That seems to have done the trick.  :Smile: 

Out of curiosity, does this rule regarding filesystems on whole drives also apply to standard non-encrypted drives too?  For example, if I have device /dev/sdc (an external USB hard disk), then I can just make a filesystem on this device without creating a /dev/sdc1 primary partition for the filesystem in cfdisk? (e.g. I just run mkfs.ext4 /dev/sdc and mount /dev/sdc /mnt/usbdrive?)

I may be wrong, but it seems like this is quite uncommon.  Is there a reason why people don't usually do this?  Is there any danger to having a drive that contains only a filesystem without a partition table?  Are there any compatibility issues (e.g. Can Windows see such drives)?

Sorry if these seem like a lazy questions; I'd try it myself but I have neither the spare drives available nor ready access to a Windows system.

Thanks once again,

Martin

----------

## MotivatedTea

I'm sorry - I don't have anything I can afford to reformat just at the moment either. As for your questions about how common or compatible this is, I can only offer a few random anecdotes.

This was common when people used floppies - you wouldn't put a partition table on them - and it is also what you normally do with DVD-RAM disks (which are newer than floppies, but arguably just as dead). You may also sometimes come across a USB key that just has a filesystem on the whole device, although most now seem to ship with a single partition.

Linux will let you put a filesystem on just about any block device. I wouldn't try this with your boot hard disk, though; your BIOS and/or bootloader may not be happy. You may or may not be able to boot from an external USB device with no partition table, though, depending on the capabilities of your BIOS. (I've generally found booting from any USB device to be very hit-and-miss on a lot of different hardware, even if it's "supposed to" support it.)

If I recall correctly, Windows XP doesn't mind it if removable devices (like memory sticks and SD cards) have no partition table. I'm not sure what it will do with a harddisk. I do know from experience that Windows XP does not like it if SD cards have more than one partition (it will only "see" the first one), but I think Windows Vista and up might be more tolerant of that. Of course, for Windows you'll have to use VFAT or NTFS as the filesystem.

----------

