Linux Fundamentals

Linux, File Systems, and Partitions

The methods employed by Unix to construct a file system which consists of file systems, partitions and directories can be confusing when viewed for the first time. First of you must understand some simple facts:

  • A computer can only have 4 “real” partitions, called primary partitions.
  • If a system requires more than 4 partitions, then one of the 4 primaries must be converted to an extended partition.
  • An extended partition cannot directly contain files; it can only contain links to other logical partitions whose sum total size cannot exceed that of the extended partition.
  • Each partition in Linux can be identified by a file that corresponds to the partition; these files follow a specific naming convention, which I will address in a later article.

In Unix, primary partitions are always numbered 1 through 4, this number included your extended partition as well. Any logical partitions that are created within the extended partition are numbered 5 and up. For example, a system with 2 primaries and an extended that contains 2 logical partitions would have partitions 1, 2, 3, 5, and 6. Another system with a single primary, and an extended containing 1 logical partition would have partitions 1, 2, and 5. Note that when you partition a Linux system you have the ability to choose the numbers of your partitions. For example, the same system with 1 primary and a logical partition in the extended could have partitions 2, 4, and 5. You cannot control the numbering of logical partitions.

When partitions are created, they must be created to hold a specific type of data, or for a specific type of operating system or file system. This is done by using a code to denote the partition type. Many utilities do this for you. DOS FDisk for example, is only able to create partitions that are FAT16, or FAT32. Below is a screen shot of a partition type listing from the Linux FDisk utility. Note the various types of partitions and the corresponding hexadecimal codes.


On Linux, you will commonly use partition types 82, 83, and 85. In my next article on how to install Linux, we will use this utility to create partitions and set types.

Finally you must place a file system on a partition. File systems and partition types are independent of each other – sort of. The type of partition you create does not force you to use a specific type of file system, but it does limit your choices as the partition must support the file system you wish to place on it. For example, partition type 83 – Linux can contain several different file systems including Ext2 and the newer Ext3, but cannot contain the FAT file system. You place the file system on the partition when you format it.

In the next article I will cover the installation of a Red Had 7.2 Linux system. Although you can use any version of Linux, Red Hat is the most popular and has the widest support system. Other distributions that you may select include SuSE, Mandrake, and Caldera, with my personal favorite being Caldara OpenLinux eServer. To prepare for the installation, you will need to first acquire a copy of Red Hat 7.2. This can be done by visiting and navigating to the downloads section. From there you can download both ISO images. ISO images are sector by sector copies of a CD. Most CD writing software will recognize an ISO image and when you open it they will prompt you to write it to a CD. If all goes well you will have a set of bootable CD’s for the installation. One thing to note is that when downloading the ISO Images; select a mirror site other that Red Hat’s FTP server, or your download will take a really long time. Even so, depending on your bandwidth, the CD’s will take several hours at a minimum.