Hack #94. Hack the Windows NT/2000/XP Boot Loader

Customize what and how you boot using the BOOT.INI file .

The BOOT.INI file was introduced with Windows NT and lives on through Windows 2000, XP, and 2003 as a means to provide preboot reference to where the operating system is located and control over which operating system will be used. It allows users to select the DOS environment or the Windows NT environment (which does not support many of the applications and direct hardware access that DOS does). BOOT.INI can also be modified to support the addition of another drive that has an operating system installed (perhaps unknown to the operating system on the first/original disk drive), giving you multiboot support to a non-Microsoft OS.

BOOT.INI is a plain-text file (equivalent to DOS's IO.SYS and MSDOS.SYS) that resides in the root directory of your boot disk and is read by the NTLDR program when the system is starting up. It is saved with Read-only, System, and Hidden attributes, requiring you to remove these attributes before reading or modifying the file.

BOOT.INI Contents

The contents of a typical BOOT.INI file are shown below. The parameters in the file are few—essentially specifying the time that the boot loader waits for user input before processing the default selection, the default operating system to boot if there is no user selection, and a list of possible operating systems and the disk parameters indicating where the operating systems are stored.

[boot loader] timeout=3 ...

Get PC Hacks now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.