Lossless Repartitioning

One of the most common installations is onto a system that already

contains DOS (including Windows 3.1), Win32 (such as Windows 95, 98,

NT), or OS/2 and it is desired to put Debian onto the same disk

without destroying the previous system. As explained in section

2.3.1 on page [*], decreasing the size of an existing partition will

almost certainly damage the data on that partition unless certain

precautions are taken. The method described here, while not

guaranteed to protect your data, works extremely well in practice.

As a precaution, you should _make a backup_.

Before going any further, you should have decided how you will

divide up the disk. The method in this section will only split a

partition into two pieces. One will contain the original operating

system, and the other will be used for Debian. During the

installation of Debian, you will be given the opportunity to use the

Debian portion of the disk as you see fit, i.e., as swap or as a

filesystem.

The idea is to move all the data on the partition to the beginning

before changing the partition information, so that nothing will be

lost. It is important that you do as little as possible between the

data movement and repartitioning to minimize the chance of a file

being written near the end of the partition as this will decrease

the amount of space you can take from the partition.

The first thing you need is a copy of FIPS, which is available in

the tools directory on your Debian CD-ROM. This disk must be

bootable. Under DOS, a bootable floppy can be created using the

command sys a: for a previously formatted floppy or format a: /s for

an unformatted floppy. Unzip the archive and copy the files

RESTORRB.EXE, FIPS.EXE and ERRORS.TXT to the bootable floppy. FIPS

comes with very good documentation that you may want to read. You

should definitely read the documentation if you use a disk

compression driver or a disk manager. Create the disk and read the

documentation _before_ you continue.

The next thing to be done is to move all the data to the beginning

of the partition. DEFRAG, which comes standard with DOS 6.0 and

later, can easily do the job. See the FIPS documentation for a list

of other software that may also work. Note that if you have Windows

95 or higher, you must run DEFRAG from there, because DOS doesn’t

understand VFAT, which is used to support long filenames in Windows

95 and higher.

After running the defragmenter (which can take a while on a large

disk), reboot with the FIPS floppy disk you created. Simply type a:\

fips and follow the directions.

Note that there are many other other partition managers out there,

in case FIPS doesn’t work for you.

Debian GNU/Linux : Guide to Installation and Usage · 第 29 / 193 题