The logical structure of a hard disk

Last update on January 28, 2009 09:06 AM by deri58
Published by deri58

The logical structure of a hard disk







Introduction


When you use your computer, your data is organized in the form of files and directories, according to a tree structure and these are stored on your hard drive.
Your operating system manages all this data found on your Hard drive.
A hard disk must have a particular organization, understandable to your system and this is what we will try to understand.

Logical Structure


The Master Boot Record (or MBR)

At the beginning of the hard drive is the Mbr. When your computer starts using your hard drive, where he will begin to look at.

The Mbr itself contains a specific organization. Mbr size is 512 bytes.
  • The boot Loader



It is the first 446 bytes of Mbr. This section contains executable code, where programs are housed, as bootlader lilo, grub or windows for example.
  • The partition tables



4 slots of 16 bytes each :containing the description of a partition (primary or extended) on the disk.
Here is how the description of a partition:
    • State of the partition (inactive partition bootable) - (1 byte)
  • Custom Heads of the beginning of the partition - (1 byte)
  • Cylinder sector and the beginning of the partition - (2 bytes)
  • Type of partition (file system, eg, 32 fat, ext2 etc ...) - (1 bytes)
  • Head of the end of the partition (1 byte)
  • Cylinder sector and the end of the score - (2 bytes)
  • Number of sectors between the MBR and the first sector of the partition - (4 bytes)
  • Number of sector of the partition - (4 bytes)
  • Magic Number




There are two bytes. They are used to determine if the hard disk has a bootloader or not.
If so, the magic number should be equal in value to hexadecimal 55AA.

Here is what happen when a computer start with the mbr:

The computer starts and the bios start to execute code as the routine check of memory for example. Then the bios inspects your hard disk, you will read and verify its Mbr and the magic number. If the magic number is equal to 55AA, then the bios will load the first 446 bytes of mbr then leave it to the main executable code.

Sources


[http://] wikipedia.org/wiki/Master_boot_record
http://www.brothersofnet.freesurf.en/sans_popup/mbr_table_partition.html
http://www.datarescue.com/laboratory/partition.htm
Best answers for « The logical structure of a hard disk » in :
How to increase the cache on your hard disk? Show How to increase the cache on your hard disk? A cache is a temporarily area of storage storing fequently accessed data for quick access. It is a very efficient tools used under windows vista and windows xp which is set as default under...
Determine the speed of SCSI-3 hard disk ShowDetermine the speed of SCSI-3 hard disk Upon installing a single Ultra160 SCSI hard drive and you'll see an average transfer speed of 40MB/s. To achieve very high throughput speeds up to 100 Mb/s or more you need to have multiple hard...
Sharing a hard disk under Windows Vista ShowSharing a hard disk under Windows Vista Please follow the steps below: Go to the file explorer (Windows Key + E). Right click on the hard drive (or partition) and then choose to share ... In the new window click the Security tab....
Enabling the Ultra DMA on an IDE hard disk ShowEnabling the Ultra DMA on an IDE hard disk Principle Getting started Implementation hdparm Principle Under Linux, the Ultra DMA mode is not enabled by default. hdparm is a utility included with most linux distributions,...
Download Disk Recovery Wizard ShowDisk Recovery Wizard is a tool to backup data. It allows to restore the damaged, corrupt and inaccessible data on a hard disk and even the formatting. A wizard guides you step by step to facilitate the operations. Disk Recovery Wizard supports any...
Download EASEUS Partition Master ShowEaseUs Partition manager Free, is software "par excellence". EaseUs Partition Manager easily and without error will resize your hard disk partition into any size you chose: Main characteristics of EaseUs Partition Free: Material support for...