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 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 from SunOS

It's perfectly fine to partition from SunOS; in fact, if you intend to run both SunOS and Debian on the same machine, it is recommended that you partition using SunOS prior to installing Debian. The Linux kernel understands Sun disk labels, so there are no problems there. Just make sure you leave room for the Debian root partition within the first 1GB area of the boot disk. You can also place the kernel image on a UFS partition if that is easier than putting the root partition there. SILO supports booting Linux and SunOS from either EXT2 (Linux), UFS (SunOS), romfs and iso9660 (CDROM) partitions.

3.5.2. Partitioning from Linux or another OS

Whatever system you are using to partition, make sure you create a “Sun disk label” on your boot disk. This is the only kind of partition scheme that the OpenBoot PROM understands, and so it's the only scheme from which you can boot. In fdisk, the s key is used to create Sun disk labels. You only need to do this on drives that do not already have a Sun disk label. If you are using a drive that was previously formatted using a PC (or other architecture) you must create a new disk label, or problems with the disk geometry will most likely occur.

You will probably be using SILO as your boot loader (the small program which runs the operating system kernel). SILO has certain requirements for partition sizes and location; see Appendix B, Partitioning for Debian.