Modifying Existing Partitions

If you're installing Linux on a computer that holds a working OS you want to preserve, you're faced with the daunting challenge of modifying that working configuration. You can proceed in one of three ways:

• You can back up, repartition, and restore the data.

• You can use a dynamic partition resizer.

Note A few Linux distributions support installation within an existing FAT partition, typically by using the UMSDOS filesystem to add Linux filesystem features to FAT. This practice is convenient, and it can be a good way to test Linux, but UMSDOS is inefficient, so I don't recommend using this method for any but a temporary installation.

Adding a Disk

Adding a disk is the simplest and safest but most costly course of action. Suppose your existing configuration is typical—a single large primary C: partition for Windows. You can add a new hard disk, devote it entirely to Linux, and install the boot loader (described shortly, in "Picking an OS to Boot: Boot Loaders") to the original disk. Alternatively, you can split the new space between Linux and Windows.

Adding a disk poses little risk of data loss, and it isn't very tricky to do. Thus, if you have the money and aren't inclined to try anything more complex, it's the best way to install Linux. On the other hand, a backup/restore operation shouldn't be beyond your means—every computer should have adequate backup/restore hardware. Therefore, if you shy away from this option because you lack the hardware, that's a sign that your hardware is inadequate.

Backing Up and Restoring

Traditionally, reconfiguring partitions has required backing up your data, repartitioning the disk, and restoring the data to the new partitions. To do this, you'll need adequate backup hardware and software. The hardware is likely to be a tape backup drive, an optical device such as a DVD-R, or a removable disk.

Software for this procedure is OS-specific. A variety of commercial backup programs exist for Windows, and many tape drives come with such software. Alternatively, you can use a bootable Linux emergency system to back up a Wndows system. (Chapter 17, "Protecting Your System with Backups," covers Linux backup software and emergency recovery systems.) Whatever method you use, some caveats are in order:

Making Multiple Backups Backups sometimes fail, and Murphy's Law guarantees that if you make just one backup, it will fail after you repartition your computer. Therefore, you should make at least two backups before you intentionally destroy your original data.

Filename Protection Some backup methods don't back up both the short (8.3) and long filenames from FAT partitions. Both can be important. Linux tools, in particular, discard the short filenames and then re-create them at restoration. If the re-created short filename doesn't match the original, though, and if the short filename was used in a configuration file, bizarre problems may occur.

Restoring Windows Partitions Some Windows backup tools—especially some older ones—use awkward DOS-based restore tools. These tools can make it difficult or tedious to recover a working system. Be sure you understand the procedures involved before proceeding. If possible, test the restore operation on a noncritical system.

Restoring Bootability You may need to run a special utility to make your OS bootable again after restoring it. For DOS and Windows 9x/Me, you must boot from a floppy and type SYS C:. In Windows NT/2000/XP, the equivalent tool is called FIXMBR. Be sure you have a boot floppy and any tools you need to perform this operation before proceeding.

On the whole, the backup/repartition/restore juggling act is an awkward and time-consuming one. An error may yield a lost OS. If you're confident in your backup hardware and software, though, this may be the way to go.

Using Dynamic Partition Resizers

Some tools enable you to alter the size of a partition without deleting data on the partition. These dynamic partition resizers are popular tools for preparing a system to multiboot Linux and another OS, but they aren't without their risks. A bug, power loss, disk error, or other problem in operation could result in serious data loss—even an unusable OS. Thus, you should always create a backup before using such a tool. Because of the data-loss risks, the convenience of dynamic partition resizers does not offer as much of an advantage over backup/repartition/restore operations as it might at first appear. If you're interested in pursuing this course, you have several options, including:

FIPS The First Interactive Nondestructive Partition Splitting (FIPS) program is a simple DOS tool designed to split a primary FAT partition in two. The target partition must be defragmented before operation, because FIPS can't move data around on the partition. FIPS comes with many Linux distributions.

GNU Parted This program ( is a multi-filesystem partition resizer. It's much more flexible than FIPS, but it runs only from Linux, which presents a chicken-and-egg problem if you're trying to install Linux on a system. You can obtain Linux boot floppy disk images with Parted at to work around this problem. Parted can resize FAT, ext2fs, ext3fs, ReiserFS, and Linux swap partitions.

PartitionMagic This program is a popular commercial partition resizer from PowerQuest ( It presents a friendly GUI (as shown in Figure 10.1) for manipulating partitions, even when it runs from DOS. PartitionMagic can resize FAT, New Technology File System (NTFS), ext2fs, ext3fs, and Linux swap partitions. Versions prior to 6.0 also supported OS/2's High-Performance File System (HPFS), but support for other filesystems is better in later versions. PartitionMagic runs from Windows or DOS.

Figure 10.1: PartitionMagic provides a GUI interface to simplify partition resizing.

As a general rule, FIPS or GNU Parted may be worth using for a one-time installation of Linux to a system that already runs Windows. These programs can't resize an NTFS partition, though, so they may not be useful when installing Linux to a Windows NT, 2000, orXP system; for that, you'll need PartitionMagic. As this software costs about as much as a new hard disk, you might prefer to add a new disk rather than buy PartitionMagic. On the other hand, if you regularly juggle partitions, PartitionMagic may be worth having.

0 0

Post a comment