Customize Windows XP Multiboot Startup Options

Edit or create a startup menu that lets you choose which operating system to boot into in multiboot systems, or create a menu that lets you choose different startup options for your single operating system if you have only XP installed.

If you’ve installed another operating system (in addition to XP) on your system, your PC starts up with a multiboot menu, which allows you to choose the operating system you want to run. The menu stays live for 30 seconds, and a screen countdown tells you how long you have to make a choice from the menu. After the 30 seconds elapse, it boots into your default operating system, which is generally the last operating system you installed.

You can customize that multiboot menu and how your PC starts by editing the boot.ini file, a hidden system file, to control a variety of startup options, including how long to display the menu, which operating system should be the default, whether to use the XP splash screen when XP starts, and similar features. And as you’ll see later in this hack, you can also use the file to create a startup menu that will allow you to choose from different versions of your operating system—for example, one that you’ll use for tracking down startup problems, and another for starting in Safe Mode.

The boot.ini file is a plain-text file found in your root C:\ folder. You might not be able to see it because it’s a system file, and if you can see it, you might not be able to edit it because it’s a read-only file. To make it visible, launch Windows Explorer, choose Viewrightwards double arrow Toolsrightwards double arrow Folder Optionsrightwards double arrow View, and select the Show Hidden Files and Folders radio button. To make it a file you can edit, right-click it in Windows Explorer, choose Properties, uncheck the Read-Only box, and click OK. For a quicker way, right-click My Computer, choose Advanced-rightwards double arrow Startup and Recovery Settings, and then click Edit to edit the boot.ini file. That way, you don’t need to remember to set the permissions back the way you found them.

Editing Files

To edit the file, open it with a text editor such as Notepad. Following is a typical boot.ini file for a PC that has two operating systems installed on it—Windows XP Home Edition and Windows 2000 Professional:

[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 Home
Edition" /fastdetect
multi(0)disk(0)rdisk(0)partition(2)\WINNT="Windows 2000 Professional" /fastdetect

As you can see, there are two sections in the file: [boot loader] and [operating systems]. To customize your menu and startup options, edit the entries in each section. Before editing boot.ini, make a copy of it and save it under a different name (such as boot.ini.old) so that you can revert to that if you cause problems when you edit the file.

Following are details about how to edit the entries in each section:

[boot loader]

This section controls how the boot process works; it specifies the default operating system and how long a user has to make a selection from a boot menu, if a boot menu has been enabled. The timeout value specifies, in seconds, how long to display the menu and wait for a selection before loading the default operating system. If you want a delay of 15 seconds, for example, enter 15 for the value. Use a value of 0 if you want the default operating system to boot immediately. If you want the menu to be displayed indefinitely and stay onscreen until a selection is made, use a value of -1. The default value specifies which entry in the [operating systems] section is the default operating system. (The default value is used even if there is only one operating system in the [operating systems] section.) To change the default operating system, edit the setting: in the preceding example, to default=multi(0)disk(0)rdisk(0)partition(2)\WINNT.

So, in this example, if you change the menu settings so that the screen appears for ten seconds before loading the default operating system, and the default operating system is Windows 2000 Professional, the section reads:

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

[operating systems]

This section specifies which operating systems are present on the computer, and detailed options for each one. XP uses the Advanced RISC Computing (ARC) path to specify the location of the boot partition. In the preceding example, the ARC path is:

multi(0)disk(0)rdisk(0)partition(1)\WINDOWS

The first parameter, which identifies the disk controller, should be 0. The second parameter, the disk parameter, should also be 0. The rdisk parameter specifies the disk number on the controller that has the boot partition. The numbers start at 0. So, if you have two or more hard disks installed and the second hard disk has the boot partition, the setting is rdisk(1). The partition parameter identifies the partition number of the boot partition. Partitions start with the number 1. The final section, which in the example is \WINDOWS, specifies the path to the folder where the operating system is installed.

To the right of the ARC path in the example is =”Microsoft Windows XP Home Edition/fastdetect. The words within quotes are what will appear on the boot menu next to the entry. To customize the text on the menu, you can change these words to whatever you wish—for example, “My Favorite Operating System.” The /fastdetect switch disables the detection of serial and parallel devices, which allows for faster booting. The detection of these devices isn’t normally required in XP, because the functions are performed by plug-and-play drivers, so it’s generally a good idea to use the /fastdetect switch. The /fastdetect switch is only one of many switches that you can use in the boot.ini file to customize how the operating system loads. Table 1-2 lists others you can use (see www.microsoft.com/technet/sysinternals/information/bootini.mspx for more details).

Table 1-3. Switches for boot.ini
SWITCH WHAT IT DOES
/3GB On 32-bit systems, increases the size of the user process address space to 3GB and reduces the size of the system address space to 1GB.
/BASEVIDEO Starts Windows using the standard VGA driver. It’s most useful if you can’t boot normally because of a video driver problem.
/BAUDRATE=RATE Specifies the baud rate for remote kernel debugging and enables kernel-mode debugging.
/BOOTLOG Logs information about the boot process to the ntbtlog.txt file in the C:\Windows folder.
/BOOTLOGO Enables an installable splash screen (C:\Windows\Boot.bmp).
/BREAK Used with kernel debugging. Sets a breakpoint at HAL initialization.
/BURNMEMORY=N Specifies the amount of memory (in megabytes) by which to reduce the amount of memory.
/CHANNEL=N Used with /DEBUGPORT=1394. Specifies which IEEE1394 (also known as FireWire or i.Link) channel to use for kernel debugging communications.
/CLKLVL Configures HAL to use a level-sensitive rather than edge-sensitive clock for hardware interrupts.
/CMDCONS Boots the recovery console.
/CRASHDEBUG Loads the debugger at boot, but the debugger remains inactive unless a crash occurs.
/DEBUG Loads the debugger at boot and runs it.
/DEBUGPORT=[PORT] Specifies the port for kernel-mode debugging, and enables it. You can specify a COM port or 1394 for IEEE1394.
/EXECUTE Disables no-execute protection. (See /NOEXECUTE.)
/FASTDETECT Disables the detection of serial and parallel devices.
/INTAFFINITY Configures HAL to set its interrupt affinity to send interrupts only to the highest-numbered processor.
/KERNEL=FILENAME

/HAL=FILENAME

Allows you to override the filename for the HAL or kernel image.
/LASTKNOWNGOOD Equivalent to selecting the LastKnownGood boot option.
MAXMEM=N Specifies the maximum amount of RAM that Windows can use.
/MAXPROCSPERCLUSTER=N Forces cluster-mode APIC addressing, except on systems with an external 82489DX APIC.
/MININT Instructs the Windows Preinstallation Environment to load the SYSTEM registry hive as volatile (changes to hive are not made permanent).
/NODEBUG Stops the debugger from loading.
/NOEXECUTE

/NOEXECUTE=[OPTIN|OPTOUT|ALWAYSON|ALWAYSOFF]

Configures no-execute protection on 32-bit processors that support it. You can specify this option alone (which turns it on) or with an option:

OPTIN: Enables protection on core system images and images that have been enabled in the Data Execution Prevention dialog.

OPTOUT: Enables protection on all images except those that have been enabled in the Data Execution Prevention dialog.

ALWAYSON: Enables protection on all images.

ALWAYSOFF: Disables protection.

/NOGUIBOOT Does not allow the splash screen to load during boot.
/NOLOWMEM Prevents Windows from initializing the VGA driver during the boot process.
/NOPAE Prevents Windows from using the Physical Address Extension (PAE) version of the kernel.
/NOSERIALMICE=[COMx|COMx,COMy,...]

/NOSERIALMICE

Disables the serial mouse on the specified (or all) ports.
/NUMPROC Specifies the maximum number of processors to enable.
/ONECPU Forces Windows to use only one CPU.
/PAE Forces Windows to use the Physical Address Extension (PAE) version of the kernel.
/PCILOCK Prevents Windows from dynamically assigning IO and IRQ resources, leaving such choices up to the BIOS.
/RDPATH=PATH Specifies the path to a system disk image (may be on a network drive), which the system will boot from. You can use /RDIMAGEOFFSET=N to specify the offset of the system image.
/REDIRECT Tells Windows to send boot information to the serial port and accept system management commands through that port.
/SAFEBOOT:switch Forces Windows to boot into the safe mode specified by the switch parameter, which can be minimal, network, dsrepair, or minimal(alternateshell). In minimal safe mode, only the minimum set of drivers necessary to start XP are loaded. In network safe mode, networking drivers are loaded in addition to the minimum set of drivers. In dsrepair safe mode, Windows restores Active Directory from a backup. In minimal(alternateshell) the minimum set of drivers are loaded and XP boots into the command prompt.
SCSIORDINAL:n Specifies the SCSI ID of the controller.
/SDIBOOT=PATH Specifies the RAM disk image in a System Disk Image file.
/SOS Displays the name of each driver as it loads and gives descriptions of what is occurring during the boot process. It also offers other information, including the XP build number, the service pack number, the number of processors on the system, and the amount of installed memory.
/TIMERES=N Sets the resolution of the system timer in hundreds of nanoseconds.
/USERVA=N Specifies the amount (in MB) of the address space available to applications.
/WIN95 Boots the Consumer Windows boot sector in Bootsect.dos.
/WIN95DOS Boots the MS-DOS boot sector in Bootsect.dos.
/YEAR=N Specifies the year. Handy for Y2K testing, and maybe even Y2K38 testing!

When you’ve finished editing the boot.ini file, save it. The next time you start your computer, its settings will go into effect.

In this example, if we want the menu to appear for 45 seconds, the default operating system to be Windows 2000, and the XP splash screen to be turned off when we choose to load XP, the boot.ini file should look like this:

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

Create a Startup Menu Even If You Have Only One Operating System

Even if you have only one operating system, you can create a boot menu that will let you choose to load your operating system with different parameters. For example, for menu choices, you might have your normal operating system, a mode that lets you trace any startup problems, and Safe Mode. To give yourself the option of operating systems with different parameters, create separate entries for each new operating system choice. For example, for the version of the operating system that traces potential startup problems, you could create this entry:

multi(0)disk(0)rdisk(0)partition(1)\WINDOWS="Trace Problems XP Home"
/fastdetect /bootlog /sos

This entry creates a startup log and displays information about the drivers and other operating system information as it loads.

For the version of the operating system that loads in Safe Mode but still allows networking, you could create this entry:

multi(0)disk(0)rdisk(0)partition(1)\WINDOWS="Safe Start XP Home" /fastdetect
/safeboot:network

Figure 1-21. The System Configuration Utility

The boot.ini file would look like this, assuming that you want the menu to display for 30 seconds and you want normal XP startup to be the default:

[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 Home Edition"
/fastdetect
multi(0)disk(0)rdisk(0)partition(1)\WINDOWS="Trace Problems XP Home"
/fastdetect /bootlog /sos
multi(0)disk(0)rdisk(0)partition(1)\WINDOWS="Safe Start XP Home" /fastdetect
/safeboot:network
Tags: , , , , ,