Chapter 32: Formatting and Partitioning Disks
Choosing Your Own Drive Letters Windows assigns a drive letter to each partition, logical drive, and removable disk that it can read. Whenever possible, we recommend you use the drive letters Windows assigns. If you can't, (for example, you are using an antiquated program that expects files to be on certain drives or you install an application that reassigns drive letters willy-nilly like WinOnCD 3.8), you have a few options: change the letters , assign letters to folders, or assign pathnames to drives or partitions.
When assigning or changing drive letters, you can use any unassigned letter from C to Z (inclusive). Letters A and B are reserved for floppy disk drives. If a program is using the files on a drive or partition when you try to change its letter, Windows displays an error message.
Changing Drive Letters You can tell Windows to assign different drive letters to most of your drives and partitions. You cannot, however, change the drive letter of the boot partition (the one that contains the Windows XP program files). You can alternately add new drive letter assignment or, if you're using NTFS, assign special folders to act as conduits to drives.
To change the drive letter for a partition, follow these steps:
- Choose Start, right-click My Computer, and choose Manage from the menu that appears. In the Computer Management window, click the Disk Management item under the Storage heading (as shown in Figure 32-1 earlier in the chapter). The Disk Management pane appears in the right part of the Computer Management window.
- Locate the partition whose letter you would like to change in the upper-right pane of the Computer Management console (the volume list) or the lower-right pane (the list of drives and the diagram of partitions on each drive).
- Right-click the partition and select Change Drive Letters And Paths from the menu that appears. You see the dialog box shown in Figure 32-6.
Figure 32-6: Changing the drive letter of a partition, or assigning a pathname to a partition
- Click the Change button to modify the existing letter assignment. You see this dialog box:
- Type or choose a letter in the Assign The Following Drive Letter box and click OK. You return to the Computer Management window, with updated drive letters for the partition.
You can't add a second drive letter to a partition--each partition has only one drive letter at a time. You can remove the drive letter, though, by clicking the Remove button in the Change Drive Letter And Paths dialog box. Windows warns you not to proceed if the drive letter is in use. If you click the Add button, Windows assumes that you want to assign a pathname to the partition, as described in the next section.
Don't change the drive letters of the boot partition (which contains Windows XP itself--Windows XP shouldn't allow you to, anyway). Watch out when changing the drive letter of a partition that contains programs. With a different drive letter, existing references to the program files on that partition would be wrong. Changing the drive letter does not update references to the files on that partition.
Assigning Pathnames to Partitions You can assign a pathname--like C:\My Documents or D:\Budget Workarea--to a partition. The partition still has its usual drive letter (unless you remove it), but it also has a second name--a pathname. For example, if you want to store your documents on a second partition (which would make it easier to back up, and wouldn't fill up the partition that contains Windows), you could assign the pathname C:\My Documents to the partition D:. This technique is called mounting a partition.
Any space allocated to a specific file system is called a partition, whether it is a small partition on a large drive or a single partition that takes up an entire drive. Before you mount a partition (that is, assign it a pathname) you choose two things:
- The partition to mount It continues to have its original drive letter, unless you delete the drive letter. The partition can contain files and folders, which will not be disturbed by assigning a pathname to the drive.
- The pathname to assign to the partition The pathname must refer to an existing, empty folder on an NTFS partition. After you assign the pathname to the partition (mount the partition), Windows will redirect references to that folder to the partition instead.
For example, rather than storing all your user's settings and files in the C:\Documents And Settings folders and their subfolders, you might want to store them on a separate partition. You could format a partition with NTFS for this purpose. Move the entire contents of C:\Documents And Settings to the new partition, and mount this partition at the pathname C:\Documents And Settings.
Be sure to empty the folder in which you are about to mount a partition. In the C:\Documents And Settings example, move the contents of C:\Documents And Settings before issuing the command to mount the partition at the pathname. After issuing the command, you won't be able to access those files and folders--Windows will redirect all requests to the new partition. To assign a pathname to a partition or drive, follow these steps:
- In an Explorer window, create an empty folder (choose New | Folder from the menu) in a partition formatted with NTFS. Or, empty out an existing folder. If you have a blank NTFS partition, you can use the root folder. (In the C:\Documents And Settings example, you might use a partition currently named F:.)
- Choose Start, right-click My Computer, and choose Manage from the menu that appears. In the Computer Management window, click the Disk Management item under the Storage heading (as shown in Figure 32-1 earlier in the chapter). The Disk Management pane appears in the right part of the Computer Management window.
- Right-click the partition that you want to mount and choose Change Drive Letter And Paths from the menu that appears. You see the dialog box shown in Figure 32-6. (In our example, right-click the F: partition.)
- Click the Add button to create a new pathname for the partition. You see this dialog box:
- In the Mount In The Following Empty NTFS Folder box, type the pathname that you want to assign to the partition, or click the Browse button and navigate to the empty folder you identified in step 1. (In our example, browse to C:\Documents And Settings.)
- Click OK.
You can also assign a drive letter to a network drive or a folder stored on a network drive.
Assigning Drive Letters to Folders You can use the DOS SUBST command to assign new drive letters that correspond to folders on existing disks. Follow these steps:
- Open a Command Prompt window by choosing Start | All Programs | Accessories | Command Prompt.
- Type the SUBST command in the following format (press ENTER after typing the command):
SUBST N: C:\MYAPP
This command makes the drive letter N a synonym for the folder C:\Myapp. You can use any unused drive letter and the address (pathname) of any folder.
- Type exit to close the Command Prompt window.
The new substituted drive letter is available immediately.
If the path of your folder uses long names, then in the SUBST command, you have to use the MS-DOS name equivalent, as shown by the DOS DIR command. To disconnect a SUBSTed drive letter, type the following:
SUBST N: /D
The SUBST command lists only until you restart Windows. If you use a SUBSTed drive on a regular basis, put the SUBST command in your Autoexec.nt file so that it's available every time you start Windows.