Setting up PortableApps and TrueCrypt on your USB drive: Part One - Preparation

Art's picture

EDIT 8/23/08: After further testing, it looks like formatting your USB thumb drive with NTFS introduces a significant performance hit. Your drive will become very slow if you do this, so I apologize that I did not thoroughly test this before I wrote this post.

So, please skip the entire first portion of this post, Format With NTFS, and start with the second portion, Giving Your USB Drive A Drive Letter.

In this series of posts I'll show you how to get PortableApps installed on your USB thumb drive inside a TrueCrypt encrypted file container. Then when we're through with that, we're going to create a batch file to mount the TrueCrypt volume and start PortableApps, and create another one to close PortableApps, dismount the TrueCrypt volume, and then eject the drive.

In this first post of the series, we're just going to get our USB drive ready for what's to follow. First, we're going to format the drive with an NTFS files system, then assign it a drive letter.

So let's get started...

Format With NTFS

Why would I want to format my USB drive with NTFS? And is it even possible?

We need to use an NTFS file system to get around the 4Gb file size limit of a FAT32 file system. Later in this series we're going to be creating a rather large TrueCrypt encrypted file container that will be larger than that 4Gb limit. NTFS file systems allow files to be as large as the partition they reside on, and partitions can be as large as several terabytes.

And of course it's possible to format your USB drive with NTFS. Windows 2000 allowed you to do this without any modification, but in Windows XP you need to make one small change to make it possible.

image

As you can see in the screen shot above, FAT32 is the only option available to us when we try to format the thumb drive.

image

To change this, we'll need to edit the properties for the drive. First, open up the Device Manager and expand the Disk Drives branch.

Right-click on the drive we'll be modifying (In this case it's the SanDisk U3 Cruzer Micro USB Device, but will almost certainly be different on your computer) and choose Properties, then click the Policies tab.

image

The Policies tab gives you two options. The top one is chosen by default and sets your USB drive up for quick removal. What this means is that your USB drive does not use caching. All changes are written to the drive immediately, and this is why you can just yank your drive out without first ejecting it.

The second option,"Optimize for performance", is the one we want. This sets up caching for your drive. What this means is that the OS will cache up any changes of the files on your drive, and make those changes when time is optimal. This also enables the NTFS option when we format it.

So, choose this option and click OK.

This is the perfect time to point out something very important. Since this change enables caching on your drive, you must eject the drive before you pull it out of the USB port. Doing this first lets Windows write any pending changes to the drive before ejecting. While this wasn't important before, it is very important after we make this change. I'll say it again in case you weren't paying attention: Always eject the drive before you pull it out of the USB port after making these changes!

image

Now, if you go to format the drive again, you will notice you now have an option to format it with an NTFS file system. When that's finished, go back to the Policies tab in the Device Properties above, and change it back to the first option, the one for quick removal. After you've done that, we're finished with this portion of setting up your drive.

Giving Your USB Drive A Drive Letter

Now we're ready to give it a drive letter. Sure, it has one already, but it's the one Windows automatically assigned to it. Typically it's the first available letter on your system, and that can change from system to system. This is really ok, as PortableApps and TrueCrypt can both deal with this easily, but assigning it a letter, so it is the same one each time you plug in the USB device, will really help us later when we write the batch files to automate the mounting/unmounting and ejecting processes.

image

Right-click on the My Computer icon and choose Manage. The computer Management window should open. On the left side of the window, find the Storage folder and click on Disk Management. After a couple of seconds, all of your drives should appear in the window on the right showing various information about all of them, including what drive letters are currently assigned to them.

image

Scroll down the list and find the drive we want to change and right-click on it, then choose Change Drive Letter and Paths. When the window opens, click the Change button.

image

Assign the following drive letter should already be chosen for you. Drop the list and choose the letter you want to assign to it. In my case I changed it from T to X.

Now just click OK or Yes a couple of times and you're all finished. Now if you disconnect your USB drive and put it back in, you'll notice it was given the same letter we just assigned to it.

One thing to note about this, is that this will not work if you take your drive to another computer. You'll need to assign it the same letter on another computer just like we did here. I only ever use my thumb drive on two computers, my computer here at home and my office computer, so I know these drive letters are available on both machines. You should keep this on mind when you are choosing your drive letters.

Conclusion

Well that about does it for this first installment of the series. Next time we're going to set up TrueCrypt and create that encrypted file container I've been talking about.

Comments

NTSF on USB

I found that if I ran chkdsk drive:/f on the USB that was formatted with NTFS, the speed returned to normal.

Thank you for your website!

Art's picture

Thanks B Haley! I'll have to

Thanks B Haley! I'll have to check that out!