Re: why multiple ext3fs partions in a single dos partition is good.

Kohtala Marko (Marko.Kohtala@ntc.nokia.com)
Tue, 19 Aug 1997 11:15:49 +0300


> He's talking about a limit of 4 partitions and a way out for folks who

Yes. My message was getting long and I shortened it. I accidentally
removed the comment that you _can_ have lots of extended partitions.

But let's first clarify this discussion. I believe there are a few
mistakes in the subject.

1) There is no ext3 filesystem. This must be a typo and mean ext2.

2) The DOS partition actually means a primary partition. A partition
made in the way DOS makes partitions. Other operating systems have now
adopted this method of partitioning to allow DOS coexist with them on
PCs. This method has a way to mark partitions for lots of different
filesystems.

Since there seems to be sevaral people with no idea how partitions
work, I'll provide an explanation.

There are three kinds of partitions. Primary, extended and
logical. Primary partitions are limited to four and are the partitions
mentioned in the partition table on the first sector of a disk.

A partition in primary partition table can be marked to be an extended
partition. The extended partition can further divided to additional
logical partitions.

You can have up to 63 partitions on one IDE disk, four of which are in
primary partition table and rest are logical drives from extended
partition. This limitation is due to allocated minor numbers for the
device. If you use only extended partitions for Linux, FreeBSD, NetBSD
etc., you still have three primary partitions left for operating
systems that can not boot to extended partition such as DOS/Windows.

Techically this happens so that the primary partition table has four
entries and one of those is an extended partition. This extended
partition always has a partition table to divide the extended
partition into logical drives. This division happens such that the
partition table in extended partition contains two entries, one for
the logical drive and another for the extended partition containing
the rest of the logical drives.

To illustrate, here is a picture of partitions.

+----------------------------------+
| MSDOS/Windows /dev/hda1 |
+----------------------------------+
| OS/2 Boot Manager /dev/hda2 |
+----------------------------------+
| Extended /dev/hda3 |
| +--------------------------------+
| | Linux ext2 / /dev/hda5 |
| +--------------------------------+
| | Extended |
| | +------------------------------+
| | | Linux swap /dev/hda6 |
| | +------------------------------+
| | | Extended |
| | | +----------------------------+
| | | | Linux ext2 /usr /dev/hda7 |
| | | +----------------------------+
| | | | Extended |
| | | | +--------------------------+
| | | | | OS/2 HPFS /dev/hda8 |
+-+-+-+-+--------------------------+
| Windows NT /dev/hda4 |
+----------------------------------+

In addition to this, I have heard that the UFS support has similar
functionality to divide one primary partition into multiple
subpartitions. However, since we have extended partitions this is not
necessary and can not be used with OS/2 and Windows NT.

Any FAQ maintainers are free to modify and add this to their FAQs. I
glanced a couple FAQ and did not find an explanation. Lilo
documentation most likely has some similar documentation too.

--
---
Marko Kohtala - Marko.Kohtala@ntc.nokia.com, Marko.Kohtala@hut.fi