Booting process of Windows NT Setup before Vista

An editor has nominated this article for deletion.
You are welcome to participate in the deletion discussion, which will decide whether or not to retain it.

Feel free to improve the article, but do not remove this notice before the discussion is closed. For more information, see the guide to deletion.
Find sources: "Booting process of Windows NT Setup before Vista" – news · newspapers · books · scholar · JSTOR[[Wikipedia:Articles+for+deletion/Booting+process+of+Windows+NT+Setup+before+Vista+(2nd+nomination)]]AFD

|

This article has multiple issues. Please help improve it or discuss these issues on the talk page. (Learn how and when to remove these template messages)

This article may be too technical for most readers to understand. Please help improve it to make it understandable to non-experts, without removing the technical details. (March 2023) (Learn how and when to remove this template message)

|

This article needs additional citations for verification. Please help improve this article by adding citations to reliable sources. Unsourced material may be challenged and removed.
Find sources: "Booting process of Windows NT Setup before Vista" – news · newspapers · books · scholar · JSTOR (April 2023) (Learn how and when to remove this template message)

|

(Learn how and when to remove this template message)

The first screen of the Windows XP Setup process

The booting process of Windows NT Setup before Vista works very similarly to the one of a regular Windows NT boot except that it runs from a CD-ROM. For this boot method to work, the BIOS must be compatible with the El Torito specification. The ISO 9660 file system on the install CD is not fully compatible with the standard. Although it is "Level 1", the file names don't have the file version appended to them. The boot image is of the "no emulation" type, 1 sector long (2048 bytes) and is loaded at segment 0x7c0.[1] It can be extracted from an ISO image by using a file-extraction program such as 7-Zip or WinZip. The ISO image is also not hybridized like ISO images from most Linux distributions and therefore it does not contain any master boot record (MBR) which makes it unable to boot by just copying the image over a block device such as a pen drive.

The installer can also be run from a MS-DOS command prompt so previous versions of Microsoft Windows that are already installed can be upgraded[dubious - discuss]. To run the installer from a MS-DOS based operating system such as Windows 98 or Windows ME, the user must start the system "in DOS mode" and then execute I386/WINNT.EXE on the CD-ROM.[2][3] A floppy disk containing MS-DOS can be used to start the installer. Versions of the installer in floppies were also available for sale.[4]

From Windows Vista onwards, the installer runs from BOOT.WIM which contains a bootable version of the Windows Preinstallation Environment. Windows PE 2.0 is based on the Windows Vista kernel,[5] later Windows PE versions are based on later Windows versions.[6]

## CD-ROM boot image phase[edit]

On a regular CD-ROM install, the BIOS executes the POST and then searches for a boot descriptor on the CD-ROM. The boot descriptor points to a boot catalog file on the ISO 9660 file system. The BIOS searches for a boot image compatible with the current architecture, loads it into memory and then runs it. The boot image is analogous to the boot sector on a hard drive. The boot image loads SETUPLDR.BIN which is analogous to NTLDR. If this fails for any reason, a message is displayed saying that NTLDR was not found, which may of itself be misleading; moreover, the NTLDR on the CD is never used during the loading phase of the installer. The process also assumes that file versions are unavailable.

Before starting the boot loader, the boot image checks whether there is a Windows install (system) already present and, if so, it starts `BOOTFIX.BIN`. If no install is found, or if the disk does not have an MBR, then it starts the boot loader directly, thus obviating the need for `BOOTFIX.BIN`. If `BOOTFIX.BIN` is started, it displays the string "Press any key to boot from CD." and waits for user input. If none is detected for some seconds, then it boots the next device, and so on. This behavior is essential for booting the second stage of the installer, which starts from the hard disk.

## Boot loader phase[edit]

Both `SETUPLDR.BIN` and `NTLDR` are composed of two binary files concatenated. They also can be found on the installation CD as compressed CAB files. The first file is `STPBOOT.BIN`, which is a flat binary file that just loads the second file. The second file is a regular EXE file in the Portable Executable format. In `SETUPLDR.BIN` the second file is `SETUPLDR.EXE` and in `NTLDR` the second file is `OSLOADER.EXE`. Both `SETUPLDR.EXE` and `OSLOADER.EXE` have embedded file system drivers for basic access on FAT, NTFS and ISO 9660. Differently from regular *.SYS drivers, the boot loader uses BIOS interrupts to access the boot disk. It also contains a built-in INI parser and CAB decompressor.

After the installer starts running, it prints the string "Setup is inspecting your computer's hardware configuration...". `NTDETECT.COM` is called and the system information is stored in memory. It then displays a blue screen in VGA text mode with the title "Windows Setup", or "Windows *version name here* Setup", with a white line on the bottom that serves as a status bar. `NTDETECT.COM`then looks for `TXTSETUP.SIF` and parses it. This file works as a key-value database just like the registry or an *.INI or *.INF file. The keys may either contain a list of files associated with their install location or a script line. Therefore, the database stores data and code. During the parsing, the blank lines are ignored and sections with the same name are merged.

The file `BIOSINFO.INF` is also loaded to resolve hardware quirks.

The key-value syntax in the `SourceDisksFiles` section is as follows:[7][8][9]

filename_on_source = disk_id,subdir,upgrade_code,new_install_code,spare,spare,new_filename

The installer asks if any additional drivers need to be loaded and loads text mode drivers.

* "Press F6 if you need to install a third party SCSI or RAID driver..."
* "Press F2 to run Automated System Recovery (ASR)..."

If so, they can be loaded from a floppy disk only. There is a hidden feature that shows a screen prompting the user to select a computer type if F5 is pressed during the first message.[10]

Text mode drivers are different from PnP drivers as they are loaded regardless if the hardware is present or not. The loading phase of the installer displays some messages on the screen about the current file being loaded. The message is "Setup is loading files ([the file description])...". The files loaded in this phase are those located in sections ending in `.Load`. In those sections, the key gives a driver name and the value gives a file. The driver name is then looked up in the same section without the `.Load` suffix to find the driver's user-friendly name. The kernel also needs a registry hive mounted to load the registry from, so `SETUPREG.HIV` is also loaded. All the file names of the files loaded by the boot loader are hard-coded except for the drivers.

As for PnP devices, after being identified by a bus driver, the address in checked in the section `HardwareIdsDatabase` and a corresponding driver name is given. But those are not used in this step.

## Kernel phase[edit]

After all boot files are loaded by the boot loader, the message "Setup is starting Windows" is displayed and the kernel starts. Just like a normal install, it starts the drivers and loads the only service which is `setupdd.sys`. It runs in kernel mode and starts a GUI still in text mode. From now on, all the drivers are NT based and BIOS interrupts are not used anymore.

The user is asked to choose a file system layout. The selected partition is formatted if necessary and the files from TXTSETUP.SIF are copied to the system. Then it creates the registry hives and automatically restarts the system so the NT system can start and bootstrap itself. The section HiveInfs points to the files used to fill the hives with the default values. On a fresh install this section is named `HiveInfs.Fresh`. The files are not reg files but are also ini files that can be understood by the ini interpreter bundled with the installer. The disk formatter program is statically linked with `setupdd.sys`.

## Remastering[edit]

There are many freeware tools available on the internet that customize TXTSETUP.SIF for the creation of unattended installs or to integrate drivers and hotfixes. This process is sometimes referred as slipstreaming.

The following command shows how a remastered CD can be created with a minimum set of options on Linux. It assumes that the current directory is the CD mount point. The image will be created at the home directory.

mkisofs -b Bootable_NoEmulation.img -no-emul-boot -N . > ~/ntsetup.iso

The file `winnt.sif` can be used to make the install unattended but it is not required to be present. There is a model file on the CD named `UNATTEND.TXT`. Setup tries to detect winnt.sif in the `I386` directory or on the root directory of a floppy disk.[11]

## See also[edit]

* Booting process of Windows NT

## References[edit]

1. ^ "Bootable disc". CDBurnerXP. Retrieved March 2, 2014.
2. ^ "How to start the Setup program from MS-DOS in Windows XP". Microsoft Support. Microsoft Corporation. Archived from the original on June 8, 2014. Retrieved March 2, 2014.
3. ^ "How to install Windows from the I386 folder". Microsoft Corporation. Archived from the original on March 2, 2014. Retrieved March 2, 2014.
4. ^ "How to obtain Windows XP Setup disks for a floppy boot installation". Microsoft Corporation. Archived from the original on 16 April 2014. Retrieved 16 March 2014.
5. ^ "What is Windows PE?". Previous Versions Documentation. Microsoft Corporation. 25 July 2008. Retrieved 2024-01-14. "Windows Preinstallation Environment (Windows PE) 2.0 is a minimal Win32 operating system with limited services, built on the Windows Vista kernel."
6. ^ "What is Windows PE?". Previous Versions Documentation. Microsoft Corporation. 30 October 2012. Retrieved 2024-01-14. "Windows® Preinstallation Environment (Windows PE) 3.0 is a minimal Win32® operating system with limited services, built on the Windows® 7 kernel."
7. ^ Siyan, Karanjit (2000). Windows 2000 professional reference (3rd ed.). Indianapolis, Ind.: New Riders. pp. 1848. ISBN 0-7357-0952-1.
8. ^ "Txtsetup.sif". Archived from the original on January 19, 2014. Retrieved March 16, 2014.
9. ^ "Switches in TXTSETUP.SIF". Archived from the original on March 31, 2014. Retrieved March 16, 2014.
10. ^ "How to force a Hardware Abstraction Layer during an upgrade or an installation of Windows XP". Microsoft Support. Microsoft Corporation. Archived from the original on 6 September 2014. Retrieved 31 March 2014.
11. ^ "Automating and Customizing Installations". Microsoft Learn. Microsoft Corporation. 11 September 2009. Retrieved 14 January 2024.

* v
* t
* e

Firmware and booting

Processes|

* Windows
* 9x
* NT
* NT Setup before Vista
* Linux
* Android

Booting firmware|

| Types|

* Proprietary firmware
* Open-source firmware
* Custom firmware

|

Interfaces|

* UEFI
* BIOS
* Video BIOS
* Open Firmware
* ACPI
* MultiProcessor Specification
* APM
* Legacy Plug and Play
* AlphaBIOS
* SRM
* SFI

Implementations|

* SeaBIOS
* Award BIOS
* American Megatrends
* AMIBIOS
* AMI Aptio
* InsydeH2O
* Phoenix SecureCore UEFI
* TianoCore EDK II
* OpenBIOS
* Coreboot
* Libreboot
* LinuxBoot
* Kickstart
* Run-Time Abstraction Services

Hybrid firmware bootloader|

* Common Firmware Environment
* Das U-Boot
* ARCS

Bootloaders|

* Bootloader unlocking
* Comparison of bootloaders

| Implementations|

* Acronis OS Selector
* Barebox
* BootManager
* BootX (Apple)
* BootX (Linux)
* GNU GRUB
* iBoot
* systemd-boot
* loadlin
* NTLDR
* OpeniBoot
* RedBoot
* rEFInd
* rEFIt
* SYSLINUX
* Windows Boot Manager
* xOSL
* Yaboot
* Plop Boot Manager
* MILO

|

Partition layouts|

* GUID Partition Table
* Master boot record
* Apple Partition Map

Partitions|

* EFI system partition
* BIOS boot partition
* /boot/

Utilities|

| Software|

* flashrom
* fwupd
* UEFITool
* Odin
* Heimdall

|

Hardware|

* Bus Pirate
* Raspberry Pi
* ft2232

Network boot|

* Preboot Execution Environment
* gPXE
* iPXE
* NetBoot
* Remote Initial Program Load
* Wake-on-LAN

ROM variants|

* ROM
* PROM
* EPROM
* EEPROM

Related|

* Boot ROM
* ROM hacking
* ROM image
* Execute in place
* Devicetree
* Fastboot
* Instant-on
* Power-on self-test
* EDL mode

*[v]: View this template
*[t]: Discuss this template
*[e]: Edit this template