Windows boot.ini

Windows boot.ini

Boot.ini is one of the very first files that come into play when a Windows XP system is started up. It is a plain text file that is kept in the system root, so it is usually C:\boot.ini. Because it is an essential system file, the attributes are set to hidden, system, read-only to protect it. That means that it will not appear in the file lists in My Computer or Windows Explorer unless the default Windows settings are changed to show hidden files.

 Boot.ini contains the location of the Windows XP operating system on the computer. If there is a multi-boot system, the locations of of any other operating systems are also contained. During the startup process, functions from the Windows XP file named “Ntldr” are in charge of getting the proper operating system loaded and Ntldr looks at boot.ini to find out where the operating systems are located and whether a menu should be displayed. Boot.ini can also include entries giving boot options such as Safe Mode or the Recovery Console.

 Some examples of boot.ini files

A typical simple example [boot loader]

timeout=30

default=multi( 0)disk(0) rdisk(0)partitio n(1)\WINDOWS

[operating systems]

multi(0)disk( 0)rdisk(0) partition( 1)\WINDOWS= “Microsoft Windows XP Professional” /fastdetect

Example with Recovery Console as an option [boot loader]

timeout=30

default=multi( 0)disk(0) rdisk(0)partitio n(1)\WINDOWS

[operating systems]

multi(0)disk( 0)rdisk(0) partition( 1)\WINDOWS= “Microsoft Windows XP Professional” /fastdetect

C:\CMDCONS\BOOTSECT .DAT=”Microsoft Windows Recovery Console” /cmdcons

Example of a dual-boot system with XP on partition 2. Note that the location of Windows Me is given as C:\ [boot loader]

timeout=30

default=multi( 0)disk(0) rdisk(0)partitio n(2)\WINDOWS

[operating systems]

multi(0)disk( 0)rdisk(0) partition( 2)\WINDOWS= “Microsoft Windows XP Professional” /fastdetect

C:\ = “Microsoft Windows Me ”

Example with Safe Mode as an option and “timeout” =10 seconds [boot loader]

timeout=10

default=multi( 0)disk(0) rdisk(0)partitio n(1)\WINDOWS

[operating systems]

multi(0)disk( 0)rdisk(0) partition( 1)\WINDOWS= “Microsoft Windows XP Professional” /fastdetect

multi(0)disk( 0)rdisk(0) partition( 1)\WINDOWS= “Safe Mode” /safeboot:minimal /sos /bootlog
 
Open Start-Run and enter “msconfig”. The box shown below will open.

 Click the tab “BOOT.INI” and the figure shown next will open. The contents of the boot.ini file are shown and a number of configuration settings are available. In the middle right is a box where the settings for Timeout can be changed.

The command line tool bootcfg.exe

Windows XP Professional also has a command line utility for manipulating boot.ini called bootcfg.exe. (It may or may not be in a Home Edition installation. ) It is described in this Microsoft reference. It can be used in the Recovery Console to repair a damaged boot.ini file or in a command window to edit entries to the file. There are a number of different switches and these are illustrated in the output to a command window shown below

 Your Choices for Changing the Boot Menu

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.

Explanations for each part of BOOT.INI

[boot loader]

timeout=10

default=multi( 0)disk(0) rdisk(0)partitio n(2)\WINDOWS

[operating systems]

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

C:\ = “Microsoft Windows”

Option Description

multi(x) This option is used with IDE and ESDI drives and is also used with SCSI drives for computers using Windows NT. The number used in the above example is “0”, this number is the adapter’s number and should always be “0” for computers that rely on the BIOS to load system files.

    * In a computer using only IDE this option will work with up to four hard disk drives.

    * In a computer using only SCSI this option will work with the first two drives on the primary SCSI controller.

    * Finally, if a computer is using IDE and SCSI this option will work with the IDE drives on the first controller. 

scsi(x) If the computer has a SCSI controller and is not using BIOS to load the system files, the boot.ini may have “scsi(x)” instead of “multi(x).

disk(x) The disk on the controller. If “multi(x)” is used used, this value will always be “0”. However, if “scsi(x)” is defined, this value will be SCSI address.

rdisk(x) Which disk on the controller is being used. In the above example we are using an rdisk of “1”, which indicates the second disk on the primary controller is being used. This value may be between “0” and “3” and is always set to “0” when “scsi(x)” is being used.

paritions(x) Which partition the operating system is on. In the above example, the operating system is on the first partition of the drive. 

\WINDOWS=”.. .” Finally, the last portion of this line defines the directory of where windows is located and what the boot menu should display as the operating system. In the above example, the boot menu would display “Microsoft Windows XP Home Edition” as a selection.

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.

default=multi( 0)disk(0) rdisk(0)partitio n(2)\WINDOWS: –

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 (E IDE / IDE) 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 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.

Modifying the Boot.ini

At the MS-DOS prompt, type:

c: <press enter>

cd\ <press enter>

attrib -r -a -s -h boot.ini <press enter>

edit boot.ini <press enter>

While you can modify the Boot.ini file using the Startup and Recovery dialog, where you can select the default operating system, change the timeout value, or manually edit the file, the following method uses the command line utility, Bootcfg.exe.

Note The Bootcfg.exe utility is only available in Windows XP Professional. This utility is not available in Microsoft Windows XP Home Edition. Therefore, this section does not apply to Windows XP Home Edition.

1. Click Start, and then click Run.

2. In the Open text box, type cmd.

3. At the command prompt, type bootcfg /?.

4. The help and parameters for BOOTCFG.exe will display.

Adding an Operating System

At the command prompt, type:

bootcfg /copy /d Operating System Description /ID#

Where Operating System Description is a text description (e.g. Windows XP Home Edition), and where # specifies the boot entry ID in the operating systems section of the BOOT.INI file from which the copy has to be made.

Removing an Operating System

At the command prompt, type:

bootcfg /delete /ID#

Where # specifies the boot entry ID that you want to be deleted from the operating systems section of the BOOT.INI file (e.g. 2 for the second Operating system that is listed.

Setting the Default Operating System

At the command prompt, type:

bootcfg /default /ID#

Where # specifies the boot entry id in the operating systems section of the BOOT.INI file to be made the default operating system.

Setting the Time Out

At the command prompt, type: bootcfg /timeout# Where # specifies the time in seconds after which default operating system will be loaded.

Open the Boot.ini File to Verify Changes

1. Right-click My Computer, and then click Properties.

-or-

Click Start, click Run, type sysdm.cpl, and then click OK.

2. On the Advanced tab, click Settings under Startup and Recovery.

3. Under System Startup, click Edit.

How to rebuild the Windows boot.ini

   1. Insert the Microsoft Windows XP CD into the computer. Note: If you have a system recovery CD or restore CD these steps will likely not work for your computer.

   2. Reboot the computer with the CD and press any key when prompted to press any key to boot from the CD. If you do not receive this prompt and/or are not able to boot from the CD.

   3. Once in the Microsoft Setup menu press R to open the recovery console.

   4. Select the operating system you wish to use; if you only have Windows XP on the computer you will only have one prompt.

   5. Once prompted for the password enter the Admin password and press enter.

   6. Once at the command prompt type bootcfg /rebuild to start the rebuild process.

   7. The rebuild process will step you through a number of steps depending upon how many operating systems you have on the computer and how the computer is setup. Below is a listing of the common steps you are likely going to encounter.

      * Prompt for the identified versions of Windows installed. When you receive this prompt press Y if the bootcfg command properly identified each of the Windows operating systems installed on the computer. It is important to realize this command will only detect Windows XP, Windows 2000 , and Windows NT installations.

      * Prompt to enter the load identifier. This is the name of the operating system for the boot.ini. For example, Microsoft Windows XP Home users would enter “Microsoft Windows XP Home edition”.

      * Prompt to Enter OS load options. When this prompt is received type /fastdetect to automatically detect the available options.

   8. Once you have completed all the available options in the rebuild and are back at the prompt type exit to reboot the computer.

Advertisements

Leave a Reply

Please log in using one of these methods to post your comment:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s