Difference between revisions of "Bootsector of the IBM PC"

From Syslinux Wiki
Jump to: navigation, search
Line 1: Line 1:
= Bootsector of the IBM PC =
 
 
 
The bootsector of the IBM PC and compatibles is also the partition table of the disk.
 
The bootsector of the IBM PC and compatibles is also the partition table of the disk.
 
It is also called Master Boot Record  (MBR)
 
It is also called Master Boot Record  (MBR)
Line 8: Line 6:
 
The MBR is 512 bytes large and is the first sector of a disk.
 
The MBR is 512 bytes large and is the first sector of a disk.
  
The first FIXME448FIXME bytes contain executable code.
+
{| class="wikitable"
 +
|-
 +
! Start offset !! Length !! Contents
 +
|-
 +
|0 || 440 bytes || Executable code
 +
|-
 +
|440 || 4 bytes || Disk MBR signature
 +
|-
 +
|444 || 2 bytes || Unused
 +
|-
 +
|446 || 64 bytes || Partition table
 +
|-
 +
|510 || 2 bytes || Boot signature (55 AA)
 +
|}
 +
 
 +
 
 +
The first 440 bytes contain executable code.
 +
 
 +
 
  
The next FIXME bytes are the partition table.
+
The next 64 bytes are the partition table.
  
 
Final 2 bytes are the signature of the bootsector.
 
Final 2 bytes are the signature of the bootsector.
  
  
== Disable_booting ==
+
== Disable booting ==
  
 
When the signature is valid, the computer's BOOTROM will boot from the disk.
 
When the signature is valid, the computer's BOOTROM will boot from the disk.

Revision as of 00:13, 31 March 2008

The bootsector of the IBM PC and compatibles is also the partition table of the disk. It is also called Master Boot Record (MBR)

Content

The MBR is 512 bytes large and is the first sector of a disk.

Start offset Length Contents
0 440 bytes Executable code
440 4 bytes Disk MBR signature
444 2 bytes Unused
446 64 bytes Partition table
510 2 bytes Boot signature (55 AA)


The first 440 bytes contain executable code.


The next 64 bytes are the partition table.

Final 2 bytes are the signature of the bootsector.


Disable booting

When the signature is valid, the computer's BOOTROM will boot from the disk. To disable it, you have to wipe the signature bytes. You have the read the whole sector (512 bytes) and change only the signature and read back the sector.

A code example:

help requested

see
mailinglist
archive
at http://syslinux.zytor.com/archives/2006-October/007495.html

More information about the IBM PC bootsector is at

  • please
  • add
  • some links

Back to BootSector, which is also SpinOff