Edit ini files. Selecting the default operating system

File boot.ini is located in the root directory of the hard drive, or rather, in its
system partition. There are also other files necessary for correct
operating system loading: ntdetect.com, ntldr, ntbootdd.sys,
bootsect.dos. File boot.ini is responsible for choosing the operating system, sets
parameters of its functioning, while the PC boots, it also controls
the download process itself.
The boot.ini file is edited in a regular text editor. Actually,
the need for editing may arise if this file is damaged,
to restore in case of accidental deletion, to add disks or their
partitions into the system, as well as deleted.
Before editing boot.ini turn on viewing hidden files, otherwise you will
If you don’t find it, then be sure to make a backup copy of it in its properties
uncheck "read only" otherwise you won't be able to save
result of editing, be sure to make a backup copy of the file.
Partially editable via: System properties Loading
operating system Boot and recovery, or through the utility Windows
msconfig.exe.,as well as through third-party programs, but full editing
only possible manually.
1 .Create a backup copy: My computer, right click, Properties
- Additionally - - press
operating system click Edit . Your text editor will open
Notebook, your saved file has opened for editing. Here
click on File -save as in the empty space of the dialog box
right click and select Create - Folder enter the folder name,
for example, file and press enter. On the created folder, double-click and
press Save , the backup has been created.
2 .Editing : we do everything as in the previous paragraph. The file will open in Notepad.
Here's an example of what you'll see (sample boot.ini file for Windows XP
Professional):

timeout=30
default=multi(0)disk(0)rdisk(0)partition(1) \WINDOWS

multi(0)disk(0)rdisk(0)partition(1)\WIND OWS="Microsoft Windows XP
Professional" /fastdetect
You can use the window for editing, Where are you
you can select the default operating system, set the timeout
choosing an operating system. Edit manually, possible with command
lines, via command Bootcfg.exe.("this utility is available
only in Windows XP Professional, not available in the home version):
Start - Execute - enter cmd, a command line will open, enter
bootcfg/?.Editor options and help open here.
To select the default operating system, at the command prompt, enter
bootcfg/default/ID# , # - serial number of the operating system in the list
operating systems.
To remove an operating system, from the operating systems section of the file
Boot.ini:
enter bootcfg/delete/ID# , where # is the operating system serial number
on the list.
To add OS: enter bootcfg/copy/d @@@@/ID# , Where @@@@ - text
operating system name, e.g. Windows Vista, # - OS number in the list.
Set the OS selection waiting time: enter into the command line:
bootcfg/timeout# , where # is the time in seconds after which it will be
the default operating system will load.
Next, save the editing results: do everything as in point 1, only
don't create a folder, just save the file, this way you save
changes to the file.
There are other possibilities for editing this file, but for an inexperienced user it is better to stop here so as not to cause harm due to inexperience.
Note: To open My Computer properties, do not click on the shortcut, here
the properties of the shortcut and not the computer will open, go to the Start menu and select there

This article describes how to view and change the Boot.ini file using the Windows XP Startup and Recovery tool. Windows XP contains components that make it easier to view and change this file.

Before making changes to the Boot.ini file, it is recommended that you back it up. To do this, you must first enable viewing of hidden files.

Backing up the Boot.ini file

  1. My computer and select Properties.
    or
    On the menu Start select item Execute, enter the command sysdm.cpl and press the button OK.
  2. On the tab Additionally in the group press the button Settings
  3. click the button Edit. The file opens in Notepad for editing.
  4. IN " Notepad» click File in the panel Menu and select a team Save as.
  5. Right-click an empty space in the dialog box Save as, select a command New in context menu and then select Folder.
  6. Enter a folder name, for example, temp and press the key ENTER to create a folder named " temp»
  7. Double-click this folder and then click Save to save a backup copy of the file Boot.ini.

Editing the Boot.ini file

  1. Right click the icon My computer and select Properties.
    or
    On the menu Start select item Execute, enter the command sysdm.cpl and press the button OK.
  2. On the tab Additionally in the group press the button Settings.
  3. click the button Edit

Example Boot.ini file

Below is a sample file Boot.ini, used by default on computers running Windows XP Professional


timeout=30

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

timeout=30
default=multi(0)disk(0)rdisk(0)partition(1)\WINDOWS
multi(0)disk(0)rdisk(0)partition(1)\WINDOWS="Windows XP Professional" /fastdetect
multi(0)disk(0)rdisk(0)partition(2)\WINNT="Windows 2000 Professional" /fastdetect

Changing the Boot.ini file

If you are editing the Boot.ini file using the Boot and Recovery dialog box, where you can select a default operating system, setting a timeout, or editing the file manually, use the command line to enter Bootcfg.exe.

Note. The Bootcfg.exe utility is available only on the Windows XP Professional operating system. This utility is not available on the Microsoft Windows XP Home Edition operating system, so the contents in this section do not apply to the Windows XP Home Edition operating system

  1. Click the button Start and select Execute.
  2. In field Open enter the command cmd.
  3. At the command prompt, enter bootcfg/?
  4. After this, help and parameters for BOOTCFG.exe are displayed.

Adding an Operating System

At the command prompt, enter

bootcfg /copy /d /ID#

Where operating system description is a text description (for example, Windows XP Home Edition), and # is the number of the element in the “operating systems” section of the BOOT.INI file, a copy of which must be made

Removing the operating system

At the command prompt, enter

where # is the number of the item to be removed from the “operating systems” section of the BOOT.INI file (for example, 2, which corresponds to the second operating system in the list)

Selecting the default operating system

At the command prompt, enter

where # is the number of the element in the “operating systems” section of the BOOT.INI file, which will become the default operating system.

Setting the waiting time

At the command prompt, enter

where # is the time in seconds after which the default operating system will load

Opening the Boot.ini file to confirm changes

  1. Right click the icon My computer and select Properties.
    or
    On the menu Start select item Execute, enter the command sysdm.cpl and press the button OK.
  2. On the tab Additionally in the group press the button Settings.
  3. click the button Edit

Editing BOOT.INI It is not difficult to perform on a running operating system; you can find it in the root directory of the system drive C:\, you will not see it right away, because the BOOT.INI file is assigned the hidden attribute. You can read how to find the BOOT.INI file in our article. But I suggest something else, let's make it more difficult for ourselves. Let's say you were unable to load Windows XP as a result of an error you made when editing the BOOT.INI file or it was corrupted by some program. How can we now get to our BOOT.INI file and edit it?

Editing BOOT.INI

We will need either a boot floppy disk, how to create and boot Windows XP from it, read Or you can use the Windows XP distribution kit to change the BOOT.INI file directly in, or a simpler option: Live CD - an operating system that boots from removable media ( CD, DVD, USB drive, etc.), which does not require installation on a hard drive to function; if you still don’t have one, you definitely need to get one; such Live CDs are very easy to find on the Internet. We set the BIOS to boot from disk, if you don’t know, read and boot from a Live CD, go to the root directory of drive “C” and find our file there. We open it using any text editor, for example Notepad, it is located in the root directory of the system drive C:\. Here I have provided the transcript and contents of a typical BOOT.INI file and, for clarity, attached a photo of the computer controls.


timeout=20
default=multi(0)disk(0)rdisk(0)partition(1)\WINDOWS
multi(0)disk(0)rdisk(0)partition(1)\WINDOWS="Microsoft Windows XP Professional RU" /fastdetect

Explanation:

Controls the download process.

timeout=20 time given to the user to choose a system, in this case 20 seconds

multi(0) disk controller, must be set to 0

disk(0) this parameter must also be set to 0

rdisk(0) determines the serial number of the disk that contains the boot partition, note that the numbers start from zero, that is, if you have two hard drives and the operating system is on the first hard drive, then it should be indicated like this rdisk(0), look at photo Disk Management, I have three hard drives

The countdown does not start from one, but from zero, the operating system is located on the disk designated as zero, that is, on the first one. In the photo it is 232.88GB in size.

partition(1) is the number of the boot partition of the hard drive, numbers start from one, in the photo you can see that the operating system is located on partition(1) or, in other words, on the system partition “C” with a capacity of 92.29 GB.

And lastly \WINDOWS="Microsoft Windows XP Professional RU" /fastdetect.

WINDOWS = path to the directory or, more simply, to the folder where the operating system is installed.

" Microsoft Windows XP Professional RU"The name of the operating system, by the way, here you can write any name.

/fastdetect is a special key that disables recognition of devices connected to serial and parallel ports.


At the beginning of the article, we wanted to also edit the BOOT.INI file on a working Windows XP, but it seems to me that after reading everything described above, editing the BOOT.INI file on a working Windows XP will not be difficult for you.

Here I have provided similar parameters key/fastdetect: If you have little experience, be very careful with these parameters.

  1. /basevideo the system will use the standard VGA driver, used if you have problems with your video card
  2. /fastdetect The system does not detect Plug and Play devices during the boot process.
  3. /maxmem is used if the RAM is unstable.
  4. /bootlog is used to find the reason why the system can only boot in safe mode.
  5. /safeboot When installed, the system will boot into safe mode.
  6. /sos includes a list of loaded drivers on the screen, which will help you find out what the system is struggling with when loading.
  7. /crashdebug loads the debugger and remains inactive until a kernel error occurs.
  8. /nodebug does not display debugging information on the screen.
  9. /hal specifies the file that is used as hal.dll after loading.
  10. /kernel specifies the file that is used as ntoskrnl.dll after loading.

Look carefully at where you made a mistake and what you entered incorrectly, make the correct changes and try to reboot and log into your operating system.