Manually Partitioning an Existing Windows System

If the SUSE installer cannot repartition an existing Windows partition automatically, you can always use the Linux parted (Partition Editor) utility to manually resize an existing partition, usually when your entire disk is occupied by a Windows partition. The parted utility is available from the SUSE install disk when you select the Rescue System option from the main menu of the SUSE install CD or DVD. For more information about booting the rescue system, see the section "The SUSE Rescue System'' later in this chapter — this section focuses on repartitioning after you have booted in this fashion.

' -i v-J Before using software such as parted that directly manipulates partitions, you should make sure that you have a full backup of any critical data on the partition that you are resizing, and that the backup is readable. The parted utility is quite stable, but problems do occur, and we can't think of anything more depressing than finding that you cannot use a backup that you were depending on in order to restore critical data that may have taken you years to amass.

Before using parted to repartition an existing Windows partition, boot the system into Windows and run the Windows Disk Defragmenter software to pack your Windows data into the Windows partition(s) as efficiently as possible. This will make it easier for parted to resize an existing disk as efficiently as possible. After defragmenting, right-click the icon for the Windows partition that you are resizing (probably C:), and write down the amount of space used on that partition, as well as the amount of free space remaining. You can then shut down your Windows system and reboot into the SUSE Rescue System.

After you boot and log in to the system in rescue mode, you can use the fdisk -l command to identify the name of the disk containing the partition that you want to resize, usually /dev/sda in a single-disk Windows system.

You then start the parted utility, using the name of the drive that you want to repartition as an argument, as in the following example:

# parted /dev/sda GNU Parted 1.6.6

Copyright (C) 1998, 1999, 2000, 2001, 2002, 2003 Free Software Foundation, Inc. This program is free software, covered by the GNU General Public License. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. Using /dev/sda

Information: The ... geometry on /dev/sda is 10011/255/63.

Therefore, cylinder 1024 ends at 8032.499M.


When running parted, its internal prompt is (parted), as shown in the preceding example. You can then use the parted command's print command to display a listing of the current partitions on your disk, as in the following example:

(parted) print help

Disk geometry for /dev/sda: 0.000-78533.437 megabytes Disk label type: msdos

Minor Start End Type Filesystem Flags

1 0.031 78528.669 primary fat32 boot r ! i j Write down the output of the print command in case you need to undo your parti-

i-.-.,".\s .'..w-j tioning changes later. I've never had to do this, but forewarned is forearmed.

After you have identified the Windows partition that you want to resize, you can use the parted command's resize command to resize the partition. The resize command takes three arguments:

■ The minor number of the partition that you want to resize

■ The starting position of the filesystem in megabytes

■ The end of the resized filesystem in megabytes

The end of the resized filesystem must be some number greater than the amount of used space in your Windows partition that you wrote down earlier in this section. This guarantees that the resized filesystem is large enough to hold all of the files that are currently used by Windows in the original partition. Remember to make this number slightly larger than the amount of used space in your Windows partition so that you will be able to create new files under Windows.

For example, to resize the partition shown in the previous example to 3GB, you would enter a command such as the following:

(parted) 1 0.031 3000

When this command completes, use the print command to verify that your partition has been correctly resized, and then use the exit command to leave the parted program. You should then reboot your system into Windows, and make sure that Windows still boots correctly.

If this is the case, you can then shut down your Windows system, boot from the SUSE install CD or DVD, and proceed with the installation of SUSE Linux into the space that you freed up on your disk.

r : I■ / Other ways of resizing the Windows partitions are to use YaST's partitioning module, to use a third-party partitioning product such as Partition Magic, or to boot the system from a special CD such as the gparted live CD, which can be found at

Was this article helpful?

0 0

Post a comment