Can a (second) hard disc consist of only 1 extended/logical partition? Or is at least one primary ne

J

Jason Stacy

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.
 
A

Aragorn

Jason said:
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.
 
V

VanguardLH

Jason said:
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
 
A

Arno Wagner

In comp.sys.ibm.pc.hardware.storage Jason Stacy said:
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
 
D

Daave

VanguardLH said:
------------------------------------------------------------
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.
------------------------------------------------------------

How exactly does Follow-Up work? I looked at OP's headers and noticed
Follow-Up. Why it used? How? I wasn't able to tell which news reader was
used, either.

Is it ever appropriate to use Follow-Up? How does one undo Follow-Up
(which I presume you did)?
 
V

VanguardLH

Daave said:
How exactly does Follow-Up work? I looked at OP's headers and noticed
Follow-Up. Why it used? How? I wasn't able to tell which news reader was
used, either.

If your newsreader doesn't alert you (and Outlook Express will not) then
you need to notice the Newsgroups header of the article that you read
versus the Newsgroups header in your reply. If they are different, a
FollowUp-To header was probably used. This means when you reply, the
poster is deliberately trying to redirect your reply to only one or some
of the original newsgroups or even to a completely different newsgroup
(spammers and malcontents love to try using FollowUp-To to redirect
negative replies to, say, alt.test). If you look at the headers of a
post and see a FollowUp-To, that post's author is trying to send replies
somewhere not expected. Usenet etiquette dictates that if you change
the Newsgroups header in your reply or you use the FollowUp-To header
that you announce it at the start of your reply so respondents know what
you did or are trying to do.

In Outlook Express and while composing a post, use the View -> All
Headers menu to show the FollowUp-To field. The FollowUp-To header is
usually not included in the overview headers when your newsreader polls
for a list of new messages on the NNTP server, so you cannot define a
rule that will delete or colorize any that use the FollowUp-To header.
However, in some newsreaders, you can still define a filter or score
value to posts when you yank them in full because all headers will then
be included. So my program can color them in the message list to notify
me that the poster used the FollowUp-To header when I pull their message
in full. I can also configure which headers, when present, will appear
in the header pane above the preview window showing the body of their
post. So if I add FollowUp-To as a header to display (and make it
bolded and colored) then I also see it there. OE can't do any of that.
At best, you can try to use the NewsProxy (aka nFilter) on your host
through which you yank newsgroups and have it drop or tag posts that use
the FollowUp-To header and use a rule in OE to look for the tag (if you
chose not to drop the post) but, again, that would only work if the NNTP
server to which you connect happens to include the FollowUp-To header in
the set of overview headers, and few NNTP server include it. OE can't
test on but a few headers, and FollowUp-To is not one of them so using
NewsProxy to add a tag is how you would get OE to exercise a rule on
them. You'd think that if you set OE to sync by yanking the whole
message instead of just headers that you would then have the tag added
by NewsProxy but OE doesn't update the headers that it already got from
a prior message poll that included the Subject, From, and other headers
for that post.

Because of nym-shifters, mail2news cowards, kooks, children (regardless
of age), and especially due to spam, I had to eventually give up using
OE (even with NewsProxy). I had trialed several newsreaders in several
tests over the last few years but they all had defects that I wouldn't
tolerate or would not meet my one critical criteria that I can sort
watched threads to the top of the message list. Obviously if I mark
them to be watched then I really do want to watch them without having to
scroll through dozens or hundreds of other posts to get to them, or
having to use some convoluted workaround. I had include 40tude Dialog
in those prior trials but canned it because of this deficiency. Decent
multi-column sorting is missing in many newsreaders. It was only
because I gave Dialog a lot more of a chance and spent 4 nights working
on scripts to get it to work at about 98% of what I demanded that I then
chose to stick with it.
Is it ever appropriate to use Follow-Up? How does one undo Follow-Up
(which I presume you did)?

No, I *ignored* the attempt to use FollowUp-To for a post sent to 4
groups that tried to send replies to just 1 of them. That means I made
the Newsgroups header in my post the same as the Newsgroups header in
the original poster's message; i.e., my replies went to the same groups
that the poster decided to submit their message. The original poster
claims those groups are all related to his topic (and I only remove them
if it is obvious that they are not) but is then rude in yanking away the
replies so the discussion disappears to a different group than where the
user read it. Below is my rant on the very poor usage of FollowUp-To
that is rampant because users are recommended to use it on some sites
but don't think it through using some logic.


--- Rant on inappropriate use of the FollowUp-To header ---

Don't use the FollowUp-To header. Posting to, say, 3 newsgroups but
moving replies to just 1 of them or to a completely different one means
you disconnect the visitors of those other 2 (or 3) newsgroups from the
rest of the discussion. If a newsgroup is appropriate for your post
then it is also appropriate for the replies. Or, converserly, if the
continued discussion of your post is not appropriate in all the
newsgroups to which you cross-posted then you should not have posted to
those other newsgroups in the first place. You are using the
FollowUp-To header to move replies to YOUR "home" newsgroup but which
the users of the other newsgroups may not visit. After all, if you
cross-post and include your "home" newsgroup then you'll see all those
replies in your home newsgroup and meanwhile all the other users can
still see the replies in their newsgroup where you decided to also
publish your post.

In http://www.faqs.org/faqs/usenet/primer/part1/, it says, "For a
cross-post, you may want to set the Followup-To: header line to the most
suitable group for the rest of the discussion". Read another way, that
means you disconnect the discussion from all the visitors of the other
newsgroups to which you decided to publish your post. Why did you
publish to those other newsgroups if you are going to yank the
discussion away from those users and perhaps even from the respondents
you were attempting to elicit? It is exasperating to post a reply and
never see it in the newsgroup where you read the original post. If your
post was appropriate for all the groups to which you cross-posted then
why wouldn't those same groups be appropriate for the replies? To yank
away the discussion to your "home" group is rude since that is probably
not the "home" group for your respondents. You wanted replies which may
require further replies but now your respondents no longer see the
thread in the newsgroup that they visit to where you published your
post. Also, the respondents may not know if their reply is appropriate
in the "home" group that you happen to choose. In general, malcontents
and spammers use the FollowUp-To header to hide negative replies to
their flame or spam posts, often sending the replies off to a *.test
newsgroup.

There are some cases where FollowUp-To should be used. For example, say
a newsgroup is supposed to only get used for citing the content of a
spam e-mail. Discussions about that spam are not supposed to be
published in that citing newsgroup. Just the exhibits are published
there. If someone wants to discuss that particular spam, their replies
should go into a different newsgroup meant for those discussions. I
believe that is how some of the NANAE newsgroups operate but the
principle may apply elsewhere but it is rare few newsgroups where
FollowUp-To is appropriate. For the vast majority of newsgroups,
FollowUp-To is *not* appropriate. If you do not want continue the
discussion in the other newsgroups then don't cross-post over there (and
then use FollowUp-To to yank away the continued discussion). If the
discussion is not appropriate in those other newsgroups then it seems
you have nominated your post to be spam.

If you do use the FollowUp-To header, you are expected per netiquette to
alert the readers of your post that you used that header. Be polite and
add a note (at the start of your post) saying that you used the header
(ex., "WARNING: FollowUp-To was used and points to <newsgroup>". You
might also want to explain why any further discussion in the other
newsgroups is inappropriate despite your rudeness in posting to those
other newsgroups. Many times respondents wonder where their reply post
went because they expect to see it in the group they visited and where
they read your post. Not all NNTP clients alert the user that the
poster used the FollowUp-To header. Think about it: you post to
multiple newsgroups but yank the replies to a different newsgroup than
where your respondents visited, then you need more help and reply to
those replies but which are now only in your "home" newsgroup, but the
respondents won't see their posts nor will they see your replies to them
asking for more help. FollowUp-To is not required when you cross-post
since your "home" newsgroup should be one those that were specified in
the list of newsgroups. You'll watch the discussion in your home
newsgroup and the respondents or lurkers can watch that same discussion
in their own newsgroup. If you don't want replies to show up in all the
newsgroups to which you cross-posted then don't cross-post over there in
the first place!

When crossposting, there are not multiple copies of your post that
wastes bandwidth for each to get them propagated to other NNTP servers
and there aren't multiple copies of your post consuming disk space. A
single copy gets sent to the other NNTP servers and a single copy
resides on each NNTP server with pointers to it to make it show up in
multiple newsgroups. You aren't saving bandwidth or disk space by
redirecting replies for a cross-posted message to a single newsgroup.
You are just being rude to the visitors of the other newsgroups to which
you cross-posted but tried to yank away the discussion.

--- End of rant ---

If you choose to continue this subthread which has become off-topic to
these newsgroups, I'll probably use FollowUp-To myself - but with notice
- to move it to news.software.readers where it is on-topic. I doubt the
hardware folks really want to debate over the pros and cons of various
newsreaders or over Usenet etiquette.
 
D

Daave

VanguardLH wrote:

If you choose to continue this subthread which has become off-topic to
these newsgroups, I'll probably use FollowUp-To myself - but with
notice - to move it to news.software.readers where it is on-topic. I
doubt the hardware folks really want to debate over the pros and cons
of various newsreaders or over Usenet etiquette.

That was very thorough. Thanks for the post!
 
S

sam

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

Thats only true of the 9* family, not to the NT,2K,XP,Vista family.
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.

Again, that varys with the Win family.
 
A

Andrew Gideon

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./

The style I like is to have one partition for /boot and the rest of the
disk in a single partition which is allocated to LVM. LVM volumes can
then be created for /home, /usr, /var, etc. This permits new volumes to
be created, or existing ones resized, w/o having to worry about the
concept of "disk layout".

This is also easily RAIDed by md.

Adding a non-boot disk, I create a single partition and allocate that to
LVM. In theory, this can be done using the entire disk (as opposed to a
single partition consuming the entire disk). But someone not expecting
this can be easily confused if he or she were to try to look at the
disk's partition table, so I avoid that choice in following the principle
of least astonishment.

- Andrew
 
J

John Thompson

(Follow-up set to comp.sys.ibm.pc.hardware.storage)
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.

OS/2 only needs a primary partition for its Boot Manager. If you're not
using the OS/2 Boot Manager you don't need a primary partition.
 
S

s. keeling

["Followup-To:" header set to comp.os.linux.hardware.]
Andrew Gideon said:
The style I like is to have one partition for /boot

Why? What's that get you if /sbin is unreadable?
and the rest of the
disk in a single partition which is allocated to LVM. LVM volumes can
then be created for /home, /usr, /var, etc. This permits new volumes to
be created, or existing ones resized, w/o having to worry about the
concept of "disk layout".

Or, have a 40 Gb disk, install (a la Aragorn) $OS, add a ca. 3 Gb
/scratch, and I've 26 Gb left to portion out whenever I wish. What
does lvm gain you in this situation but an added level of complexity?

[Sorry for the rant ...]

We've already the distros throwing their ideas of "simpler" at us, as
in UUIDs in /etc/fstab (b*st*rds!), and the *obvious* need to migrate
from a perfectly workable /dev/hd* /dev/sd* /dev/sr* to
/dev/_everything's_an_s_something.

Installers have improved greatly, don't get me wrong, and I'm very
grateful, but these sorts of changes ought to be user-selectable in
NON-expert mode installs. Sweeping changes demand strong warnings!

I helped a guy install etch on his sandbox yesterday. It was already
running Sidux fine. etch (non-expert) install insisted I install
grub. I told it /dev/hdb, where we were installing etch.

On reboot, Sidux' (all on hda) grub couldn't find ptn 5. Ripping
UUIDs out of Sidux menu.list and fstab and converting it back to /dev/hd*
fixed it.

Why did we have to go there? For the convenience of a bunch of dolts
who can't find their usb keys when they plug them in? Why are we
turning fstab and menu.lst into non-human-usable registries?

fdisk /dev/hda
Command (m for help): m
Command action
a toggle a bootable flag
b edit bsd disklabel
c toggle the dos compatibility flag
....
U Select UUID addressable partitions
....

or something. :-|

Sorry about that b*! crack, but I think this is going the wrong way.
 
Y

Yousuf Khan

Jason said:
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?

There should be no problem putting just an extended partition on a disk
these days. The only minor quibble you might have with it is that the
extended partition takes up one entire sector of the disk, so there
would be one less sector for your data. But these days you'll never
notice that little bit of space lost.

Yousuf Khan
 
F

Folkert Rienstra

Yousuf Khan wrote in news:[email protected]
There should be no problem putting just an extended partition on a disk
these days. The only minor quibble you might have with it is that the
extended partition takes up one entire sector of the disk, so there
would be one less sector for your data. But these days you'll never
notice that little bit of space lost.

Utter nonsense.
 
G

Guest

| 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.

That should be "WHEN tracks are assigned in 63-sector increments".
Although all hard drives today do use that number as the default, at one
time that was not true. You can still label/format the drive to specify a
different value, as well. I've done this specifying 8-sector increments
and it works fine in Linux (have not tested other systems). I regularly
do that on my USB flash keys. I'd do it on my SD(HC) memory cards if my
camera would accept it. But for some reason it gets confused, so I leave
it in the form originally on the memory card when I got it (I saved a
compressed copy of the original content image of the memory card so I
can restore it, as a means to reset the card).


| 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.

And some even allow booting from a specific sector offset from the whole
disk, allowing placement of the kernel image (or stage 2 image of a boot
loader) in the space intentionally left between partitions. You better
know what you are doing if you want to do stuff like that; it's not for
newbies in a production environment.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top