Thanks. A few comments interspersed below.
The question isn't hard to understand. Very quickly here is the
(condensed) low down on how it happens.
1- The boot order and boot device is set in the BIOS of the computer.
Even if it's a SATA or RAID controller the BIOS *has* to be able to
see and read from the device to boot the computer. That is not
specific to Windows, it applies to any operating system.
I was wondering if the BIOS/hardware knew how to read the SATA or RAID
disk drive by itself. Which brings up the question, what exactly does
the SATA driver DO? Why does Windows need the SATA driver if the
hardware can read a SATA disk drive? You addressed this below, more
comments there.
[...]
4- The partition boot sector code locates the operating system loader
and loads it into memory and launches the execution of the operating
system loader. Up to this point the BIOS, Master Boot Code and
Partition Boot Sector Code have been responsible for the boot process.
This happens regardless of the file system on the disk and regardless
of the type of disk controller (IDE, SATA, RAID) and regardless of the
operating system to be loaded.
Interesting. I knew some of this but not in this detail.
5- As stated in step 4, the partition boot sector code executes the
operating system loader, in the case of Windows NT/2000/XP the
operating system loader is ntldr (short for nt loader). Ntldr
contains a mini file system driver that enables it to read the file
system on the disk and enables it to load the necessary files to load
Windows. Although it is universally accepted that ntldr is a part of
Windows, in a pure sense it really isn't. Ntldr is a DOS type program
that is responsible for *loading* Windows. While it is doing its job
Windows is not yet started, Windows will be started *by* ntldr.
I sort-of knew this too... but the NTLDR *file* itself is in the file
system; I thought it was not stored differently depending on whether the
disk is a FAT16, FAT32, NTFS 4, or NTFS 5 disk. The BIOS and hardware
are smart enough to read all of NTLDR in to memory, regardless of the
file system?
I have copied NTLDR from an NTFS disk to a floppy before, and booted
that floppy, so I presume NTLDR is just a regular file that's stored in
the file system.
6- Ntldr calls on NTDETECT.COM, another DOS type program,
At this point, all of NTLDR has been read from the disk into memory.
The hardware obviously knows how to read a SCSI disk without the help of
the SCSI driver.
to gather
information about the computer hardware. NTDETECT.COM will gather a
list and that list will be used to create the HKEY_LOCAL_MACHINE\
HARDWARE key. At this point Windows is not yet started, the boot
process is still being handled by ntldr.
*Here is the answer to your question* :
"At this time Ntldr scans all of the services in the Registry subkey
HKEY_LOCAL_MACHINE \SYSTEM \CurrentControlSet \Services for device
drivers with a Start value of 0x0, which indicates that they should be
loaded but not initialized. Device drivers with these values are
typically low-level hardware device drivers, such as hard disk device
drivers."
Right, but NTLDR has been read off of a (possibly) SCSI disk by the
hardware. Which makes me wonder why the SCSI driver is required for
Windows.
7- At the same time as events in step 6 were happening Ntldr began
loading NTOSKRNL.EXE but the boot process has not yet been passed on
to Windows. Ntldr will only pass the boot process after it has
finished loading drivers with an 0x0 value.
And that is why Windows knows how to use SCSI/SATA/RAID drivers, it
knows because ntldr loads boot device drivers (0x0) for Windows before
it actually loads Windows.
Yes, NTLDR loads boot device drivers off of a BOOT DEVICE. Somehow.
It still sounds like NTLDR loads itself off of the SCSI boot disk, in
the early part of the boot process.
You said that "Ntldr contains a mini file system driver". NTLDR is
stored in the file system, is it not?
It's still a little confusing. If the hardware can read a SCSI disk
without any help, then the SCSI driver doesn't do much useful work, does
it?
I'm really not trying to be obtuse. One of the steps seems like magic.
David