Roman wrote:
What is the best place to enter protected mode? (bootloader stage 1, stage 2 or kernel or something else?)
What is protected mode for? Do your loader stages need protection from apps? Do they need to access memory above the 1MB point? If not, stay in real mode while you're still working with the BIOS to load your code, to set up a better screen mode and to get a map of usable memory. If you need to load in lots of code above the 1MB point, write code to go in and out of protected mode so that you can use the BIOS to load it to a buffer in low memory and then switch in and out of protected mode to shift it up memory. Once you've finished using the BIOS you can stay in protected mode, though you will need to limit how far you change the set-up of the machine if you want to change back into real mode to use the BIOS again to save or load more data later on, because every time you switch to real mode you'll need to undo all those changes.
Whatever you do, don't return to your original plan of writing a real-mode OS: protected mode will enable you to access a linear frame buffer for high-resolution graphics modes and make your OS a lot more capable than a real-mode OS as a result, as well as giving you gigabytes of memory to play with.