The following sections contain information regarding partitioning in your native operating system prior to Debian installation. Note that you’ll have to map between how the other operating system names partitions and how Linux names partitions; see Table 2.1 on page [*].

Partitioning from DOS or Windows

If you are manipulating existing FAT or NTFS partitions, it is recommended that you use either the scheme below or native Windows or DOS tools. Otherwise, it is not really necessary to partition from DOS or Windows; the Linux partitioning tools will generally do a better job.

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.