lkurusa wrote:
I think an important question here, is why do you care?
That is a good question. Let me give you a few.
1) How do you know which partition to make as the active partition?
2) What if you have more than one partition with similar bootable Operating Systems?
3) If you boot to a TUI prompt, what partition do you place in the prompt? (i.e.: A DOS like would be C:\>)
4) What partition do you use to continue loading kernel and driver files from?
Here is an example. Let's say that you have multiple partitions / multiple drives with multiple partitions each. How do you know which one of the partitions you booted from so that you know which partition to continue loading the kernel files from? This is an issue with lots of scenarios.
What if I have two drives with similar operating systems. How do I know which drive I booted from so that I load the files from the correct operating system?
I put a signature in the boot sector of the partition and then my kernel, during partition enumeration, checks for this signature, along with a few other checks, then "marks" a partition as the booted from partition. Other operating systems do this as well.
Ben
-
http://www.fysnet.net/osdesign_book_series.htm