Sponsoring website: Emergency Boot CD





The BOOT.INI File of
Microsoft
® Windows™ NT/2000/XP/2003

Web Presentation and Text Copyright©2004-2006, 2015 by Daniel B. Sedory
NOT to be reproduced in any form without Permission of the Author !




Introduction

This page will help you make changes to a file you might not even know exists!
Whenever you try out a copy of a Windows™ 2000, XP or 2003 OS on a computer that already has Windows™ 9x/Me installed, a new OS boot selector menu will appear after installing one of these operating systems. That menu is controlled by a BOOT.INI file.

Many have asked me how to remove that menu after they deleted the new (but temporary) OS from their hard drive. Well, it's actually a lot easier (and safer) to simply change the menu. Why? Because your old system now has a new look:

Most likely you'll be quite surprised to find a handful of new files in your Windows™ 9x/Me root directory! Along with the new file, NTLDR, and other NT-type system files, you'll also find this BOOT.INI file which is used to make that OS boot selector menu. Unfortunately, you can not  just remove those files! Doing so will make it impossible (until corrected) to boot up your Windows™ 9x/Me OS! The reason for this is:

Installing one of these new OSs (2000/XP/2003) will, without any warning, change the Boot Record of a Windows™ 9x/Me OS. Instead of looking for the files IO.SYS and MSDOS.SYS, the changed OS Boot Record will search for and run the NTLDR system file... or maybe it's locking-up instead, because you already deleted those files before reading this!   If you were to look at your OS's Boot Sector in a disk editor, you'd find that your old MSWIN4.1 (Windows™ OSR2/98/98SE/Me) code had been replaced with a FAT32 version of the NTFS Boot Record (even though it may still have an OEM ID of "MSWIN4.1").

You can, however, easily make changes to the BOOT.INI file so the menu will show only the Microsoft® operating systems you want to boot up, or set it to only one and have it flash by so quick you'll forget about it being there. So, maybe you'll find a use for all those extra files you never asked for!  [If you really want to get your old Windows™ 9x/Me partition back to its original state, you'll either need some expert advice, or spend enough time studying until you can edit the volume's Boot Record before finally deleting the added system files. ]

Your Choices for Changing the Boot Menu

What about Windows™ 7 or Vista?

You can not use BOOT.INI with these operating systems! Vista and Windows™ 7 requre the use of a new boot manager ("bootmgr") and other associated files in order to boot. If you try booting these systems using BOOT.INI and NTLDR, the operation will fail. For example, if you install Windows™ 7 in unallocated space on a computer running Win XP and look inside the XP partition, you'll find the install process made backups of the original boot sector (BOOSECT.BAK) and boot.ini (Boot.BAK) files, and these lines added to the new boot.ini file:

;Warning: Boot.ini is used on Windows XP and earlier operating systems.
;Warning: Use BCDEDIT.exe to modify Windows Vista boot options.

If the NT-type OS is still Installed

Boot up the Windows™ 2000, XP or 2003 OS and open "Control Panel" then click on "System" (or select "Properties" after right-clicking on My Computer). Under the "System Properties" window's "Advanced" tab, if you click on "Startup and Recovery*" you'll see at least two basic items in the BOOT.INI file that you're allowed to change from this dialog box:  1) You can select the default OS to boot up, and 2) How many seconds to display the boot menu. And under Windows™ XP or 2003, you'll find another button that gives you direct access to editing the whole BOOT.INI file! Under Windows™ 2000, you'll need to find the BOOT.INI file on your own for further editing; such as arranging the order in which the OS selections appear in the menu. So, if you decide to delete the new OS, simply set your old OS as the default boot OS and uncheck the item for displaying the menu list (or manually set it to zero; same result). You could then safely delete the new OS partition, but not the files it added to your old partition.
________________________________

*This is actually a very interesting feature of the 'NT' Operating Systems! Each time you open this window, it immediately checks the MBR's Partition Table (not just in Memory, but directly from the HDD) to see which Partition is set to boot ('Active'; 80h byte) and then opens the BOOT.INI file in that partition's root directory. This is how it determines which of several possible BOOT.INI files on a system it should open for editing. [ We know this for a fact, because: After initially using "Startup and Recovery" to view one particular BOOT.INI file under Windows™ 2000, we changed the 'Active' partition with a disk editor. Then, without rebooting(!), we used this feature again, and it opened a completely different BOOT.INI file from the root directory of the other partition! ]


If only the NT-type OS Partition was Deleted

If you already deleted the new OS, you'll need to: 1) Make sure your old OS is set to show "Hidden, System" files then look for the BOOT.INI file in C:\,  2) Once you've found it, check the 'Properties' settings of its attributes and make sure it's not  set to 'Read-only' (so you can edit it),  3) Open the file in a text editor, such as NOTEPAD, and edit the "default" and "timeout" lines as described below; you can also delete any lines that refer to an OS you removed from the system. And finally, 4) Do a quick check of the file's attributes to make sure they're still 'Hidden, System' (the 'Read-only' attribute is not required).

If no OS (old or new) boots up!

In this case, we have to assume (for now) that you deleted a critical component. Write down any error messages you see on the screen when trying to boot up your computer! These three files (located in your original OS's root directory) are necessary to boot up either your old OS or the NT-type OS:
The BOOT.INI file, NTLDR (or ntldr; no extension!) and NTDETECT.COM. Apart from these, in order to boot up a Windows™ 9x/Me OS after an NT-type OS has changed its Boot Sector, the file BOOTSECT.DOS (or its equivalent under a different file name) must also be present!   With both (or more?) OSs incapable of booting, the cause must first be determined before a course of action can be suggested. Read our Feedback page for some helpful thoughts related to boot up issues and to contact us for more information.

One thing specific to NT-Type boot-up issues: If you incorrectly edited or deleted your BOOT.INI file, the older NT-Type OSs (Windows NT, 2000 and we believe original versions of XP) will no longer boot up! We purposely deleted our BOOT.INI file under Windows XP SP2 to see what would happen, and the OS was still able to boot up; if that doesn't work for you, we'd like to know about it! So, how do you boot up one of the old systems if boot.ini is missing? Well, you either already have a boot diskette for this purpose, or you'll have to create one from another system or download the files from the Net. After copying the files listed above to the diskette and setting (editing) the boot.ini file to boot up your non-booting OS partition, it should boot up as normal so you can fix/create its boot.ini file! For more information, see the Microsoft article: Creating a boot disk for an NTFS or FAT partition (running) under Windows XP .

Example BOOT.INI Files

A Simple Dual Boot File:

[boot loader]
timeout=10
default=multi(0)disk(0)rdisk(0)partition(2)\WINDOWS
[operating systems]

multi(0)disk(0)rdisk(0)partition(2)\WINDOWS="Microsoft Windows XP" /fastdetect
C:\ = "Microsoft Windows"

For most, this should be very similar to your (first) BOOT.INI file. If you installed Windows™ 2000 Pro, instead of Windows™ XP, then the "\WINDOWS" portion would be "\WINNT" instead. The descriptions of the Windows® Operating Systems in the Menu may vary; this install didn't even mention that the old OS was Windows™ 98 Second Edition. However, this is irrelevant, since you can change it to anything you want when editing the file!

A Complex Multi-Boot File:

[boot loader]
timeout=30
default=multi(0)disk(0)rdisk(0)partition(1)\WINNT
[operating systems]

multi(0)disk(0)rdisk(0)partition(1)\WINNT="Win 2000 Pro (SP3)" /fastdetect
C:\CMDCONS\BOOTSECT.DAT="Windows 2000 Recovery Console" /cmdcons
multi(0)disk(0)rdisk(1)partition(1)\WINNT="Windows 2000 Pro" /fastdetect
C:\ = "Windows 98 SE / DOS 7.1"

The next section offers a detailed explanation for all the differences you see in the example above.

Explanations for each part of BOOT.INI

In the "[boot loader]" section above, the "timeout" entry is how many seconds (30 in this case) that the menu will remain onscreen before trying to boot up the "default" OS.

Example Line:
multi(0)disk(0)rdisk(0)partition(1)\WINNT="Descrip."

Most of these lines use what are known as ARC (Advanced RISC Computing) paths to specify the location of various boot partitions. Almost every machine using ATA (EIDE / IDE or SATA) hard drives will have: "multi(0)disk(0)". The multi(x) parameter is used to set the disk controller number, where x=0,1,2,.... The multi(x) parameter is always followed by disk(0); unless you're using a SCSI controller without the BIOS enabled.

The "rdisk(n)" parameter is for the HDD drive number, where n=0,1,2,... depending upon which physical drive this HDD is in your system. The "partition(p)" parameter is its partition on that drive, where p=1,2,3,... in order, counting from a 1 (not a zero).

So, the very first partition on this first physical drive (where our main Windows™ 2000 OS is located) is: "multi(0)disk(0)rdisk(0)partition(1)."   The "\WINNT" which follows that, lets the OS Loader know that the system files are in the "C:\WINNT" folder! However, the Windows™ XP OS often uses the older folder name of "C:\WINDOWS," so the last part of its ARC might be "\WINDOWS" instead.

The Descriptions of the OS boot choices, such as my default: "Win 2000 Pro (SP3)" (shown in GREEN characters above) are simply what NTLDR displays in the boot menu; so you can change them to anything you wish!

The second line under the "[operating systems]" section is what you could call an alternate, backup or rescue copy of my main Win2000 OS which is located in the same volume as the main OS. A line like this will only be found if you install the Recovery Console files from your install CD onto your hard disk! Though its entry appears to differ radically from the usual
"multi(0)disk(0)" + "rdisk(n)" + "partition(p)" + "\systemroot"  format, that's not really the case as we'll see later.

The third line under the "[operating systems]" section is an entirely different partition and version of Windows™ 2000; note the "rdisk(1)" in the line which places it on the second physical drive! Yes, Windows™ 2000, XP, 2003 can boot from any hard drive; I'm not sure if this would be true without the NTLDR/BOOT.INI files being located in a Primary partition on the first HDD though. Does anyone have a working example where that's not true?

NOTE: The fourth line under "[operating systems]" is what you're likely to see if you installed one of these new NT-type OSs on a system that already had Windows™ 9x/Me. You'll see a line similar to this: C:\ = "Microsoft Windows ME" (where C:\ = "description" is all that's required), and they don't appear to use ARC paths! Why is that? Well, it's just an illusion built into NTLDR! If you were to add such a line to a BOOT.INI file that hadn't been processed during an OS install (or  if you accidentally removed the file that C:\ = " " actually refers to... we'll get to that very soon), then attempting to boot that selection would cause your system to lockup after displaying this message:

           I/O Error accessing boot sector file
multi(0)disk(0)rdisk(0)partition(1)\BOOTSECT.DOS

Why? Because the filename BOOTSECT.DOS and its ARC path are built into the programs ntldr and arcldr.exe and unless this file exists in the same folder they are in, you must supply a path to some other file and/or location. Now you know why the second line in boot.ini above contains the path: C:\CMDCONS\BOOTSECT.DAT That's the file which initially boots the Recovery Console!

What can I do if BOOTSECT.DOS was Deleted?

To see a similar method for booting up DOS or older Windows partitions or even Linux (if LiLo is its boot sector) using a Bootsect data file and BOOT.INI, see: Boot Part. Though bootpart was first written for Windows™ NT (some material on the page is outdated, and links may be broken), the bootpart program is still quite useful for creating a file that will boot alternate OSs from a BOOT.INI file. The program runs under Windows™ NT, 2000, XP, 2003 or DOS (with certain limitations). For example, when we ran BOOTPART (no switches) on a multi-OS partitioned 20 GiB drive, it displayed:

Physical number of disk 0 : e1a8e1a8
 0 : C:  type=7  (HPFS/NTFS), size= 7052503 KB, Lba Pos=63
 1 : C:* type=c  (Win95 Fat32 LBA), size= 6144862 KB, Lba POs=14105070
 2 : C:  type=83  (Linux native), size= 64260 KB, Lba POs=26394795
 3 : C:  type=5  (Extended), size= 6747300 KB, Lba POs=26523315
 4 : C:  type=82   (Linux swap), size= 136521 KB, Lba POs=26523378
 5 : C:  type=5   (Extended), size= 6610747 KB, Lba POs=26796420
 6 : C:  type=83    (Linux native), size= 6610716 KB, Lba POs=26796483

The asterisk in the display above shows the FAT32 partition (type=c) is marked as the Active boot partition in the Partition Table. However, since this drive uses a boot manager (GRUB) rather than simple MBR boot code, it makes the 'Active' boot setting irrelevant. At the end of each line, we take the phrase "Lba POs=" to mean: The LBA "Postition" (that is, the first sector of that partition) in LBA or Absolute sector notation; e.g., the first partition's Volume begins at Absolute sector 63 (counting from Absolute sector 0 as the MBR sector). Note: For some odd reason, bootpart labels whole physical drives as C:, D:, etc.; otherwise, it gives very good information about the drive (including the location of each Extended MBR sector!). After running the command:
    bootpart 1 C:\BOOTSECT.DOS Windows 98
The program dumped its usual 'no switch' display again (not a nice thing to do in my opinion!) and then stated:

C:\BOOTSECT.DOS written
C:\BOOT.INI updated

When we forgot to use the Path with the BOOTSECT.DOS filename, it was created in the same folder that we ran bootpart in, and the following line was added to the C:\BOOT.INI file:
 C:\theStarman\asm\mbr\WORK\BOOTSECT.DOS="Windows 98"
But, it was easy enough to edit it in NOTEPAD and move the file to the root folder; thus allowing us to use only the line: C:\ = "Windows 98" (since we used the filename, BOOTSECT.DOS). If we'd used a name like "WIN98.DAT," then a full pathname would have been required in BOOT.INI, such as:
C:\WIN98.DAT = "Windows 98" (which is why bootpart always includes the full path in BOOT.INI no matter what file name you use).

Note: When trying to verify the use of the "LBA" switch with bootpart, the description portion of the line written to BOOT.INI was filled with a number of weird (and oft times unreadable!) characters never typed on the command line! We're seeking examples of BOOT.INI files written by bootpart when the partition is beyond 8.4 GiB into the drive... we'd like to see both your BOOT.INI (copied directly from root folder into a .ZIP archive) and whatever kind of Bootsect file bootpart made from both without and with the LBA switch!

[ If you have any problems using this program and require a bootsect.dos file for your system, you can contact us for possible help. ]

More Details

/fastdetect causes NTDETECT to bypass any parallel and/or serial device enumeration when booting up. For example, it won't waste time trying to figure out exactly what kind of mouse you have each boot up.

References

A Lot More Switches:

If you're looking for every switch that a BOOT.INI file could possibly have, the following URL will most likely have an explanation for it: http://technet.microsoft.com/en-us/sysinternals/bb963892.aspx .

Here are the relevant KB articles for editing BOOT.INI files:

HowTo: Edit the BOOT.INI File in Windows 2000

HowTo: Edit the BOOT.INI File in Windows XP

HowTo: Manually Edit the BOOT.INI File in a Windows Server 2003 Environment

Each of the articles above contain examples of a BOOT.INI file, but I thought you might like to see my own since you'll know for sure it is from a working Windows™ 2000 system.

 

I hope you found this Introduction to BOOT.INI files helpful.

The Starman.


 

Updated: January 1, 2008 (2008.01.01); September 13, 2009 (2009.09.13).
Last Update: August 3, 2015 (2015.08.03).


 

 Back to The Starman's Realm MBR pages