Disk Partition Table
The partition table information is usually written in the first sector (512 bytes) of the device, which is therefore called master boot sector (MBS). The MS-DOS master boot sector begins with a JUMP instruction (three bytes). The disk parameters follow (offset 0x003), and then there is the DOS kernel loader (at offset 0x03E). The master boot sector is terminated by the magic number, 0xAA55, for the bios in the final two bytes (offset 0x1FE). A hard disk is more complicated than a floppy, because it has partitions. However the BIOS boots from a hard disk as if it were a floppy. Therefore the first sector (master boot record) must have the structure of a MBS, ie, the first instruction that is executed is at offset 0x000, and there must be the magic number 0xAA55 at offset 0x1FE. The master boot record contains the information about the dist partition. More precisely each partition is described by 16 bytes,
Hard disks used to have a geometry, described by "cylinders", read/write "heads" and "sectors" (see figure). Now the disk geometry is more a logical concept than a physical one. Nevertheless it is still used. The units of disk are the sectors. Each cylinder contains "head" * "sect" sectors. The C/H/S triples are stored in three bytes in the format 10+8+6. This is ok if there are at most 1024 cylinders, whihc nowadays is mostly not the case. Therefore the triples are not used by Linux. Exercise
Quick Links:
Linux Home: Linux System Administration Hints and Tips (c) www.gotothings.com All material on this site is Copyright.
|