Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Why 55 AA is used as the boot signature on IBM PCs? [closed]

Why does the IBM PC architecture use 55 AA magic numbers in the last two bytes of a bootsector for the boot signature?

I suspect that has something to do with the bit patterns they are: 01010101 10101010, but don't know what.

My guesses are that:

  1. BIOS is making some bitwise and/or/xor operations on these bytes to compare them together and if it, for example, results in 0, it can easily detect that and jump somewhere.
  2. it could be some parity/integrity safeguard that if some of these bits is broken, it could be detected or something and still be considered a valid signature to properly boot the system even if this particular bits on the disk has been broken or something.

Maybe someone of you could help me answer this nagging question?

I remember I've once read somewhere about these bit patterns but don't remember where. And it migt be in some paperbook, because I cannot find anything about it on the Net.

like image 685
SasQ Avatar asked Jun 17 '12 21:06

SasQ


People also ask

What does the signature 55 AA indicate?

Located in the final two bytes of the MBR (511-512), this section must contain the hex value AA55, which officially classifies this as a valid MBR. An invalid magic number indicates a corrupt or missing MBR, therefore these bytes are critical to booting or using the disk.

What is a boot signature?

Boot signature may refer to: VBR boot signature, a signature in IBM PC compatible floppy and superfloppy boot sectors (Volume Boot Records) MBR boot signature, a signature in IBM PC compatible fixed disk and removable drive boot sectors (Master Boot Records)


1 Answers

I think it was chosen arbitrarily because 10101010 01010101 seemed like a nice bit pattern. The Apple ][+ reset vector was xor'ed with $A5 to (10100101) to produce a check-value. Some machines used something more "specific" for boot validation; for PET-derived machines (e.g. the VIC-20 and Commodore 64 by Commodore Business Machines), a bootable cartridge image which was located at e.g. address $8000 would have the PETASCII string "CBM80" stored at address $8004 (a cart starting at $A000 would have the string "CBMA0" at $A004, etc.), but I guess IBM didn't think disks for any other machine would be inserted and have $55AA in the last two bytes of the first sector.

like image 125
supercat Avatar answered Sep 26 '22 19:09

supercat