Before exploring when and how file system drivers are loaded during the system boot sequence, it is necessary to understand driver start types and load order groups.
Driver Start Types
A kernel-mode driver's
-
SERVICE_BOOT_START (0x00000000)
-
Indicates a driver started by the operating system (OS) loader. File system filter drivers commonly use this start type or SERVICE_DEMAND_START. On Microsoft Windows XP and later systems, filters must use this start type in order to take advantage of the new
file system filter load order groups.
SERVICE_SYSTEM_START (0x00000001)
-
Indicates a driver started during OS initialization. This start type is used by the file system recognizer. Except for the file systems listed below under "SERVICE_DISABLED," file systems (including network file system components) commonly use this start type or SERVICE_DEMAND_START. This start type is also used by device drivers for PnP devices that are enumerated during system initialization but not required to load the system.
SERVICE_AUTO_START (0x00000002)
-
Indicates a driver started by the Service Control Manager during system startup. Rarely used.
SERVICE_DEMAND_START (0x00000003)
-
Indicates a driver started on demand, either by the PnP Manager (for device drivers) or by the Service Control Manager (for file systems and file system filter drivers).
SERVICE_DISABLED (0x00000004)
-
Indicates a driver that is not started by the OS loader, Service Control Manager, or PnP Manager. Used by file systems that are loaded by a file system recognizer (except when they are the boot file system) or (in the case of EFS) by another file system. Such file systems include CDFS, EFS, FastFat, NTFS, and UDFS. Also used to temporarily disable a driver during debugging.
Specifying Start Type
A driver writer can specify the start type for a driver at installation time in either of the following ways:
-
By specifying the desired start type for the
StartType entry in the service-install-section referred to by anAddService directive in the driver's INF file. This method is described in ServiceInstall Section. -
By passing the desired start type for the
dwStartType parameter when calling CreateService orChangeServiceConfig from a user-mode installation program. This method is described in the reference entries for CreateService and ChangeServiceConfig in the Microsoft Windows SDK documentation.
Driver Load Order Groups
Within the SERVICE_BOOT_START and SERVICE_SYSTEM_START start types, the relative order in which drivers are loaded is specified by each driver's
Drivers whose start type is SERVICE_BOOT_START are called
Driver whose start type is SERVICE_SYSTEM_START are also loaded in the order of the load order groups to which they belong. However, no system-start driver is loaded until after all boot drivers have been loaded.
Note
A complete, ordered list of load order groups can be found under the
-
HKEY_LOCAL_MACHINE\System\CurrentControlSet\Control