Error 

Partitioning your system

510 views
Posted October 25, 2007 at 10:10pm in Computers

In Linux, users are very aware of partitioning their drives so that a specific directory on the file system has an entire partition dedicated to it. The first directory most people take care of is /home, because this directory will most likely contain the most data, and it will also be the directory that is most important when you have to reformat.

In Windows users have never gotten into this practice, which I find absolutely hilarious because Windows should either be formatted every so often to keep it fresh or user’s have to reformat due to a virus, trojan, etc. It only makes sense that the information you need to keep be kept on partitions that give you the ability to restore quickly.

Why do I feel I am qualified to explain a “proper” way to handle this in Windows? Well a few years back I had one of the first Pentium 4 chips and boards on the market and because I had been having so many problems with Microsoft updates I stopped installing them, well I then ended up having to reinstall Windows about every 2 weeks. So I can say that I have installed Windows between 200 and 300 times over the past 5 years on various machines for various reasons. The methods I will explain below have been the best setup I have ever used. There is only one flaw, which I will explain at the end and at the end because it is minor and I would hate to turn you away from a good process for something minor.

On my primary machine the primary hard drive is a 150gb raptor, my C partition is 50gb, D is 5gb, E is 5gb and F is roughly 80gb. The C partition is obvious, this holds my operating system and applications that I install. My D partition holds settings

Partition D:\
  \.purple
  \Catalogs
  \Firefox
  \FlashFXP
  \Icons
  \Keyring
  \Komodo
  \Logs
  \Quickbooks
  \Quicken
  \RDC
  \RSSOwl
  \Scripts
  \SecureCRT
  \Shortcuts
  \Templates
  \Thunderbird
  \TODO

As you can see, on this partition I hold all of my Firefox profiles and Thunderbird profiles, “New File” templates, file type icons, FlashFXP settings, and so on. With the drive setup this way all of my settings can be easily restored. For example, with FlashFXP it asks you for the directory you will be storing your configuration information when you install, if information already exists it will use it. So since everything is setup right after installing the program it is like I never reformatted. The same goes for Thunderbird and Firefox, these locations are specified in an INI file in your “Documents and Settings” directory under your username. If you install Firefox or Thunderbird and overwrite the INI files with a saved copy of your INI file, when you start Firefox it too will respond like you never formatted.

Some programs like Komodo IDE/Edit and Pidgin use an environmental variable, Pidgin’s is PURPLEHOME and Komodo is KOMODO_USERDATADIR. Since I wanted the .purple directory in D I set PURPLEHOME to D:\ and when it opens next time it will read the information in D:\.purple if information relevant to Pidgin exists. Komodo works the same way except that it’s structure is a bit different. The directory you setup for Komodo will have the version number subdirectory created. For example, I have it set to D:\Komodo\Edit and it stores the settings for 4.1 in D:\Komodo\Edit\4.1 and 4.2’s settings are in D:\Komodo\Edit\4.2. This is particularly nice if you upgrade to Komodo IDE, while I’m sure the old settings can be used by the new version, I would like to have the original to compare to make sure it was right.

Now some application like the RSSOwl folder depend on the E drive. My E drive stores standalone applications, which right now includes 81 applications. What I mean by standalone applications is an application that requires no installation, a zipped binary basically. I try to use zipped binaries as often as possible for the ease of getting my system back to normal. One example is my AMP (Apache, MySQL, PHP) development environment. All configuration files for these three applications point to locations on the D, E and F partitions and are configured the way that I want them to be. Take Apache for instance, at the end of the httpd.conf I have it including all files in F:/Workspace/environment/conf which houses the website configuration files and those configuration files point to files within F:/Workspace.

There are also applications like Aptana, RadRails, RSSOwl that are using the Eclipse framework and allow you to choose the workspace for that application. The configuration for these applications is also sometimes stored in “Document and Settings”, but these values can also be changed in configuration files within the application’s directory.

It used to take me hours and hours to reformat a machine and return everything to the way it was with the information I provided above and the next few paragraphs you should be able to restore a Windows XP machine within a 3 hours depending on your skill with navigating XP and how far you customize things.

I recommend that on the drive you store the majority of your data, in my case F, you create a folder that will store a copy of every application, driver, and registry file you plan to install. This will basically be double the amount of space since you are making a copy of the applications, but it is worth it in the end. Make an ISO of every CD you will need including drivers, applications, and games, but keep in mind a number of games have copy protection so this can be a task if you are unfamiliar with bypassing this protection. Name each application very clearly, (example: Application v1.3.0.3) so that in the future you know exactly what version and application you have installed.

I also recommend you use Unattended installs and rename certain directories to eliminate spaces in file names. For example:

Partition C:\
  \Documents
  \Programs
  \Users
  \WINDOWS

The Documents directory is the location of “My Documents”, this allows for very quick access with no spaces in the name. The same for Programs, there are a number of applications that can become a pain to use if you have spaces in your directory name. The Users directory is “Documents and Settings”, which is also a very long directory name.

One more important thing to do is to create a “mirror” of your drive structure to backup important files. I tend to back them up by hand so I know what is being copied, when, and where. Here is an example:

Directory of F:\Computer\Unattended\Structure
  \C
    \Documents
      \NFS Most Wanted
        \NAME
          \NAME
    \Programs
    \Users
      \USER
        \Application Data
          \Mozilla
            \Firefox
              \profiles.ini
    \WINDOWS

As you can see above this mimics my directory structure, but holds only some files. You might wonder why this is helpful, and the reason is that I can go into the C directory copy all of the folders to the root of the C drive and all my settings will be where I need them. Here is an example of what I mean. I have create the 4 partitions, reformated my machine and followed the methods I described above. I have also installed Firefox and NFS Most Wanted and that is all I have done. I can now start up Firefox or NFS Most Wanted and they will operate exactly as they did before the reformat. All of my form entires in Firefox have stayed in tact, my web history is available, really it is like you just rebooted your machine.

I have 81 applications in my E drive and another 110 in my folder holding the applications I need to install every time. Most of these applications do not require a reboot so I can install the majority of them in one boot. Setting up applications that do not operate as cleanly as FlashFXP or SecureCRT in specifying a data store can be time consuming. There are applications such as Genie Backup that can help backup settings, but I have always preferred to do it myself so that I knew exactly what was being done, but that is up to you.

A bit of warning, there are a number of actions you can take in the process of setting all of that up that can be disasterous so I HIGHLY RECOMMEND you do a full backup of all your data. Also, if you must use the registry to find application settings be very careful as you can mess things up very quickly. I run an automated backup of all 4 primary partitions on the 1st and 16th of every month

When it comes to the registry, I recommend you put application settings or tweaks in seperate registry files. It does take some extra time having to execute all of the registry files, but more often than not you may install one registry entry and the next time not want it installed. You can of course uninstall the setting, but unless you make sure your uninstall entry has the exact entry that was in the registry previous to the entry being added you could mess things up.

As I said in the beginning, there is a problem with this process, but it will not effect everyone. If you use more than one hard drive make sure all of the partitions on your primary drive are primary partitions. The reason is that Windows installs drives with primary paritions listed first. So if you have 3 partitions, 2 of which are extended partitions and you have one more hard drive your C drive will be the first parition on the primary drive, the D partition will be the 2nd hard drive and then E and F will be the 2nd and 3rd paritions on the first drive. This can cause an undesired setup. If you have 5 partitions on a hard drive the same thing can happen since the 4th and 5th will be extended partitions. So I recommend no more than 4 partitions per drive and make sure they are all primary, but this only matters if you have multiple drives.

I have 4 hard drives in my primary machine and I actually unplug 3 to make sure that all drivers are installed and applications are in tact before I have them available to me.

I apologize to anyone that has not understood the process described above, it can get complicated and was in some ways hard to explain because a lot is done during my installs. I believe the last one I did took 2 hours including installing Windows XP. I use unattended installs with no applications, drivers, or registry entries on the CD. If you can and would like to a lot of applications can be bundled on the CD to make the installation faster, but honestly 2 hours isn’t much, and I am able to see if an error occurs in a file being copied or something becomes corrupt.

If you need help or have any questions you can comment or email me

  • Google
  • del.icio.us
  • Digg
  • Spurl
  • Facebook


Leave a Reply