Bootloader, FAT, and sector 1

Question about which tools to use, bugs, the best way to implement a function, etc should go here. Don't forget to see if your question is answered in the wiki first! When in doubt post here.
Post Reply
Jason

Bootloader, FAT, and sector 1

Post by Jason »

I was going along well thinking I learned all about bootloaders where they lived. My understanding is that the bootloader resides at the first byte of the first sector of a floppy disk or hard disk partition. The last two bytes (assuming sector size of 512 bytes) has the value of 0xAAh and 0x55h.

Easy enough. Then I read a Microsoft paper describing FAT filesystems. (http://www.nondot.org/sabre/os/files/Fi ... Format.pdf). The article states that something called the BIOS Parameter Block (which contains information regarding the filesystem) is on the FIRST sector of the partition.

How can both the bootloader and the Parameter Block be on the same sector (especially since all the bootloaders I have seen fill in 0's from the end of the bootloader to byte 510)? What am I not understanding?
Brill

RE:Bootloader, FAT, and sector 1

Post by Brill »

They are both there.
The fat bios block doesnt take up the whole 512 bytes. You put a jump instruction at the beginning of the bootloader, then the bios block detaisl as you want the partition set up and then you bootloader. The first jmp instruction jumps to your bootloader.

Check the ms web sitefor fat documentation, it should be a word .doc or a .pdf file i've seen both but a chapter of the documentation describes the bios block.

Also, this block has nothing to do with your computers bios, in case you were confused about that.

Brill.
Post Reply