Understanding MultiBooting
and Booting Windows from an Extended Partition

by Dan Goodell
Introduction Partitions The MBR Principles Tools Imaging Restoring Partition Table Win98 LBA Boot.ini Partition Sigs Boot Mgr Appendix
Fixing Windows 2000/XP BOOT.INI Files

If we have rearranged partitions since the Windows 2000 or XP image was made, we need to correct a variable in boot.ini that tells which partition it's supposed to boot up. I've waded through numerous suggestions elsewhere that recommend reinstalling boot files or installing some surrogate boot record or using the XP/2000 installation CD to "repair" the boot files, but it turns out boot.ini is the only file that needs fixing.

The boot.ini file is used in the Microsoft boot process to specify the operating systems the Microsoft boot loader, ntldr, should show in its boot menu. The boot.ini file contains lines similar to these:
  [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 2000 Professional" /fastdetect  
If we were using a Microsoft-style multiboot setup we would find more operating systems defined here, but we're going to use another boot manager so this boot.ini file only needs to define and boot a single operating system. That funny-looking definition is a Microsoft invention known as an ARCpath. In this example, multi(0)disk(0) refers to the computer's IDE controller, rdisk(0) means the master hard disk on the primary IDE channel, and partition(1) refers to the first partition on that hard disk. You can read more about ARCpaths at Microsoft's page on "ARCpaths and Boot.ini".

Partitions are numbered starting at "1", first all primary partitions, then all logical volumes in the extended primary partition. Important note: the numbering order follows the order of the entries in the partition table, which may or may not correspond with the physical order of the actual partitions on the disk. Blank entries in the partition table are skipped and the extended partition itself is also not numbered.

If boot.ini is in a NTFS partition, boot to DOS and use TeraByte's EditBINI to edit the boot.ini file. Even though DOS can't read NTFS partitions, EditBINI can run from DOS, reach inside the NTFS partition, find the boot.ini, and allow you to edit it very easily. Start editbini.exe and navigate to each NTFS partition and press [Enter] to edit the boot.ini file in that partition. The boot.ini example above shows it was in partition(1) when it was created--the first primary partition on the hard disk. If we've restored this image to a partition other than the first primary, we must change the partition value from partition(1) to correspond with the actual partition where this boot.ini file now resides. As we've rearranged them, our DOS partition is now partition(1). Our WinXP partition is now partition(3) and our Win2000 partition is partition(4), so fix these values in their respective boot.ini files and each will be able to boot from its own partition.

EditBINI is a cinch to use, but doesn't work on FAT32 partitions, so editing is a little more complicated if 2000/XP is in a FAT32 partition. To edit boot.ini in a FAT32 partition, first temporarily unhide the partition so it is accessible when you boot to DOS or Win9x. Carefully determine which drive letter the 2000/XP partition will be assigned by DOS/Win9x when rebooted--remember, drive letters may change depending on what partitions are visible. Reboot. Change the hidden and system file attributes of the boot.ini file so you can edit it. Make the edit, as per above, using any ordinary text editor like edit.com (DOS) or notepad.exe (Win9x).

Note: recent versions of DriveImage and Ghost may be sophisticated enough to alter the boot.ini value automatically when the image is restored. Always check the boot.ini values, but you may or may not have to manually change them.

Back
author: Dan Goodell, ©2003