Trying to figure out boot process

All development related issues welcome

Moderator: Moderator Team

Post Reply
Posts: 48
Joined: Tue Jul 10, 2007 5:58 am

Trying to figure out boot process

Post by paul »

Well, I look a bit at the code, and try to figure out a bit more how things... boot.
First you need a bootsect, and there are many depending of where it is put: ... /bootsect/

I believe the role of bootsect is to load freeldr.sys.
FreeLoader role seems to be to load the kernel, and give it a list of drivers to load.
FreeLoader is the program that, by reading .ini files, let you choose the exact operating system to start:
Reactos (Debug)

Now there is mostly two kind of boot (boottype) that can be found in .ini files: ReactOSSetup and Windows2003
You can look at the different .ini files in ... /bootdata/ ... i?view=log ... iew=markup
And the code that manage that ... iew=markup

It is already there that things began to be confused.
How does it decide if it is a stage 1 setup (choose the filesystem, directory and copy the files for stage 2).
Or a stage 2: (What is your name? What is the administrator password? etc.)

It seems stage 1 reside in usetup (text-mode) at: ... up/usetup/
It is unclear yet how it get called.
There is also ... p/reactos/
which could be a graphical stage 1 setup... frankly I don't know.

Now ... tup/setup/ is what load the 2nd stage and call it.
The 2nd stage is in fact a dll: ... /syssetup/

Be it a Window boot or a Setup boot, at the end of FreeLoader, it all seems to finish in:
693 VOID
694 LoadAndBootWindowsCommon(
695 USHORT OperatingSystemVersion,
697 LPCSTR BootOptions,
698 LPCSTR BootPath,
699 BOOLEAN Setup)
inside ... iew=markup
Which finish by giving control to the kernel... I suppose.... I have no idea in fact.

But before going by there, if it is a Setup, it probably pass by:
138 LoadReactOSSetup(IN OperatingSystemItem* OperatingSystem,
139 IN USHORT OperatingSystemVersion)
in ... iew=markup

Still need to look more at the code.

Test Team
Posts: 2732
Joined: Mon Jul 07, 2008 12:35 pm

Re: Trying to figure out boot process

Post by vicmarcal »

You may use our ReactOS Developer Mailing List if you want to ask such Development questions, you can find better answers there :)

Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest