Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

I was just reading about the whole boot process on computers and am curious as to why the BIOS can only read and execute code and data from only cylinder 0, track 0 and sector 1 of the disk being booted from? Why can't the BIOS read from any other disk location?

share|improve this question

migrated from stackoverflow.com Feb 25 '11 at 4:08

This question came from our site for professional and enthusiast programmers.

3 Answers 3

up vote 2 down vote accepted

Your reading has been of documentation that is clearly between one and one and a half decades out of date. It's only on old PC98 firmware (and PC97 and PC/AT firmware before it) that your assumptions and the anonymously supplied information in another answer even hold true. There are three major classes of personal computer/workstation firmwares (although there are several additional less well known ones as well, to which an answer to a question tagged "linux" should strictly also cover were it to be complete):

  • PC98 firmware On PC98 systems, the firmware doesn't understand disc partitions or filesystem formats. It doesn't even know what the (MBR) partition table in block #0 is, even though it loads and runs the code in block #0. It's the code in block #0 that knows to look inside itself for an active primary partition, and load and run its volume boot record. It's only on this class of firmware that your assumptions, and the information in the other answers, hold true.
  • ARC firmware On ARC systems, the firmware does understand disc partitions, and at least one filesystem format, FAT. On such systems, the firmware does not load and run block #0. Instead it loads and runs an executable program image from an ordinary file on a FAT disc volume. That executable program will be a boot loader than in turn loads and runs the linux kernel from another ordinary file on a (not necessarily FAT, if the boot loader has its own extra filesystem drivers) disc volume.
  • EFI firmware On EFI systems, the firmware does understand disc partitions, and at least one filesystem format, FAT. On such systems, the firmware does not load and run block #0. Instead it has a built in boot manager that allows one to choose from a menu of executable program images from a ordinary files on FAT disc volumes. That executable program will be a boot loader than in turn loads and runs the linux kernel from another ordinary file on a (not necessarily FAT, if the boot loader has its own extra filesystem drivers) disc volume. If the disc is partitioned with the EFI partition table, the firmware (depending from how strictly it sticks to the EFI specification) need not even necessarily read block #0 of the disc at all.

It should give an idea of how outdated some of the information that you can read, and that is passed around, in this area is, to note that the "98" in "PC98" really does stand for 1998. The world has changed, and the notion that firmwares don't understand disc partitioning schemes, don't understand filesystem formats, and only know how to read and load one block off a disc, is long out of date.

share|improve this answer
    
+1 for mentioning EFI –  Moab Feb 27 '11 at 23:39
    
thanks alot for the answer –  cobi Mar 2 '11 at 16:27

Cylinder 0, track 0, sector 1 basically means start at the logical beginning of the hard drive. During the boot process, the ROM BIOS after doing POST looks to load the boot record. In the state that it is, the boot loader has almost nothing to work with - all it does is to go to a predetermined point and start loading the OS code. The location hard coded is 0-0-1. Just as if I gave you a book, the expectation would be that you start reading from the first page, not page 25, so the boot loader starts at this start location.

share|improve this answer
    
I like the book analogy. –  surfasb Feb 25 '11 at 6:20

In theory, the BIOS can read from anywhere on the disk. But why would it? It has no idea what any of those bits mean. It would be a pretty terrible BIOS that was completely incompatible with full-disk encryption because it tried to directly interact with stuff outside the boot block.

Having the (for all intents and purposes hard-coded into the motherboard) BIOS only interact with the boot block means that the rest of the disk can contain anything at all, because you can just put code to interpret that into the boot block to be executed. And if you want to put something different (and incompatible) on the disk, you just need to update the boot block appropriately.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.