Booting process of Windows NT Setup before Vista
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 ]. 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]
References[edit]
- ↑ "Bootable disc". CDBurnerXP. Retrieved March 2, 2014.
- ↑ "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. Unknown parameter
|url-status=
ignored (help) - ↑ "How to install Windows from the I386 folder". Microsoft Corporation. Archived from the original on March 2, 2014. Retrieved March 2, 2014. Unknown parameter
|url-status=
ignored (help) - ↑ "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. Unknown parameter
|url-status=
ignored (help) - ↑ "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.
- ↑ "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.
- ↑ Siyan, Karanjit (2000). Windows 2000 professional reference (3rd ed.). Indianapolis, Ind.: New Riders. pp. 1848. ISBN 0-7357-0952-1. Search this book on
- ↑ "Txtsetup.sif". Archived from the original on January 19, 2014. Retrieved March 16, 2014. Unknown parameter
|url-status=
ignored (help) - ↑ "Switches in TXTSETUP.SIF". Archived from the original on March 31, 2014. Retrieved March 16, 2014. Unknown parameter
|url-status=
ignored (help) - ↑ "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. Unknown parameter
|url-status=
ignored (help) - ↑ "Automating and Customizing Installations". Microsoft Learn. Microsoft Corporation. 11 September 2009. Retrieved 14 January 2024.
This article "Booting process of Windows NT Setup before Vista" is from Wikipedia. The list of its authors can be seen in its historical and/or the page Edithistory:Booting process of Windows NT Setup before Vista. Articles copied from Draft Namespace on Wikipedia could be seen on the Draft Namespace of Wikipedia and not main one.