![]() |
|
Module 18: Windows NT Boot Process
Introduction |
NT boots in stages:
Windows NT boot process occurs in these stages:
Files Required for System Boot |
Intel x86 Boot Sequence Files |
File |
File Attributes |
Function |
Ntldr | H; R ; S |
|
Boot.ini | R ; S |
|
Bootsect.dos | H |
|
NTdetect.com | H; R ; S |
|
NTbootdd.sys | H; R ; S |
|
RISC Boot Sequence Files |
File |
Function |
Osloader.exe | OS loader; equivalent to Ntldr |
*.pal (Alpha only) | these files contain PAL code, software subroutines that provide an OS with direct control of the microprocessor |
Boot Sequence Files Common to both Systems |
File |
Function |
NToskrnl.exe | Windows NT kernel file, |
System | Collection of system configuration settings, location. Controls which device drivers and services are loaded during initialization |
Device drivers | Files that support device drivers, such as Ftdisk and Scsidisk |
Hal.dll | Hardware abstraction layer protects kernel and rest of Windows NT Executive from platform-specific hardware differences. Manipulates hardware directly. |
Intel x86 |
RISC |
Ntldr |
Osloader.exe |
Boot.ini |
*.pal (Alpha only) |
Bootsect.dos |
|
NTdetect.com |
|
NTbootdd.sys (SCSI only) |
|
NToskrnl.exe |
|
System |
|
Device Drivers |
|
Hal.dll |
The Intel x86 Boot Sequence |
Preboot Sequence
- POST à determines amount of physical memory and presence of hardware components
- Boot device located and MBR is loaded in memory; the program in MBR is run.
- MBR scans Partition Boot Record (PBR) table to locate active partition and its boot sector is loaded into memory.
- Ntldr is loaded and then initialized from boot sector.
Note: when Windows NT is first installed on the machine, it changes the boot sector so that Ntldr loads on system startup.
Boot Sequence
- Ntldr switches microprocessor from real mode into 32-bit flat memory mode.
- Ntldr starts the appropriate minifile system drivers; these are built into Ntldr to find and load Windows NT from different file system formats (FAT, NTFS).
- Ntldr reads Boot.ini (if one exists) and then displays the OS selections contained within Boot.ini.
This is called the Boot Loader Operating System Selection menu.
- Ntldr loads OS. The OS that is loaded is one selected by user, if no selection the default OS.
If Windows NT is selected If an OS other than NT is selected ê
ê
Ntldr runs NTdetect.com. This scans the hardware and then sends the list of detected hardware back to Ntldr for later inclusion in registry under: HKEY_LOCAL_MACHINE\HARDWARE Ntldr loads and runs Bootsect.dos and passes control to it. The other OS then boots. The NT boot process is an end. :-(
- Ntldr then loads NToskrnl.exe, Hal.dll and the System hive. Ntldr scans the System hive and loads the device drivers configured to start at boot time.
- Finally, Ntldr starts NToskrnl.exe, at which point the boot process ends and the load phases begin.
Files Needed for Boot and their locations |
Folder |
Intel x86-based file |
System root partition | Ntldr, Boot.ini, Bootsect.dos, NTdetect.com, NTbootdd.sys |
Systemroot\System32 | NToskrnl.exe, Hal.dll |
Systemroot\System32\Config | System |
Systemroot\System32\Drivers | Device drivers |
The RISC Boot Sequence |
NOTE: Ntldr, Boot.ini, and Bootsect.dos files required for Intel x86 based computers are not needed on RISC-based computers. |
Preboot Sequence |
- ROM firmware selects a boot device by reading a boot precedence table from nonvolatile RAM.
- For hard-disk boot, firmware reads MBR and determines whether system partition is present.
- If system partition exists, firmware reads the first sector of partition into memory. It then examines BIOS Parameter Block to determine whether the volumes file system is supported by the firmware.
- If file system is supported by firmware, the firmware searches root directory of the volume for Osloader.exe, loads it and passes control to it, along with a list of available hardware.
Boot Sequence |
- Osloader.exe loads
- NToskrnl.exe,
- Hal.dll,
- *.pal and the
- System hive.
- Osloader.exe scans System hive, and then loads the device drivers that are configured to start at boot time.
- Osloader.exe then passes control to NToskrnl.exe. This ends the NT boot sequence.
Files Needed for Boot:
Folder |
RISC file |
Os\nt40 | Osloader.exe, Hal.dll, *.pal (Alpha only) |
Systemroot\system32 | NToskrnl.exe |
Systemroot\system32\Config | System |
Systemroot\system32\Drivers | Device drivers |
Windows NT Load Phases |
The boot sequence for both the RISC and Intel x86 platform ends and the load process starts when control is passed from Ntldr to NToskrnl.exe, with the following phases:
- Kernel load. HAL is loaded
- Kernel Initialization
- Services Load
- Win32 Subsystem Start
- User Logs On. Last known good is created.
Kernel Load Phase
- Kernel load phase begins as soon as NToskrnl.exe is loaded.
- HAL (Hardware abstraction layer), which hides platform-specific issues from NT as you may recall, is loaded after kernel.
- System hive is loaded next and scanned for drivers and services that should be loaded at this stage. These drivers and services are loaded but not initialized, in the order in which they appear beside "List" in the HKEY_LOCAL_MACHINE\SYTEM\CurrectControlset\Control\ServiceGroupOrdER.
- This portion of the boot sequence occurs when the screen clears after NTdetect.com has run and progress dots ( ) are displayed across the top of the screen. You can display the name of the drivers being loaded on this screen by adding an /sos switch to the appropriate OS line in Boot.ini.
Kernel Initialization Phase
- The kernel initialization phase initializes the kernel and the drivers that were loaded during the kernel load phase.
- During this phase, the System hive is again scanned to determine which high-level drivers should be loaded. These drivers are initialized and loaded after the kernel has been initialized.
- The registry's CurrentControlSet is then saved, and the Clone control set is created and initialized, but not saved. The registry hardware list is then created, using the information from NTdetect.com (Intel) or Osloader.exe (RISC).
- A control set contains configuration data used to control the system, such as which device drivers and services to load and start. Control sets are stored in the registry as subkeys of HKEY_LOCAL_MACHINE\SYSTEM\Select
- In this stage of the boot sequence the screen is painted blue.
ErrorControl Values
HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\
Name_of_service_or_driver\ErrorControl.
Services Load Phase
The services Load Phase starts the Session Manager (Smss.exe), which starts the higher-order subsystems and services for NT. Session Manager carries out the instructions under the following four registry entries:
- BootExecute Data Item. Session Manager immediately reads and carries out the list of programs in: HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Session Manager\BootExecute. The default entry is: autocheck autockk *. Autocheck.exe is the boot-time version of Chkdsk. * causes an automatic check of each partition.
Entry
for BootExecute can be modified.
Example: autocheck autochk /p* forces equivalent of Chkdsk /f on each partition on every subsequent system restart. BootExecute
value can also contain more than one command;
Example: Autocheck autochk * autoconv \DosDevices\ d: /FS:ntfs; second command causes drive D to be converted to NTFS on the next system boot. |
- Memory Management Key. After all of the checks have been successfully performed on the system's hard disks, Session Manager sets up the paging files defined in: HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Session Manager\Memory Management\PageFiles. When the partitions are checked and the paging files are setup, the CurrectControlSet and the Clone control set are written to the registry.
- DOS Devices Key. Next, the Session Manager creates symbolic links. These links direct certain classes of commands to the correct component in the file system.
- Subsystems Key. The last step performed by Session Manager is to load the required subsystems, as defined in the registry in: HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Session Manager\SubSystems\Required. The default is the Win32 subsystem.
Win32 Subsystem Start Phase
- When the Win32 subsystem starts, it automatically starts Winlogon.exe, which starts the Local Security Authority (Lsass.exe) and displays the CTRL+ALT+DEL logon dialog box.
- Next the Service Controller (Screg.exe) is run, which makes a final pass through the registry looking for services that are marked to load automatically, such as the Workstation and Server services. The services that are loaded during this phase are loaded based on their dependencies, that is, their DependOnGroup or DependOnService.
User Logs On
- The boot is not considered good until a user successfully logs on to the system.
- After a successful logon, the Clone control set is copied to the LastKnownGood control set.
Creating a Windows NT Boot Disk |
Required Boot Files:
Intel x86-based system | Ntldr, boot.ini, Bootsect.dos, NTdetect.com, NTbootdd.sys (for system with a BIOS-disabled SCSI adapter. |
RISC-based system | Osloader.exe Hal.dll, *.pal (Alpha only) |
Precautions |
- Windows NT boot disk must be formatted on a Windows NT computer so that the boot sector on the floppy disk can find and run Ntldr.
- If computer is Intel x86-based, Boot.ini on boot disk may need to be modified to reflect the Advanced RISC Computing (ARC) path to system partition on the failed computer. The path includes disk controller, disk drive and partition for Windows NT system files.
- After created, use it to start Windows NT. Only certain files are loaded from floppy disk. All others are accessed from the hard disk of computer. If NToskrnl.exe or other files on hard disk are corrupt, the boot disk will be of NO use until the file is restored.
Use
the Emergency Repair Disk to restore missing or corrupt files.
Last Known Good Configuration |
- After a user successfully logs on to Windows NT, current configuration information from registry key HKEY_LOCAL_MACHINE is copied to the LastKnownGood control set.
- This is a copy of the most recent LastKnownGood control set used to successfully boot Windows NT.
If NT is going to load, normally the default control set will load
Use the Last Known Good control set to recover from the following types of problems
Use it to recover from following types of problems:
- After a new device driver is installed, Windows NT is restarted, but system stops responding.
- After a new video driver is installed and the system is restarted. However nothing is visible on the computer screen, because the new video resolution is incompatible with the video adapter.
- A critical device driver, such as the SCSI port driver, is accidentally disabled. Automatic.
Using it doesn't help in following situations:
- When problem is unrelated to changes in the control set information, such as might arise from incorrectly configured user profiles or file permissions.
- When logging on after making changes. The control set has been updated.
- When switching between different hardware profiles. LastKnownGood control set is only a method for switching between configuration information in the registry.
- When startup failures are caused by hardware failures or missing or corrupted files.
To use the Last Known Good, when you see OS loader v4.00 (or 5.00) press space bar to evoke Hardware Profile/Configuration Recovery menu and select L to choose the Last Known Good configuration and press Enter to select the original configuration.
The Update Repair Info Option
- Overwrites files in systemroot\Repair folder. During the update process, a $$hive$$.tmp file is created, which temporarily stores registry information before it is copied to the appropriate file.
- After update the repair process prompts the user to create an Emergency Repair Disk. This option formats a floppy and then creates an Emergency Repair Disk
- This is the same result as selecting Create Repair Disk. Also copies of Autoexec.nt and Config.nt are placed in the folder.
Note: - This option deletes and creates files if Windows NT is installed on an NTFS partition, this user must have appropriate permissions. One must be member of Administrators or Power Users group or have appropriate privileges. For others it seems to work, but with saving files you get an error message that not all files could be saved Repair Disk utility will not back up Default, SAM, or Security files, unless the /s parameter with rdisk command is specified.
Create Repair Disk Option
- prompts the user to insert a disk that can be formatted in drive A.
- If current repair disk is used, Create Repair Disk does not update the disk, but reformats it and creates new repair disk.
Soooo, a NEW REPAIR DISK ALWAYS CREATED.
Setup.log
Files
Included on the Emergency Repair Disk
"._"
means compressed version.
File |
Description |
Setup.log | Information file used for verifying files installed on system. Read-only, Hidden, System file |
System._ | Copy from System hive from registry |
Sam._ | Copy from Sam (Security Accounts Manager) from registry |
Security._ | Copy from Security hive from registry |
Software._ | Copy from Software hive from registry |
Default._ | Copy from Default hive from registry |
Config.nt | NT
version of Config.sys Used when initializing a NT Virtual DOS Machine (NTVDM) |
Autoexec.nt | NT
version of Autoexec.bat File used when initializing an NTVDM |
NTuser.da_ | Compressed version of systemroot\Profiles\Default user\NTuser.dat |
Decompress the compressed files with
the expand utility.
The Emergency Repair Process |
To perform Emergency Repair Process, you need:
The repair process in Windows NT Setup enables selection of what is to be repaired.
Inspect Registry Files. Setup replaces one or more registry files with the files that were created when NT was first installed, or when the ERD was last updated. All changes made to the system since the last update to the repair files are lost. Inspect startup environment. Select this option if NT is installed but does not appear in the list of bootable systems. For this option, the ERD is needed. Verify Windows NT system files. Select this option to verify that each file in the installation is good and matches the files that was installed from the distribution files. The repair process also verifies that files need to start, such as Ntldr and NToskrnl.exe are present and valid. When the repair process determines that file on the disk does not match what was installed, it displays a message that identifies the file asks whether you want to replace it. Inspect boot sector. Select this option if no system that is installed on the computer boots. Setup copies a new boot sector the hard disk.
Troubleshooting the Boot Process |
Boot: Couldn't fine NTLDR
Please insert another disk.
NTDETECT V4.0 Checking Hardware..
NTDETECT failed
Windows NT could not start because the following file is missing or corrupt:
winnt root\system32\ntoskrnl.exe
Please re-install a copy of the above file
I/O Error accessing boot sector file
Multi (0)disk(0)rdisk(0)partition (1):\bootos
All above cases can be restored with Emergency Repair process.
The Boot.ini File |
Boot.ini file contains two parts: [boot loader] and [operating system] sections
Troubleshooting Boot.ini Problems |
There are three situations when you get this message:
Windows NT could not start because the following file is missing or corrupt: <winnt root>\system32\ntoskrnl.exe
Please reinstall a copy of the above file.
OS Loader v4.0
Windows NT could not start because of a computer disk hardware configuration problem.
Could not read from the selected boot disk. Check boot path and disk hardware.
Please check the Windows NT (TM); documentation about hardware disk configuration and your hardware reference manuals for additional information.
In all cases boot.ini can be edited or Emergency Repair can restore the Boot.ini file. |
Troubleshooting Revisited |
You receive the following error message, find out what file is missing.
Boot:
Couldn't find NTLDR
Please insert another disk |
Ntldr |
NTDETECT failed | NTdetect.com |
No error message, but the Operating System Select menu failed to appear | Boot.ini |
I/O Error
accessing boot sector file
Multi(0)disk(0)rdisk(0)partition(1)\BOOTS |
Bootsect.dos |
Non-system disk or disk error
Replace and press any key when
ready
The disk that you used was not formatted under NT. Boot disk must be formatted under NT.
Last Known Good is updated with the current control set following the first successful logon after a reboot. When you notice something wrong following a restart, DO NOT LOG ON.
The Emergency Repair Process replaces the entire directory database with the original directory database that was created during installation, or with the last updated version from using Rdisk.exe. If he had never updated the directory database stored on the ERD the only accounts present after the repair would be the Administrator and the Guest account (and possibly an initial user account) created during installation.
To correct it, he could use the original administrator PW to log on, and then restore the directory database from a tape backup.
Boot: Couldn't find NTLDR
Please insert another disk
The Ntldr is either missing or corrupt. Use a NT Boot disk or Emergency Repair process.
![]() I'm sorry, but I can't answer specific network-related, or exam-related questions. |
|
Last Updated: August 6, 2001 | Grant Wilson, Edmonton, AB Canada |