NTLDR

From Free net encyclopedia

Image:NTLDR selection menu.png NTLDR (abbreviation of NT Loader) is the boot loader for Windows NT, including its later versions (2000/XP/Server 2003 but not Vista, which uses a new booting-mechanism called Boot Configuration Data that is incompatible with NTLDR). NTLDR can be run from either portable storage (such as a CD-ROM or USB flash drive), or the primary hard disk. NTLDR can also load a non NT-based operating system given the appropriate boot sector in a file. Windows XP and Windows Server 2003 on IA-64-based systems do not use NTLDR, instead they use EFI and IA64ldr.efi.

NTLDR requires, at a minimum, the following two files to be on the active partition: NTLDR, which contains the main boot loader itself, and boot.ini, which contains configuration options for a boot menu. To load an NT-based OS, ntdetect.com must also be present.

The NT format command adds an NTLDR boot sector when it formats a disk.

Contents

Startup process

When booting, NTLDR does the following in order:

  1. Places the processor in 32-bit flat memory mode.
  2. Accesses the file system on the boot drive (either FAT or NTFS).
  3. If hiberfil.sys is found, the contents are loaded into memory and the system resumes where it left off.
  4. Otherwise, reads boot.ini and prompts the user with the boot menu accordingly.
  5. If a non NT-based OS is selected, then NTLDR loads the associated file listed in boot.ini (bootsect.dos if no file is specified) and gives it control.
  6. If an NT-based OS is selected, then NTLDR runs ntdetect.com, which gathers information about the computer's hardware (if ntdetect hangs during hardware detection there is a debug version called ntdetect.chk which can be found on Microsoft support[1]).
  7. Starts Ntoskrnl.exe, passing to it the information returned by ntdetect.com. <ref>Template:Cite book</ref>

boot.ini

NTLDR allows the user to choose which operating system to boot from at the menu; for NT and NT-based operating systems, it also allows the user to pass preconfigured options to the kernel. The menu options are stored in boot.ini, which itself is located in the root of the same disk as NTLDR.

For NT-based OSs, the location of the operating system is written as an Advanced RISC Computing (ARC) path.

boot.ini is protected from user configuration by having the following file attributes: system, hidden, read-only. To make it editable, you must first unlock it with the following command under a console attrib -s -h -r boot.ini. A more secure fashion to edit the file is to use the bootcfg command from a console. bootcfg will also relock the file (setting the file back to system, hidden and read-only).

Example

This boot.ini produces the boot menu in the screenshot above.

[boot loader]
timeout=30
default=multi(0)disk(0)rdisk(0)partition(2)\WINDOWS
[operating systems]
multi(0)disk(0)rdisk(0)partition(2)\WINDOWS="Microsoft Windows XP Professional" /fastdetect
C:\bootsect.dos="Microsoft Windows 98"

If the boot loader timeout option in boot.ini is set to 0, the NTLDR boot menu does not appear.

NT Kernel switches

Image:NTLDR Menu.png

A full explanation of all these is avalable from [2]

  • /3gb
  • /basevideo
    • The computer starts up using the standard VGA video driver.
  • /baudrate=nnn
  • /bootlog
  • /burnmemory
  • /crashdebug
  • /debug
  • /debugport=comx
  • /fastdetect
  • /maxmem=nn
  • /nodebug
  • /noexecute=optin (DEP)
  • /noguiboot
  • /nopae
  • /noserialmice:comx
  • /numproc
  • /onecpu
  • /pae
  • /pcilock
  • /safeboot
  • /safeboot:dsrepair
  • /safeboot:minimal
  • /safeboot:minimal(alternateshell)
  • /safeboot:network
  • /usepmtimer
  • /sos
  • /w95
  • /w95dos
  • /year

References

<references/>

See also

External links

ja:NTLDR pl:NT OS Loader ru:NTLDR