l i n u x - u s e r s - g r o u p - o f - d a v i s
L U G O D
 
Next Meeting:
September 2: Social gathering
Next Installfest:
TBD
Latest News:
Aug. 18: Discounts to "Velocity" in NY; come to tonight's "Photography" talk
Page last updated:
2001 Dec 30 17:12

The following is an archive of a post made to our 'vox-tech mailing list' by one of its subscribers.

Report this post as spam:

(Enter your email address)
Re: [vox-tech] Primary vs. Extended Partitions
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [vox-tech] Primary vs. Extended Partitions



On Wed, 3 Oct 2001, Robert G. Scofield wrote:
> If you need to create a new partition on a Windows 2000 machine to add 
> Linux in order to dual boot, does it make any difference whether you 
> make a new primary partition or a new extended partition?

(You may want to read this as a complete doc before attemtping it.)

I have not encountered any difference for Linux using extended
partitions. Actually, I use this system on our single disk systems that
have ATA/IDE drives. It is rather tricky to have more than 4 primary
partitions on one of these HD. If Windows is involved, I'll often put
Windows 2000 on the first partition (NTFS), and Windows ME on the second
partition (FAT-32) so that each sees its local start-disk as "Drive
C:". The obvious benefits include have two separate registries and windows
trees since Windows ME/98/95 does not read NTFS by default and does not
assign a "C:" drive to the first partition, but instead assigns it to the
first windows/DOS-like partition (Partition 2) which becomes Drive drive
C: when in Windows ME/98/95. Copying files between the two becomes a bear,
and you need to install on two separate trees any time you want an app on
both that requires resistration services in windows, but windows 2000 can
read the Fat32 partition and copy files to the Win ME/98/95.

To install Windows ME after Windows 2000, do not just boot from the WinME
and take the deafults. Boot from the floppy (or ifyou made a bootable
WinME CD like I did, then boot from that) and when the option comes up
asking if you want to install WIndowsME, choose not to. Instead, choose to
boot with CD-ROM support. THEN, change drives to the CD-ROM drive (D: on
many systems) and cd to WIN9X and run SETUP.EXE from that directory. (The
setup on the root of the CD may try to destroy all of your partitions on
the disk and sety one big partition for Windows ME)

After Windows is done, you will have 2-3 "primary" partitions. (2 if you
have WinME and Win2k each on separate partitions, 3 if you only have only
Win2K on one partition.)

You *can* use Windows 2000's built in partition system, but there is a bit
of risk with it and Linux. Why? It does not always stop at the Cyl
boundary. This can create complications with LILO finding the place on
disk to reference the start or end of the partition. As I understand it,
and I can be wrong here, Windows 2K with NTFS has an added "feature" to
allow you to specify partitions that do not stop at the cyl boundary. This
allows you to effectively say you want to make partition 1 use cyls
1-892.25 (yes, that is a decimal) but make complications for LILO and
other boot managers. For LILO, this can often be "fixed" (heh) by adding
the option "fix-table" to /etc/lilo.conf (see man lilo.conf for info on
what it does.)

How to get around this? What I do, is to install Linux first - or at least
partition the disk with Linux, and set the first 2 partitions to use the
space desired for Windows 2000 and Windows ME. I set the first to be of
type NTFS, and the second to be of type FAT-32 LBA. Then I set the 3rd for
linux, and make the 4th an extended partition using up all remaining
space. In that extended partition, I create the remaining Linux
partitions. (If, I have 3 partitions available, then I set "swap" to be
the 3rd partition and root ("/") to be partition 2. If I only have 2
partitions available, I set the 3rd partitions to be root ("/")

The sub-partitions of the extended partition, become things like:
(Often in this order:)
swap  (If not used as a primary)
/var  (At Least 5Gb, prefer more)
/home (Depends on your users' needs.)
/tmp  (At least 1Gb, prefer 3Gb or more)
/usr  (At least 4Gb, prefer more.)
/usr/local (Depends on your customization for added compiled packages. I
use at least 3Gb, preferably more)

I use this order on many systems because of how I see the fs being used on
many linux boxes. I have not benchmarked this, so this may be just
something that seems like it should work, but here goes...

By placing the "swap" partition near the middle of the disk, you make the
average seek time to swap any time you use it minimized. On average, no
matter where the heads are on ths disks (tarck-wise), they need only seek
at most, half the distance to center. The root filesystem is used a lot
during boot, but there is some caching for frequently accessed files. Next
busiest on server machines is often /var for web servers that use
/var/www, and for the loging often stored in /var/log. Systems with many
users, will often seem more use in /home as user do stuff in their home,
log in, and log out, so /home or /var may change places on some systems I
install. /tmp can get a lot of files on systems with many users, so it is
often next. Then /usr is next with the many user based binaries that are
executed, and /usr/local/ is last since that includes stuff often added to
the system afterwards, and if the new src trees are meant to replace the
old system copies, then the PREFIX in the src can just be changed to
"/" or "/usr" to decrease user access to these files.

How much speedup you can gain with this is probably fairly small in
comparison to other things. For example, having swap on a separate high
speed SCSI bus with nothing else, and having each partition/volume on a
separate SCSI disk, and having your tape backup on yet another
bus. Another thing that can offer more speedups might be memory on slow
systems, or even a newer faster HD to replace a cheaper HD that might be
2+ years old.

For me, making my root ("/") partition a primary and also Swap if I have
a spare primary partition and use the rest as extended for irrational
reasons. (It just "seems" right.)

> What are the relative advantages and disadvantages between using an
> extended vs. a primary partition for Linux?

Biggest plus include being able to have more than 4 partitions
availbale on a Linux Only HD, and more than 1, 2 or 3 if you are sharing
your HD with other OS.

Minuses? Hm. My thought back in 1995 on this was that a primary partition
might be more easily recognized by a volume checking program (fsck,
checkdsk, etc), but I have not come across a place where this ever
happened! If the OS can recognize the partition, then its tools for
fixing/checking the partition/volume should work.

Another issue, if you do any work in the /dev files, just dont play around
too much with the /dev/hd?? that maps to the allocated "Extended
partition". The OS will/should not recognize it as a valide volume. Dont
format it, or else you will lose all of the sub-partitions that are part
of the extended partition.

Your partitions listed from df will skip some values in the /dev/hdaX
(assuming you have ATA/IDE primary master with multiple parts)

You wont see the "swap" partition so that "X" will be skipped, and the
extended partition "X" will also not be mapped to a mountpoint - assuming
it is working as it should.

-ME

-----BEGIN GEEK CODE BLOCK-----
Version: 3.12
GCS/CM$/IT$/LS$/S/O$ !d--(++) !s !a+++(-----) C++$(++++) U++++$(+$) P+$>+++ 
L+++$(++) E W+++$(+) N+ o K w+$>++>+++ O-@ M+$ V-$>- !PS !PE Y+ !PGP
t@-(++) 5+@ X@ R- tv- b++ DI+++ D+ G--@ e+>++>++++ h(++)>+ r*>? z?
------END GEEK CODE BLOCK------
decode: http://www.ebb.org/ungeek/ about: http://www.geekcode.com/geek.html
     Systems Department Operating Systems Analyst for the SSU Library




LinkedIn
LUGOD Group on LinkedIn
Sign up for LUGOD event announcements
Your email address:
facebook
LUGOD Group on Facebook
'Like' LUGOD on Facebook:

Hosting provided by:
Sunset Systems
Sunset Systems offers preconfigured Linux systems, remote system administration and custom software development.

LUGOD: Linux Users' Group of Davis
PO Box 2082, Davis, CA 95617
Contact Us

LUGOD is a 501(c)7 non-profit organization
based in Davis, California
and serving the Sacramento area.
"Linux" is a trademark of Linus Torvalds.

Sponsored in part by:
Appahost Applications
For a significant contribution towards our projector, and a generous donation to allow us to continue meeting at the Davis Library.