From: Jason Stacy on
Assume I have a second hard disc in my system.
Can I put only one extended/logical partiton on it?

or is at least one primary partition per hard disc necessary?

J.

From: Grant on
On 19 Apr 2008 23:27:41 GMT, jjstacy(a)yahoo.net (Jason Stacy) wrote:

>Assume I have a second hard disc in my system.
>Can I put only one extended/logical partiton on it?

Yes.

Grant.
From: Aragorn on
Jason Stacy wrote:

> Assume I have a second hard disc in my system.
> Can I put only one extended/logical partiton on it?

Yes, you can. In fact, if GNU/Linux is your only operating system, you
could even do that on your system disk.

The Linux kernel doesn't care whether it lives in a partition that's either
primary or logical. That's just legacy stuff from the days of DOS, and
both OS/2 and Windows still require primary partitions to exist.

The DOS-based versions of Windows needed to be installed in an active and
primary partition starting within the first 32 MB of the disk volume, on
the first disk found by the BIOS. For NT-based systems, only the
bootloader and a few files need to exist in such a primary partition, while
the rest can be installed in a logical partition in an extended partition
container, or even on another disk.

UNIX-style operating systems like GNU/Linux have traditionally not cared
about the partition being primary or logical.

> or is at least one primary partition per hard disc necessary?

Negative, although you may be surprised to hear that even an extended
partition container is in fact a primary partition. The definition
"primary partition" simply means that it's a partition with its entry in
the partition table in the disk's master boot record. Logical partitions
have their partition entry in the extended partition container.

The whole thing came to be when hard disks started becoming available with
capacities that exceeded 32 MB, e.g. the 40 and 60 MB hard disk in the IBM
PS/2 series. The FAT filesystem under DOS 3.xx could only handle 32 MB, so
a second partition was needed to take advantage of the extra space, but DOS
(and later on the DOS-based Windows versions) could only handle one primary
partition per disk, so the concept of an extended partition container was
born, i.e. a primary partition that holds other, logical partitions,
together with a partition table for them.

In addition, it was a solution for the fact that systems using the
legacy /x86/ BIOS can only handle four primary partitions, while more
partitions may be needed. However, systems with an EFI BIOS - this is
still rare in the /x86/ world - can handle as much as 128 primary
partitions per disk.

Technically, you can even do without a partition at all for GNU/Linux and
simply format the available diskspace, but this is not something I would
advise. Especially for UNIX systems, I am much rather a proponent of using
different partitions for specified branches of the filesystem hierarchy
tree. For instance, you best split off */var* and */home* from the root
filesystem, and have */tmp* exist on a /tmpfs./

I personally split off way more than that on my own systems and on our
network's servers, but at least those(/three) two are the ones containing
variable files and are thus best separated from the static data. Splitting
certain subtrees off from the root filesystem also allows you to mount them
with different options - e.g. read-only - or to even have them housing a
different filesystem type.

Either way and to summarize, if you're running an NT-based Windows on your
system - e.g. XP or Vista - then only the partition containing the Windows
bootloader needs to be primary (and marked active), regardless of whether
you install the main Windows system in it or in another partition.
Everything else can be a logical partition in an extended partition
container. If on the other hand your system _only_ runs GNU/Linux, then
none of it matters.

The most common set-up for dual-booting systems with Windows and GNU/Linux
is to have an active primary partition on the first disk in which you
install Windows, and to use logical partitions on all disks from there on
for both the Windows data partitions and the GNU/Linux partitions.

--
Aragorn
(registered GNU/Linux user #223157)
From: VanguardLH on
Jason Stacy wrote:

> Assume I have a second hard disc in my system.
> Can I put only one extended/logical partiton on it?
>
> or is at least one primary partition per hard disc necessary?

------------------------------------------------------------
NOTE: FollowUp-To ignored. If your post was on-topic to each of the
newsgroups to which you cross-posted then the continued discussion is
also on-topic. Don't be rude by yanking away a discussion from visitors
in the other newsgroups to what you like as your "home" group (since you
can see the replies there, anyway, because you cross-posted). If you
don't want to show the discussion there then don't cross-post there.
------------------------------------------------------------

You must meet all of the following conditions:

x = 1 (or 0) to 4 primary partitions (*)
y = 0 or 1 extended partition
x + y = 1 to 4 partitions

Or, put another way:

- Primary partitions:
1 minimum (or 0 minimum) (*)
4 maximum
- Extended partitions:
0 minimum
1 maximum
- Total partition count:
1 minimum
4 maximum

(*) The 1 minimum primary partition applies to the first hard disk that
is detectable by the BIOS.

After the BIOS completes its POST (power-on self test), it loads the
bootstrap program from the MBR (master boot record) from the first hard
disk that it finds. The first sector of the hard disk is the MBR and is
not allocated to any partition (as well as the remaining 62 sectors of
the first track on the hard since tracks are assigned in 63-sector
increments). The first 446 bytes are the bootstrap program. So the
BIOS needs to load the bootstrap program into memory and pass control to
it. The BIOS *only* looks for the bootstrap program from the MBR on the
*first* hard disk detected.

The standard bootstrap program reads the partition table (also in the
MBR on the first hard disk). It looks for which partition is marked
"active". Only primary partitions can be marked with a status of active
and only one primary partition can be active at a time. The bootstrap
program uses the partition table information to figure out where the
partitions reside. Partition entries in the MBR can only define areas
within the same hard disk. So the bootstrap program finds which primary
partition is active and that partition must be on that hard disk. The
MBR bootstrap program then loads the OS boot loader starting in the
first sector of the active (primary) partition.

This is the old BIOS scheme of how to boot a system. The BIOS loads the
bootstrap program in the MBR from the first detected hard disk which
reads the partition tables in the same MBR to then load the OS boot
loader in the primary partition marked as active and which can only
reside on the same hard disk since partition tables only delineate areas
on that hard disk. Other software-based schemes have evolved that
replace the OS boot loader in the first sector of the partition (that
the MBR bootstrap loaded), the OS loader lets you specify from where to
load the actual OS (like Microsoft's dual-boot), or they replace the MBR
bootstrap program to eliminate the restriction that the boot partition
is primary or even has to be on the same hard disk. So with a multiboot
manager replacement for the bootstrap program, you can boot to any type
of partition (primary or to a logical drive under an extended partition)
which can be on any hard disk. Some BIOSes have been extended to
perform the same functionality as the software multiboot managers to
allow booting from any partition or logical drive on any hard disk.

So it depends on the capabilities of your BIOS and/or bootstrap program
as to how you can setup your partitions. For the old BIOS scheme using
a standard bootstrap program, you'll need a minimum of 1 primary
partition on the first BIOS-detectable hard disk. For newer extended
BIOS schemes or when replacing the MBR bootstrap program, your limits
are still based on what that extended BIOS or multiboot software can do
but those exceed what you could do under the old scheme.

RTFM
From: Arno Wagner on
In comp.sys.ibm.pc.hardware.storage Jason Stacy <jjstacy(a)yahoo.net> wrote:
> Assume I have a second hard disc in my system.
> Can I put only one extended/logical partiton on it?

> or is at least one primary partition per hard disc necessary?

It is advisable to avoid having a second primary parition,
as Windows stupidly will give it the letter D: and shift all
other letters.

However, besides this little quirk that comes with the by
now quite outdated and historic concept of drive letters,
you can have an additional primary partion. In fact
you can have up to 4 per disks, but again, that is likely
a bad idea with Windows.

Arno