Windows 2000 professional Setup and Startup
发表于2004/12/29 21:07:00 1194人阅读
Windows 2000 pro Setup and Startup
The Windows 2000 startup process is similar to the startup process for Windows NT 4.0 but is significantly different from other operating systems. In MS-DOS, Windows 95, and Windows 98, the computer loads the IO.sys file followed by Msdos.sys and Command.com. However, in Windows 2000, these files only exist on computers that have multiple-boot configurations with Windows 95, Windows 98, or MS-DOS.
The following list describes the startup sequence on a computer running Windows 2000 Professional:
- Power-on self test (POST)
- Initial startup process
- Bootstrap loader process
- Operating system selection (if the computer has a multiple-boot configuration)
- Hardware detection
- Hardware configuration selection (if you are using more than one hardware profile)
- Kernel loading
- Operating system logon process
The system startup sequence only applies to a system that is started from a reboot or a power off state. This sequence does not apply to a system that is turned on from a hibernated state.
This startup sequence applies to all versions of Windows 2000.
Power-on self test (POST)
When a computer is started or reset, it runs the power-on self test (POST), which determines the amount of memory in the computer and checks that required hardware devices, such as the keyboard, are present and functioning. After the POST sequence, adapters that have their own basic input/output system (BIOS) run individual POST routines.
Some adapters (for example, some video adapters) run their POST sequence before the memory and device check, which runs during the initial POST.
Initial startup process (Starting the Computer)
After the computer finishes the POST, the system BIOS attempts to start an operating system. The sequence that the BIOS follows depends on the BIOS configuration. For example, if the BIOS search order is set to A and then C (A, C), the BIOS searches the floppy disk drive for a bootable disk. If drive A contains a bootable floppy disk, the BIOS loads its first sector (the partition boot sector) into memory. If the floppy disk is not bootable, the following error message appears.
Non-system disk or disk error
Replace and press any key when ready
If the BIOS does not find a floppy disk in the drive, it then searches for the active partition on the hard disk drive. If there is no system partition on the first hard disk, the master boot record (MBR) displays one of the following errors:
- Invalid partition table
- Error loading operating system
- Missing operating system
When the active partition of the hard drive is found, the system BIOS reads the MBR and loads it into memory. The MBR then scans the partition table for the system partition information. When the system partition information has been read, it loads sector 0 of the system partition into memory and starts it.
Sector 0 of the system partition can be a utility, a diagnostic program, or a partition boot sector that contains the startup code for the operating system.
The system partition must be on the first physical disk and contain the system startup files listed in Table 6.1.
Table 6.1 Windows 2000 Startup Files
|Ntldr||Root of startup disk|
|Boot.ini||Root of startup disk|
|Bootsect.dos||Root of startup disk (on multiple-boot systems)|
|Ntdetect.com||Root of startup disk|
|Ntbootdd.sys||Root of startup disk (for SCSI and some large IDE drives)|
|Cdldr||Root of startup disk|
If the name of the path in Boot.ini uses small computer system interface (SCSI) syntax, the Ntbootdd.sys must be in the root folder of the system partition.
The boot partition can be on the same partition as the system partition, on a different partition, or on a different hard disk.
For the most part, the MBR is independent of the operating system. For example, the MBR can start Windows NT, Windows 95, Windows 98, MS-DOS, Microsoft® Windows® 3.x, and Windows 2000 Professional. However, after boot sector 0 has been loaded into memory, the partition boot sector is dependent on both the operating system and the file system. The Windows 2000 partition boot sector performs the following functions:
- Reads the file system to find the bootstrap loader.
- Loads the bootstrap loader into memory.
- Starts the bootstrap loader.
Bootstrap loader process
Ntldr loads the operating system files from the boot partition. If you have a multiple-boot configuration, you are prompted to choose an operating system.
Ntldr controls the operating system selection and the hardware detection process before passing control to the Windows 2000 kernel. Ntldr must be in the root folder of the startup disk.
Ntldr performs the following steps:
- Sets the processor to run in 32-bit flat memory mode. When you first start a computer, it runs in real mode, which is similar to an 8088 or 8086 CPU. Because Ntldr is a 32-bit program, it must switch the processor to 32-bit mode so that it can continue to load the operating system.
- Starts the NTFS file system or the file allocation table (FAT) 16 or 32 file system. The code to access the appropriate file system is built into Ntldr.
- Reads Boot.ini, which displays the operating selections on the boot loader screen. If you select an operating system other than Windows 2000 Professional, Ntldr loads and passes control to the Bootsect.dos file, and the selected operating system starts. If you select Windows 2000 Professional, Ntldr starts Ntdetect.com, which gathers information about the computer hardware.
- Asks you to choose a hardware profile if you have one or more hardware profiles on your computer.
- Loads and passes the information from Ntdetect.com to Ntoskrnl.exe, starting the startup screen.
Operating system selection (if the computer has a multiple-boot configuration)
Boot.ini contains the list of available operating systems. Each entry includes the path to the boot partition for the operating system, the string to display in the boot loader screen, and optional parameters. Boot.ini supports starting multiple versions of Windows 2000, as well as starting other operating systems, such as Windows 95, Windows 98, Windows NT 4.0, MS-DOS, and OS/2.
When you install Windows 2000, Setup places Boot.ini at the root of the system partition.
The following is a sample Boot.ini file:
multi(0)disk(0)rdisk(0)partition(1)/winnt= “Microsoft Windows 2000 Professional” /fastdetect
The information displayed on the boot loader screen is based on the contents of Boot.ini, such as in the following example:
Please select the operating system to start:
Microsoft Windows 2000 Professional
Microsoft Windows 98
Use and to move the highlight to your choice.
Please Enter to choose.
Seconds until highlighted choice will be started automatically: 29
For troubleshooting and advanced startup options for Windows 2000, press F8.
The first operating system listed is the default. In this configuration, if you do not select an operating system before the timer reaches 0, Windows 2000 Professional is started.
After you select the operating system, Ntdetect.com detects the hardware, gathers a list of the currently installed hardware components, and passes the information to Ntldr.
Ntdetect.com detects the following components:
- Computer ID
- Bus/adapter type
- Video adapter
- Communications ports
- Floppy disks
- Mouse or other pointing devices
- Parallel ports
Hardware configuration selection (if you are using more than one hardware profile)
During the Ntdetect phase, if you have multiple hardware configurations, the following information appears:
Hardware Profile/Configuration Recovery Menu
This menu allows you to select a hardware profile
to be used when Windows 2000 is started.
Profiles are only necessary under non–Plug and Play conditions. Plug and Play negates the need for profiles.
The bootstrap loader pauses for a few seconds or until you press Enter. If you have only one hardware profile, Windows 2000 Professional uses the default settings.
Windows 2000 Professional automatically uses the default settings if you do not select a hardware profile. When the default configuration is used, the bootstrap loader uses the registry information that Windows 2000 Professional saved at the completion of the last shutdown. After you select a hardware profile, Ntdetect.com passes control back to Ntldr.
During the next phase, Ntldr loads the kernel and the hardware abstraction layer (HAL) into memory. Next the bootstrap loader loads the registry key HKEY_LOCAL_MACHINE/SYSTEM from the folder
The kernel initiates the Windows 2000 Professional screen, and the Starting Up progress bar is displayed. When the status bar completes, Ntoskrnl prepares the network information.
The kernel uses the information that was passed from the boot loader to create the HKEY_LOCAL_MACHINE/HARDWARE key, which contains the hardware data that is collected at system startup. The data includes information about various hardware components on the motherboard and the system interrupts allocated by each device.
The kernel then creates the Clone control set, which is a copy that points to the Current control set. The Clone control set represents the state of the computer during configuration and is not changed or modified.
Operating system logon process
The Windows subsystem automatically starts Winlogon.exe, which starts the Local Security Administration. The Begin Logon dialog box appears. Windows 2000 might still be initializing network device drivers, but you can log on.
The Service Controller searches the registry for services that are configured to load automatically. Autoload services have a Start value of 0x2 in the subkey HKEY_LOCAL_MACHINE/SYSTEM/CurrentControlSet/Services/DriverName.The services that are loaded during this phase are loaded in parallel and so are loaded based on their dependencies. The dependencies are described in the DependOnGroup and DependOnService entries in the subkey HKEY_LOCAL_MACHINE/SYSTEM/CurrentControlSet/Services/DriverName.
Windows 2000 startup is not considered complete until a user successfully logs on to the system. After a user logs on, the Clone control set is copied to the LastKnownGood control set.