Click here to Skip to main content
15,881,882 members
Please Sign up or sign in to vote.
4.50/5 (2 votes)
See more: (untagged)
Hello all,

I've been searching all over the internet for the past couple days learning the details of the bootup process of the computer. My eventual goal is to create a custom mbr/bootloader that will simply display a list of partitions (eventually on USB but probably just a normal harddrive for now) then boot into each.

For now I am following the tutorial found here:
How to develop your own Boot Loader[^]

However, I am still uncertain as to the exact details of how the partition tables are created with the vbr and other information of the partitions on the disk.
Is the drive "scanned" for partition starting points(excuse horrible lingo)? Or are they hardcoded depending on the size of each partition?

The test project I had in mind for this is going to be a seperate spare computer having 1 harddrive with multiple partitions and being able to "boot" into each partition
from the initial mbr(thus, laying the ground work for chainbooting right ?) .

Basically my question being:
How are the vbr's for each partition found?, when during boot are they "searched" for if at all, and where do they come from, ie. BIOS(I don't think so ?), bootloader, etc?

My never ending curiosity would greatly be willing to read through massive amount of awesome detail, and as always I appreciate any help that can be offered :D

(p.s) If anyone has the patience I always have questions if any are willing to email,IM,etc.
Posted

1 solution

The drive is not "scanned" for partitions. That would take forever to complete.

The partitions are hard coded in the 16 byte descriptors starting at MBR offset 0x1BE. There are 4 entries possible here, for a total of 64 bytes.

You can find out more about the structure here[^].
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900