3.5. Pre-Partitioning for Multi-Boot Systems

Partitioning your disk simply refers to the act of breaking up your disk into sections. Each section is then independent of the others. It's roughly equivalent to putting up walls inside a house; if you add furniture to one room it doesn't affect any other room.

If you already have an operating system on your system (Tru64 (Digital UNIX), OpenVMS, Windows NT, FreeBSD, …) and want to stick Linux on the same disk, you will need to repartition the disk. Debian requires its own hard disk partitions. It cannot be installed on Windows or MacOS partitions. It may be able to share some partitions with other Linux systems, but that's not covered here. At the very least you will need a dedicated partition for the Debian root.

You can find information about your current partition setup by using a partitioning tool for your current operating system. Partitioning tools always provide a way to show existing partitions without making changes.

In general, changing a partition with a file system already on it will destroy any information there. Thus you should always make backups before doing any repartitioning. Using the analogy of the house, you would probably want to move all the furniture out of the way before moving a wall or you risk destroying it.

If your computer has more than one hard disk, you may want to dedicate one of the hard disks completely to Debian. If so, you don't need to partition that disk before booting the installation system; the installer's included partitioning program can handle the job nicely.

If your machine has only one hard disk, and you would like to completely replace the current operating system with Debian GNU/Linux, you also can wait to partition as part of the installation process (Section 6.3.2.1, “Partitioning Your Disks”), after you have booted the installation system. However this only works if you plan to boot the installer system from tapes, CD-ROM or files on a connected machine. Consider: if you boot from files placed on the hard disk, and then partition that same hard disk within the installation system, thus erasing the boot files, you'd better hope the installation is successful the first time around. At the least in this case, you should have some alternate means of reviving your machine like the original system's installation tapes or CDs.

If your machine already has multiple partitions, and enough space can be provided by deleting and replacing one or more of them, then you too can wait and use the Debian installer's partitioning program. You should still read through the material below, because there may be special circumstances like the order of the existing partitions within the partition map, that force you to partition before installing anyway.

If none of the above apply, you'll need to partition your hard disk before starting the installation to create partition-able space for Debian. If some of the partitions will be owned by other operating systems, you should create those partitions using native operating system partitioning programs. We recommend that you do not attempt to create partitions for Debian GNU/Linux using another operating system's tools. Instead, you should just create the native operating system's partitions you will want to retain.

If you are going to install more than one operating system on the same machine, you should install all other system(s) before proceeding with Linux installation. Windows and other OS installations may destroy your ability to start Linux, or encourage you to reformat non-native partitions.

You can recover from these actions or avoid them, but installing the native system first saves you trouble.

If you currently have one hard disk with one partition (a common setup for desktop computers), and you want to multi-boot the native operating system and Debian, you will need to:

  1. Back up everything on the computer.

  2. Boot from the native operating system installer media such as CD-ROM or tapes.

  3. Use the native partitioning tools to create native system partition(s). Leave either a place holder partition or free space for Debian GNU/Linux.

  4. Install the native operating system on its new partition.

  5. Boot back into the native system to verify everything's OK, and to download the Debian installer boot files.

  6. Boot the Debian installer to continue installing Debian.

3.5.1. Partitioning in Tru64 UNIX

Tru64 UNIX, formerly known as Digital UNIX, which is in turn formerly known as OSF/1, uses the partitioning scheme similar to the BSD “disk label”, which allows for up to eight partitions per disk drive. The partitions are numbered “1” through to “8” in Linux and “lettered” “a” through to “h” in UNIX. Linux kernels 2.2 and higher always correspond “1” to “a”, “2” to “b” and so on. For example, rz0e in Tru64 UNIX would most likely be called sda5 in Linux.

Partitions in a Tru64 disk label may overlap. Moreover, if this disk will be used from Tru64, the “c” partition is required to span the entire disk (thus overlapping all other non-empty partitions). Under Linux this makes sda3 identical to sda (sdb3 to sdb, if present, and so on). However, the partman partitioning tool used by debian-installer cannot handle overlapping partitions at present. As a result, it is currently not recommended to share disks between Tru64 and Debian. Partitions on Tru64 disks can be mounted under Debian after installation has been completed.

Another conventional requirement is for the “a” partition to start from the beginning of the disk, so that it always includes the boot block with the disk label. If you intend to boot Debian from that disk, you need to size it at least 2MB to fit aboot and perhaps a kernel. Note that this partition is only required for compatibility; you must not put a file system onto it, or you'll destroy data.

It is possible, and indeed quite reasonable, to share a swap partition between UNIX and Linux. In this case it will be needed to do a mkswap on that partition every time the system is rebooted from UNIX into Linux, as UNIX will damage the swap signature. You may want to run mkswap from the Linux start-up scripts before adding swap space with swapon -a.

If you want to mount UNIX partitions under Linux, note that Digital UNIX can use two different file system types, UFS and AdvFS, of which Linux only understands the former.

3.5.2. Partitioning in Windows NT

Windows NT uses the PC-style partition table. If you are manipulating existing FAT or NTFS partitions, it is recommended that you use the native Windows NT tools (or, more conveniently, you can also repartition your disk from the AlphaBIOS setup menu). Otherwise, it is not really necessary to partition from Windows; the Linux partitioning tools will generally do a better job. Note that when you run NT, the Disk Administrator may offer to write a “harmless signature” on non-Windows disks if you have any. Never let it do that, as this signature will destroy the partition information.

If you plan to boot Linux from an ARC/AlphaBIOS/ARCSBIOS console, you will need a (small) FAT partition for MILO. 5 MB is quite sufficient. If Windows NT is installed, its 6 MB bootstrap partition can be employed for this purpose. Debian etch does not support installing MILO. If you already have MILO installed on your system, or install MILO from other media, Debian can still be booted from ARC.