Washing Windows: Partitioning

It’s been ages since I’ve posted anything. To be honest, it’s because I haven’t had anything interesting to post about. Well, it could be argued that I never had anything interesting to post about in the first place.

Anyways, I want to talk about Windows XP again. I didn’t really see the need to clarify that I was using XP before because the only obvious alternative to that is Vista, and… well, why would anyone talk about Vista? But seriously, with 7 on the way (and the release candidate sitting on one of my hard drives as I type), I think it is time to specify my version. Perhaps I did specify before, but I can’t remember (it’s been that long).

What I want to talk about is partitioning XP. Just a quick warning: don’t do any of this unless you’re confident enough. I take no blame for any loss of time or data relating to what I describe here on in. 🙂

With any installation of Windows, you need at least one drive. It doesn’t have to be “C” so I won’t say it’s the “C drive”. I’d like to call it the “system drive”, but that’s not quite right.

Now, this might sound stupid to you (it certainly does to me), but XP itself calls that partition the “boot” drive (just check Disk Management in the Microsoft Management Console). When I installed XP on my laptop, I created three partitions; the third partition is the one that I chose to install XP onto. The first partition I created was 8MB large. (Yes, that’s MB, not GB.) The second was about 1.5 times the size of memory on my laptop.

Obvious the second partition was for the page file, but the first? You see, when I chose to install XP onto the third partition, XP couldn’t just use that one partition for its installation. It needed to place the boot loader (ntldr) in the first partition. That’s the so-called “system” drive.

So far, so good? First partition contains boot loader and is the system drive, second contains the page file, and third contains XP itself and is the boot drive. The two titles are swapped as far as I’m concerned. All three if you count the “swap drive”.

Now, when I got XP up and running, I decided that I wanted to create some more partitions for better organization. I made a fourth partition for temporary files (cache for internet files, temp and tmp folders, etc.).  My sixth parition was for my program files, and my seventh was for my documents and settings (well, at least the settings, but I keep documents elsewhere usually). The last partition was for my media files (videos, music, etc.).

Maybe you are wondering how I managed to separate my temporary file folders and program file folder from the “boot” drive. It’s quite simple, but can be very annoying if mistakes are made. Believe me – I screwed up the first time. The “trick” is to modify the registry. It’s easy to do, but many would perceive doing so as intimidating if not downright scary.

For the program files folder, the “obvious” way is to just copy the contents of the folder to the partition, and then make a change to the ProgramFilesDir value. The problem is that old keys and values with hard-coded references to the location of the old program files folder. Because of them, this simple change results in not being able to delete the original program files folder. Of course, the solution is to find those hard-coded references and change them to the new location. This is easy to do. Just export the entire registry, thereby creating a .reg file, then modifying that .reg file (which is really just plain text). Just use notepad or whatever and replace all instances of “C:\Program Files” with “X:” (if X is the drive letter). One thing to be aware of is that XP still contains 8.3 naming in some references. In short, instead of using “C:\Program Files”, it will be “C:\Progra~1”. In my desktop installation, there are still such references in the registry.

As for the temporary files folder(s), you should do the same thing using “C:\Windows\Temp” for your search. An interesting point here is that XP actually has registry values for both “temp” and “tmp” folders. There’s no real point in having two separate folders, but that’s exactly what I have.

The Documents and Settings folder can be changed similarly to how Program Files was changed. The one thing you might wish to know is that each user has a folder in the Documents and Settings folder, and in each of those is a folder for temporary files for that specific user. Why not relocate those to the temporary files partition already set up? That’s what I did. Wherever you have “%USERPROFILE%\Local Settings\Temp” you can change to “Y:\Temp\%USERNAME%”. Just remember that the system temp folder should be something like “Y:\Temp\system” instead of just “Y:\Temp” so as to keep the system temp folder separate from the user temp folders.

I won’t flesh out the details because if you’ve managed to figure out what I’m talking about and are confident enough to try this out, you should have no problem working it out by yourself.

I plan on re-installing XP on my desktop so as to achieve a nice partitioning scheme similar to that of my laptop. Maybe you are wondering why I would bother. The answer is that it makes things seem neater. One thing’s for sure: my laptop’s XP partition has only 1.13GB of data (fully updated) and doesn’t need to be defragmented as often as it did before. Of course, I’m using a stripped down version of XP with some services removed (nlite is your friend), but I’d expect similar results even with a normal version of XP.

Have fun!

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: