home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Simtel MSDOS 1992 December
/
simtel1292_SIMTEL_1292_Walnut_Creek.iso
/
msdos
/
info
/
dostips6.arc
/
DOSPART
< prev
next >
Wrap
Text File
|
1987-02-15
|
6KB
|
90 lines
Hard Disk Partitioning
(PC Magazine Vol 6 No 4 Feb 24, 1987 PC Tutor)
One advantage of the open architecture of the IBM PC is that the
machine is not limited to a single operating system. Obviously, most
PCs and compatibles never run anything except Microsoft's MS-DOS.
(The version of MS-DOS that IBM sells is called DOS by IBM and is
often referred to as PC-DOS. It's still MS-DOS.) Some of the other
operating systems available for the PC are Digital Research's CP/M-86
and Concurrent PC-DOS, Microsoft's Xenix, and IBM's PC-IX.
When you first turn on your PC or reboot with Ctrl-Alt-Del, the
ROM BIOS goes through a checkout and initialization procedure. The
BIOS then attempts to load into memory the first sector of the first
surface of the first track of the floppy disk in drive A:. The first
sector on a floppy disk contains a small program (less than 512 bytes)
called a "bootstrap loader." If the floppy disk is bootable, the
bootstrap loader loads the rest of the operating system into memory.
The operating system is effectively pulling itself up by its own
bootstraps, which is why a system reset is called a boot.
On a hard disk system, the BIOS first attempts to boot from drive
A:. If drive A: does not contain a disk or the drive door is open, the
BIOS then tries to boot from the hard disk. Again, it reads into
memory the first sector of the first surface of the first cylinder of
the hard disk. If this sector contained a bootstrap loader such as the
one on a diskette, the hard disk could accommodate only one operating
system.
Instead, however, the first sector on a hard disk contains another
small program (let's call it the "partition loader") and some partition
information. The format of this partition information is documented in
IBM's DOS Technical Reference manual. Only 16 bytes are required for
each partition. These 16 bytes contain a code to identify the operating
system, the starting and ending sectors of each partition on the hard
disk, and which partition is bootable.
The partition loader searches through the partition information
to determine which partition is marked as bootable. Each partition
contains its own bootstrap loader in the first sector of the partition.
So, all the partition loader need do is load the bootstrap loader for
the bootable partition and then let the bootstrap loader take over.
In summary, for a floppy disk, the BIOS loads the bootstrap
loader, and the bootstrap loader loads the operating system. For a
hard disk, the BIOS loads the partition loader, the partition loader
loads the bootstrap loader for the bootable partition, and the
bootstrap loader loads the operating system.
The FDISK program that comes with PC-DOS allows you to divide a
hard disk into one, two, three, or four partitions. Each of these
partitions can accommodate a different operating system. Most people
use the whole hard disk for DOS and thus have only one partition on
the hard disk. When you first get an XT or AT with a hard disk, you
must use FDISK to define a DOS partition even before you use FORMAT.
If you use FDISK to define more than one partition on your hard
disk, FDISK lets you mark one (and only one) of these partitions as
"active," which means that it's bootable. If you boot from the hard
disk, the operating system in that partition will be the one that
comes up.
With a partitioned hard disk you have a couple of methods by
which to choose one operating system over another when you boot up
your machine:
- Even if the DOS partition is not marked as bootable, you
can still access it if you boot DOS from a floppy disk. So, if you
have two partitions on your hard disk -- DOS and something else -- you
could use the DOS partition if you boot DOS from a floppy disk and the
"something else" partition if you boot from the hard disk. The choice
would depend upon the drive A: door being open or not.
- Or, you could boot up DOS from a floppy disk, use FDISK to
change the partition, then reboot from the hard disk. This is fairly
fast and if you do it a lot, you may want to set up a special disk
that calls FDISK from an AUTOEXEC.BAT file.
- Microsoft's Xenix System V (which IBM licenses and sells
as Xenix 2.0) has another method. If Xenis and DOS occupy two different
partitions on a hard disk and Xenix is marked as bootable, then booting
from the hard disk always brings up Xenix. But Xenix then lets you
specify that you want to boot DOS instead.
- Or, the partition loader in the first sector of the hard
disk could be fancied up a bit by an alternate partition loader program.
This program could put a menu up on the screen that lists the different
operating systems available on the hard disk and asks you for your
selection.
Some words of caution: Experimenting with hard disk partitions
is best done with a clean hard disk or a hard disk with disposable
data. Changing the size of the DOS partition with FDISK wipes out the
DOS partition (or at least the FAT and directory information). FDISK
will warn you about this. Heed the warning.
If you want to take a look at the partition information, you
cannot use DOS interrupt 25h, or the DEBUG L (Load) command, or any
"disk look" utility that uses interrupt 25h. This is because interrupt
25h can only get at the DOS partition. To look at anything outside the
DOS partition, you'll need to use interrupt 13h (or a "disk look"
program that uses interrupt 13h).