TweakHomePC

Dual-booting all versions of Windows and Linux

   Dual-Boot    |    Win 8    |    Win 7    |    Vista    |    Win XP/2K/NT    |    Win9x/Me    |    How to    |    Legacy 9x Tweaks    |    SiteMap   


 

Here: Home > How do I ... >


Edit Boot.ini in Windows or MS-DOS

Last reviewed: March 2005

On this page:

About Boot.ini

The contents of the Boot.ini file determine the behaviour of, and what options will appear in, the boot menu (Startup Menu) for Windows XP, 2K, NT. Boot.ini is a small file in the root of the system partition which is nearly always the C: drive. The computer uses the system partition during early bootup before loading the OS from the OS's boot partition which may, or may not, also be the system partition.

Boot.ini is not normally visible in Windows Explorer as it has the Read-only, System, and Hidden attributes set.

The method you use to edit will depend on your circumstances. The safest method is to use Startup and Recovery which eliminates mistakes or typing errors but it has limited functionality. The most thorough method is a manual edit from Windows or MS-DOS but beware of typing errors or grossly incorrect entries.


About Editing Boot.ini

Be careful with your typing when you edit Boot.ini. And remember that spaces are as important as content. A few examples:

bootcfg /rebuild uses correct syntax.
bootcfg/rebuild is wrong!

attrib -s -r -h c:\boot.ini uses correct syntax.
attrib-s-r-hc:\boot.ini is very wrong!

multi(0)disk(0)rdisk(0)partition(1)\WINDOWS="Microsoft Windows XP" /fastdetect uses correct syntax (beware of word-wrap!).
multi(0) disk(0) rdisk(0)partition(1)\WINDOWS="Microsoft Windows XP" /fastdetect is wrong!

C:\="Microsoft Windows 98" uses correct syntax.
C="Microsoft Windows 98" is wrong!

multi()disk()rdisk()partition()\ directory=&menu text&
in Boot.ini's ARC path on x86-based computers

These define the location where that Windows XP/2K/NT's folders/files are installed i.e. the OS boot partition. Each line must be a complete line (no Word Wrap), and must be exactly correct! Otherwise you are likely to get 'Hall.dll', or other error, indication the Windows can not be found. The Bootcfg /rebuild command normally handles a Boot.ini creation quite efficiently. Occasionally user intervention is required or preferred.

multi()
The multi() syntax indicates to Windows that it should rely on the computer's BIOS to load system files. It's virtually always set to 0 (zero). If the SCSI() notation is used instead of multi() it indicates that Windows will load a boot device driver (NTBOOTDD.SYS) and use that driver to access the boot partition.

disk()
This is always 0 when multi(0) is used because the INT 13 call is involked. If scsi() is used then the number will be the SCSI ID of the target disk.

For the vast majority of users the correct syntax will be multi(0)disk(0).

rdisk()
rdisk() refers to physical hard disks and starts counting from 0. Therefore rdisk(1) refers to a second disk.
Every hard disk counts, not just disks with OSs installed.
The Primary Master hard disk is always rdisk(0).
If a Primary Slave exists, it has priority over any Secondary disk(s).
If a Secondary Master exists, it has priority over a Secondary Slave.

                PrimaryMaster   PrimarySlave   SecondaryMaster   SecondarySlave
1 disk  ->      rdisk(0)
2 disks ->      rdisk(0)        rdisk(1)
2 disks ->      rdisk(0)                       rdisk(1)
2 disks ->      rdisk(0)                                         rdisk(1)
3 disks ->      rdisk(0)        rdisk(1)       rdisk(2)
3 disks ->      rdisk(0)        rdisk(1)                         rdisk(2)
3 disks ->      rdisk(0)                       rdisk(1)          rdisk(2)
4 disks ->      rdisk(0)        rdisk(1)       rdisk(2)          rdisk(3)

partition()
A number is allocated to each partition in the order that they occur on the hard disk specified by rdisk(). It starts counting from 1, and Primary partitions on that disk are counted first.. Therefore partition(2) is the second Primary partition on the disk.

rdisk(0)partition(1) refers to the first hard disk and its first partition. An example of the third partition on a second hard disk would be rdisk(1)partition(3).

\directory
Directory is the name of the installation directory of that Windows. The default is WINDOWS for Windows XP but WINNT for Windows 2000 and NT. However if you upgraded Windows 2000 to Windows XP then the directory is still likely to be WINNT.

="menu text"
Menu text contains a description of what appears in the Boot Loader menu. It's used only in the [operating systems] section of Boot.ini and never in the [boot loader] section. You can alter the description to your own liking but must use the = and enclose the description between the quotes.


Backup Boot.ini

It's important that you backup Boot.ini before you edit it. It's just possible your Windows may fail to run if a mistake is made when editing Boot.ini. If your Windows does run on bootup, make a backup first.

Rescue Boot Disk

THPC strongly recommends that all users create a Rescue Boot Disk (one floppy). This will contain a copy of Boot.ini plus the other boot files. It will also get Windows running even if the boot sector, or boot files, on your computer becomes damaged.

If your current dual-boot, or boot menu, is incorrect you must remember to create a new Rescue Boot Disk when the problem has been resolved. Write-protect it, label it correctly, and keep it safe.

Read the Rescue Boot Disk page for instructions on creating a Rescue Boot Disk.

#1 Use XP/2K 'Startup and Recovery' to Edit Boot.ini

  1. Right-click My Computer, and click Properties.
    - or -
    in Control Panel, start the Performance and Maintenance tool, and then click System.
  2. On the Advanced tab, click Settings under Startup and Recovery.
  3. Under System Startup, select your Default operating system
  4. Still under System Startup, click the Edit button.
    This opens the file in Notepad ready for editing.
    In Notepad, click File on the Menu bar, and then click Save As. Set Save as type: to All files, and save it as Boot.inn (or similar) somewhere safe. Close Notepad.
  5. Reopen Boot.ini in Notepad (as described here) and edit it now.
    When finished, click File on the Menu bar, and then Save.

[top of page]

#2 Use Bootcfg from XP/2K to Rebuild Boot.ini

  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 be displayed.

    Bootcfg commands:
    bootcfg /list - displays the current situation
    bootcfg /add - scans for, & optionally adds, XP, 2K, NT installations
    bootcfg /rebuild - displays/adds the OSs located
    bootcfg /scan - scans for, & displays, XP, 2K, NT installations
    bootcfg /default - set the default OS to boot
    bootcfg /redirect - enable the Headless Administration feature (redirection)
    bootcfg /disableredirect - disable the Headless Administration feature (redirection)

    Read Bootcfg for a description of Bootcfg uses/commands.

[top of page]

#3 Use Msconfig to Edit Boot.ini

  1. Click Start, click Run
  2. Type msconfig to start the System Configuration utility.
  3. Click the Boot.ini tab.
  4. Edit the file, and Save it.

[top of page]

#4 Use XP/2K Console to Edit Boot.ini

  1. Click Start, and then click Run
  2. Type in (press Enter key after each line)
    CMD
    CD..
    ATTRIB -R -S -H BOOT.INI
    COPY BOOT.INI BOOT.INN

    NOTEPAD BOOT.INI
  3. Now edit Boot.ini. When finished, Save it and then type
    ATTRIB +R +S +H BOOT.INI

[top of page]

#5 Start your computer in Safe Mode

If you can not start your computer, you may be able to start it in Safe mode. If you can get to Safe mode you can edit Boot.ini in a manner described above.

    To use Safe mode:
  1. Press the F8 key during bootup.
  2. Select Safe mode from the menu that appears.
  3. Edit Boot.ini as described above.

[top of page]

#6 Use Bootcfg from XP/2K Recovery Console to Rebuild Boot.ini

This, and the next method, is commonly used when the user can't boot Windows XP, 2K, NT.

If the Recovery Console was installed, you should select that option in the Startup Menu and can start here at 5. to rebuild Boot.ini. Otherwise start here at 1.

  1. Bootup with the Windows XP/2K/NT CD inserted (or with the floppy Setup disk set)
  2. Select the Repair option (select R at the Welcome Screen in XP/2K)
  3. Press 1 (presuming you have just one XP installation)
  4. Press Enter for your Admininstration password (it's blank by default)
     
  5. Now rebuild Boot.ini by typing in
    bootcfg /rebuild
    - select the Windows XP, 2K, NT in Add installation to boot list
    - answer Windows XP Home (or similar) for Enter Load Identifier
    - answer /fastdetect for Enter OS Load Options
    Optionally, you can then type in
    type c:\boot.ini
    to view (but not edit) the contents of the new Boot.ini.
  6. Type exit when finished. Remove the CD.

When Windows boots you can use Method #1 in comfort if the new Boot.ini needs further editing.

Note:
If your current Boot.ini contains an incorrect entry that's causing a Windows boot failure, then you should use a Win9x boot disk (read below). Even deleting that faulty Boot.ini may not stop Bootcfg re-entering the faulty line into the new Boot.ini.
Note:
Bootcfg recognizes only XP, 2K, or NT installations. However it usually adds the Win9x line to the rebuilt Boot.ini if that line previously existed. Example of a Win9x line in Boot.ini: C:\=" Windows 9x/Me "

Read Bootcfg for a description of Bootcfg uses/commands.

[top of page]

#7 Use Win9x Boot Disk to Edit Boot.ini

This method is widely used when the user can't boot Windows XP, 2K, NT. This works ONLY if the Active partition does NOT use the NTFS file system. Skip to the next sections (#8 or #9) if Boot.ini in on an NTFS partition.

  1. Bootup with a Windows 9x boot disk if C: not using NTFS.
    If C: uses FAT32, you'll need a boot disk made by Win95b or later.
  2. Type in the following (press Enter key after each line):
    ATTRIB -R -S -H C:\BOOT.INI
    COPY C:\BOOT.INI C:\BOOT.INN
    EDIT C:\BOOT.INI
  3. Use the Arrow keys to locate the line you want to edit or delete. Use the Del, or BackSpace, key. Do this slowly and carefully! Do NOT delete any part of any other line.
  4. When finished, press ALT-F-S to Save Boot.ini. Then ALT-F-X to exit Edit.
  5. Now type
    ATTRIB +R +S +H C:\BOOT.INI
    and reboot.

[top of page]

#8: Use THPC's Rescue Boot Disk if Boot.ini is on an NTFS partition

If you have made THPC's Rescue Boot Disk you can use it to boot to an NTFS Windows (or its Safe Mode) and edit Boot.ini from there provided the boot problem is with the Boot Sector or with any boot files. Obviously this will not work if the problem is with that Windows' file(s) but you can still edit Boot.ini if the problem is with a different Windows' file(s).

Alternatively you can copy Boot.ini and other boot files from the Rescue Boot Disk to the root of the System partition.

Use the next option is this is inappropriate.



[top of page]

#9 Use EditBINI if Boot.ini is on an NTFS partition

When Windows will not boot, option #6 above is the easiest option (#6 Use XP/2K Recovery Console to Rebuild Boot.ini). If that's not satisfactory then you must edit Boot.ini from true MS-DOS.

However if Boot.ini is on an NTFS partition, you cannot access the Boot.ini from a MS-DOS boot disk.

TeraByte's DOS-based utility, EditBINI, will overcome this restriction. This freeware utility is a wonderful asset for users who wish to edit boot.ini on an NTFS partition - when they cannot boot an NTFS Windows and Bootcfg proves unsatisfactory.

Download editbini.zip and extract its editbini.exe file (72 KB) to your Win9x/Me boot disk or to a partition accessable from true MS-DOS (one not using NTFS). Now boot from the Win9x boot disk and run Editbini.exe. This will allow you to edit Boot.ini on the NTFS partition even through you are in true DOS. Use the Arrow keys to navigate. Use F1 for help, CTRL-S to Save the file, and F10 to exit.

• EditBINI is a DOS-based utility that lets you edit Boot.ini specifically on an NTFS partition.
• EditBINI does not appear to have an option to backup Boot.ini before changing it!
• EditBINI will run under Win9x (FAT32), but the edited file cannot be saved!
• EditBINI will not run correctly under Windows XP/2K/NT.

Full Procedure:

  1. Download editbini.zip and unzip it to your Win9x/Me boot disk (or to a FAT or FAT32 partition).
  2. Boot with the Win9x boot disk inserted.
  3. Run editbini.exe.
  4. Select the hard disk.
  5. Select the NTFS partition containing Boot.ini.
  6. Press F1 for help
    (press [Enter] to exit this, or any information, window).
  7. Edit the text according to your need.
  8. Press CTRL-S to Save the file.
  9. Press F10 when finished.
  10. Choose Yes if asked to Save the file.

Download editbini.zip (freeware, 74 KB) from THPC, or visit the TeraByte's utilities page.

[top of page]

Sample Boot.ini

This is a sample of a default Boot.ini file from a Windows XP computer.

[boot loader]
timeout=30
default=multi(0)disk(0)rdisk(0)partition(1)\WINDOWS
[operating systems]
multi(0)disk(0)rdisk(0)partition(1)\WINDOWS="Microsoft Windows XP" /fastdetect

This is a sample of the above Boot.ini file after adding another partition running Windows 2K.

[boot loader]
timeout=30
default=multi(0)disk(0)rdisk(0)partition(1)\WINDOWS
[operating systems]
multi(0)disk(0)rdisk(0)partition(1)\WINDOWS="Windows XP" /fastdetect
multi(0)disk(0)rdisk(0)partition(2)\WINNT="Windows 2000" /fastdetect

[top of page]

Please remember that you alone are responsible for the consequences of any changes you make to your computer hardware or software.

Copyright © LarryM 1998-2015 thpc@mail.com