Operating Systems and Primary/Extended Partitions
Since most new Linux users are migrating from and dual booting with Windows, it is important to note the following:
Some Operating Systems, such as Windows, require the OS to be installed in and booted from a Primary partition. For Windows to run properly, certain files must be in the beginning part of the Primary, or master hard drive. The MBR (Master Boot Record) resides at the very beginning of the master hard drive (indicated by Linux as "hd0" or "sd0") and is checked first for the record of bootable partitions. Linux installs Stage 1 of GRUB in the MBR, which has a list of bootable partitions and Operating Systems.
Other Operating Systems, such as Linux, will boot and run from either a Primary or a Logical partition on any hard drive on your system as long as GRUB resides on the Primary hard drive in the MBR area. As such, the rest of the hard drive may be an extended partition as well, with Linux or any other Operating System that will boot from a Logical drive.
Personally, I would recommend that any Linux installation be done on a Logical partition. Linux will boot from either, and it will save you problems later down the road should you need or want to create additional partitions beyond the four Primary partitions allowed. In addition, it will conserve Primary space for installation of other Operating Systems that require a Primary partition, should you desire to install one. Windows is able to access properly formatted Logical drives; therefore it hurts nothing to have one Primary partition for the Operating System itself to reside in and the rest of the partitions for Windows to be in an Extended partition.
Additional Notes on Partitions
- A Primary partition cannot be expanded into free space encompassed by an Extended partition, nor can a Logical partition be expanded into free space outside of the Extended Partition.
- The only way to expand a Primary partition that is bordered by an Extended partition is to create space within the Extended partition and then shrink it, creating free space outside of it in which to expand the Primary partition.
- The only way to expand a Logical partition is to create free space next to it and within the Extended partition. You must either expand the Extended partition or move and/or shrink other Logical partitions to place free space next to it that is within the Extended Partition.
- A Logical partition cannot be moved outside of an Extended partition, nor can a Primary partition be moved into an Extended partition. (However, if there is enough free space, you can copy a primary partition into the extended partition, resulting in a logical partition, or vice versa, and then delete the original, resulting in a copy operation.)
- One partition cannot be moved past another partition in either direction; i.e., the order of the partitions on the hard drive cannot be changed.
If it is necessary, the only way that 2. or 3. above may be accomplished is to back up the data contained in the partition you wish to relocate, delete that partition, then create it in the free space or position desired. Once it is created the data can be copied back into it. Of course, if it has hidden Operating System files in it, it is best to back up the original partition to an image file and restore the image to the newly created partition.
- As was mentioned above, when shrinking a partition, you should leave some free space to reduce the likelyhood of fragmentation and make it easier to defragment. Fragmented files will cause your computer to run slower and increase the possibility of file corruption.
A rule of thumb is to keep at least 10% of the partition as free space. Personally, I like at least 25%.
- When you create or delete partitions, the "naming" or "drive letter assignment" of all of the partitions will change. This is particularly bothersome on Windows, some of whose software will store the drive letter to which it's stored files have been written, as well as the drive letters which are assigned to removable media. Linux will also experience some difficulties in this area, particularly if you have some of them entered in fstab.
Note that this will not affect your Windows drive letter order when you install Ubuntu. Windows does not recognize the ext3 or swap filesystems, and as such creation of these partitions will not affect it. Neither will the creation of an Extended partition.