The MBR
Use this information only if you agree to the terms in my Disclaimer
I said previously that
the first sector on a disk is the boot sector, well that's not strictly
true. It is for floppy disks but with a hard drive however it is not
the case. On a hard disk drive the first sector is called the
master boot record or MBR for short. Like the boot sector this is
basically a program which gets run when your computer is booting
but also holds important information which is used by other software.
As you are almost certainly aware a hard drive can have many
partitions, to facilitate this the MBR holds something known as
a partition table which holds information on up to 4 partitions.
If you have more than 4 partitions (or quite often even more than one)
than one of these partition blocks points at another sector which
has the same data layout as the MBR, and so can hold information
on 4 more partitions, this may point at another sector which defines
more partitions and so on.
These are known as extended partitions and although they have the
same data layout as the MBR the partition table in these is
often called an extended partition table.
MS-DOS (and many other operating systems) comes with a utility called
fdisk which is used to set up partitions and extended partitions. There
is, as far as I know, no agreed rules on how a partitioning utility
should go about things. For instance although recent MS-DOS versions
can support up to 4 primary partitions, the fdisk utility will only
allow the creation of one plus an extended partition so presumably
something can create them. In fact
even with extended partitions it will only create one FAT partition
per extended partition table it then creates another extended
partition for any more FAT partitions required. Generally new partitions
start on a cylinder boundary which means some sectors get wasted around
partitions, some low level programs use these for their own purposes.
That's pretty much all for this section if you want more information
you could try MS KB article 69912.
One thing which I wanted to mention is the "fdisk /mbr"
command, many people have incorrect ideas about what this does, so in an attempt to clarify
it here's what it does do. The MBR splits into two areas, the machine code
which is used to load the boot sector from the active partition, and the
partition table. When "fdisk /mbr" is run the machine code part is re-written
and that is all, it won't recover any partitions or anything like that.
Technical Information on the MBR.
You only need to know about this if you are using BIOS to read the sectors,
if you are using DOS it reads the sectors relative to the partition.
You can use these links to quickly locate items that are of interest.
The MBR.
Format of partition information blocks.
Format of sector and track information.
ID numbers for FAT volumes.
Back to links
Back to links
Back to links
ID numbers for FAT volumes.
Many of these partition types I have just
included because they are listed, I don't have any experience with most of them
, so be warned I don't know that all these partitions follow the same rules as stated before. |
ID number. | Indicates. |
00h | Unused. |
01h | DOS FAT12 (0-15MB) |
04h | DOS FAT16 (16-32MB) |
05h | DOS 3.3+ extended partition. |
06h | DOS 3.31+ FAT16 (32MB-2GB) |
0Bh | Win95 OSR2+ FAT32 (512MB-2TB) |
0Ch | Win95 OSR2+ FAT32 (512MB-2TB LBA). |
0Eh | Win95+ FAT16 (32MB-2GB) (LBA) |
0Fh | Win95+ extended partition (LBA) |
14h | OS/2 Boot Manager hidden sub-32MB FAT16 partition |
16h | OS/2 Boot Manager hidden over-32MB FAT16 partition |
1Bh | Hidden Windows95 FAT32 partition |
1Ch | Hidden Windows95 FAT32 partition (LBA) |
1Eh | Hidden LBA VFAT partition |
C1h | DR DOS 6.0 LOGIN.EXE-secured FAT12 partition |
C4h | DR DOS 6.0 LOGIN.EXE-secured FAT16 partition |
CBh | Reserved for DR-DOS secured FAT32 |
CCh | Reserved for DR-DOS secured FAT32 (LBA) |
CEh | Reserved for DR-DOS secured FAT16 (LBA) |
D0h | Multiuser DOS secured FAT12 |
D1h | Old Multiuser DOS secured FAT12 |
D4h | Old Multiuser DOS secured FAT16 (partitions equal to or smaller than 32MB) |
D5h | Old Multiuser DOS secured extended partition |
D6h | Old Multiuser DOS secured FAT16 (partitions larger than 32MB) |
E1h | SpeedStor FAT12 extended partition |
E4h | SpeedStor FAT16 extended partition |
Back to links