Partitioning an Existing Hard Drive

Partitioning an existing hard drive is the most complicated method for installing Ubuntu on an existing workstation. Normally, if you have an existing operating system on your workstation (such as Windows XP or Vista), it uses the entire hard drive installed on the PC. During installation, Ubuntu allows you to split the hard drive into multiple sections, called partitions. It will then install the operating system on the new partition. The original operating system still resides on the first partition, allowing you to run it, just as before, in a dual-boot configuration.

Before you run the Ubuntu installation, you'll want to know what your particular hard drive setup is, so you'll know how much space you can allocate for Ubuntu. Here are the steps in preparing your existing hard drive for the Ubuntu installation.

Examining the Current Hard Drive Setup

Before diving into partitioning your existing hard drive, it's a good idea to know what you have to work with. If you already have Microsoft Windows running on the existing hard drive, you can use the utilities included in Windows to examine your system.

The Windows Computer Manager provides a graphical tool for looking at the hard drives installed on your workstation. This tool is available in Windows 2000 Workstation, XP, and Vista. You can get to it by following these steps:

1. Right-click on the My Computer desktop icon or the My Computer entry in the Start menu.

2. Select Manage from the resulting menu. This starts the Computer Management tool window.

3. From the Computer Management tool window, select the Disk Management entry.

The Disk Management tool, shown in Figure 3-3, appears, showing the current hard drives installed on the PC.

Figure 3-3: The Windows Vista Disk Management tool.

The Disk Management tool displays all of the hard drives recognized by Windows and shows whether they are formatted and used. Each hard drive appears as a separate line in the list and is shown with the partitions and format types identified.

Many newer workstations utilize a hidden partition to store important recovery information. A hidden partition is a section of the hard drive that's partitioned, but not assigned a drive letter, by the operating system. Even if you see only a C: drive on your Windows setup, your hard drive may still contain two partitions, as shown in the example in Figure 3-3. The hidden partition can't be used for Ubuntu, or you'll lose the ability to restore your Windows system if it crashes.

If you see an area on the hard drive marked unallocated, that means the hard drive has free space that's not part of the Windows partition. You can use this as part of the Ubuntu partition. If it's 4 GB or larger, then you don't have to do anything to your existing Windows partition. You can install Ubuntu directly into the unallocated hard drive areas without having to alter the existing Windows partition.

If you see only a single partition that's allocated for Windows on your hard drive, you'll need to continue with the partitioning process to free up space for Ubuntu.

Determining Free Space

The next step in the partition process is to determine how much free space you have on your existing hard drive. Remember, you'll need at least 4 GB of free space for Ubuntu, plus you'll probably want to keep some extra free space for the original operating system.

To find out how much free space is available on your Windows partition, you can turn again to the Windows Computer Management tool. The top portion of the Disk Management window shows detailed statistics for each hard drive partition.

The statistics shown include the total size of the partition and the amount of free space available. Make note of the free space available on the partition. That's the amount of space you'll have available to divvy up between the existing Windows partition and the new Ubuntu partition.

A common mistake is to assign all of the free space on a hard drive to the new Ubuntu partition. You'll want to keep some free space assigned to the Windows partition; otherwise, the Windows operating system installed might not boot properly. It's always a good idea to have at least 1 GB of free space available on the Windows partition, even if you're not planning on adding any new software or data.

Once you've determined the amount of space you have available for Ubuntu, the next step is to ensure that the space on the disk is really empty.

Defragmenting Files

During the normal course of using your workstation, Windows tends to write files at random places on the hard drive. This can spread data over the entire disk space area. When you split the hard drive into partitions, you'll want to ensure that you don't lose any of the data used in the Windows system, including system and data files.

To make a clean partition of the hard drive, you'll need to make sure that all of the Windows data are moved toward one end of the hard drive. This process is commonly done with a defragmenting tool.

Secret

Defragmenting is a common process in the Windows world. It's the process of realigning how files are stored on the hard drive. As Windows creates and removes files, file data get split into various blocks scattered around the hard drive. Defragmenting reassembles all of the blocks for each file into a contiguous area near the beginning of the hard drive.

All versions of Windows include a utility for defragmenting the hard drive. You can get to the defragment utility from the Computer Management window. Just select the Disk Defragmenter option.

In Windows Vista, disk defragmenting happens behind the scenes, without any indication of what's going on. Windows XP provides a handy defragmenter window that shows the progress as files are moved about. Figure 3-4 shows the Windows XP defragmenter window.

S Cum piller Management

EJHE

jiSj Fie AlUuii View Wiiduw help

-» Ê3 J3 [f I

¡Äj Computer Management (Locol) — äfis System Tools jjj Event Viewer + ftj Shared F ciders + ® Local Users and (jTouds

VuIuhic 5eiiiui15tdLuï Fie Systran Capauty Free Spate

% Free Spate

+ ^ Performance Logs and Alerts CwiLc Mcb rayer - ¿¡j Storage

+' fif Removable Storage n^ Disk Def ragmenter

Estimated disk usage before defragmentation:

Did Hanagemftnh + j^S Services and Applications

Estimated disk usage öfter defragmentation;

1 Analyze J [ Defragment J | View Report J

■ Fragmented file* ■ CuiUyuuui fifes O UiiniuvaUe fits LJ Free ipai.e

1 1

Figure 3-4: The Windows XP disk defragment utility.

Figure 3-4: The Windows XP disk defragment utility.

Often it takes more than one pass to get all of the files into a common area. After defragmenting moves the files to a contiguous area at the beginning of the disk space, you're ready to partition the hard drive as part of the Ubuntu installation.

Was this article helpful?

0 0

Post a comment