Windows Boot OptionsAs discussed in the previous sections, as Windows XP, 2000, or NT begins its startup process, it runs program ntldr , which examines the root folder of the boot drive for a file named boot.ini . This file can contain entries for one or more different installations of Windows, and different versions of Windows and even different operating systems such as MS-DOS or Linux. In addition, a special set of disaster-recovery boot options is available called the Windows Advanced Options menu; this menu is your first recourse if some driver or other disaster prevents Windows from starting, and it's discussed later in this chapter. We'll discuss the various startup options in this section. Note If the boot.ini file is missing, ntldr will load the first Windows installation it can find, and if you use SCSI disks it may not be able to find any. If you see a message that boot.ini is missing, you should try to restore it from a backup. The Recovery Console can also help you re-create boot.ini , as discussed later in the chapter. Boot.ini and the Boot MenuWhen ntldr is starting Windows, it examines the root folder of the boot drive for a file named boot.ini . The file contains a list of one or more operating system choices. If there is just one choice, ntldr proceeds to load the operating system. When you have multiple operating system choices, or if you install the Recovery Console on your hard disk, you will run into the boot menu, an example of which appears in Figure 4.2. This section discusses the boot menu and boot.ini . Figure 4.2. The Windows Boot menu lets you select from various operating systems and/or Windows installations.Just to get us started, a boot.ini file for a system with several boot choices might look like this: [View full width]
The [boot loader] section contains entries that control the behavior of the boot menu. The [operating systems] section contains entries for each bootable operating system, one line per entry. (The format of this book isn't wide enough to permit the lines to be printed as they appear in boot.ini ; the symbol indicates that a line had to be split up to be printed. In the real boot.ini file, the text from /fastdetect on appears right after Professional "). Boot Loader OptionsThe Boot Loader section can contain any of the entries listed in Table 4.3. Table 4.3. Boot.ini Boot Loader Section Options
On Windows XP, you can change these settings most conveniently from the System Properties dialog, as discussed shortly. Operating System OptionsThe [operating systems] section of boot.ini lists operating system boot choices, one per line, each with the format location =" description" options The description text on the right-hand side of the equal sign is placed between quotation marks. This is the text displayed as the boot menu choice when Windows starts, and it should be a descriptive name of the operating system and any special startup options that are attached. The options are optional arguments placed after the description text, separated by single spaces, which can be used to control how the operating system starts. Options can be used, for example, to turn on startup logging, enable Safe mode, or let a software developer debug a device driver. The available options for Windows XP are listed in Table 4.4. Table 4.4. Windows XP (32-bit) boot.ini Options
The location part of each [operating systems] line is a path to the Windows folder, or a specification for the boot sector of an alternative operating system. For MS-DOS, Windows 95, 98, and Me, and the Recovery Console, the location is specified using a standard drive :\ path \ filename syntax specifying the name of a file that contains a copy of the boot loader originally stored in the first block of the boot partition by the alternative operating system. These original boot loaders are saved in a file by Windows Setup when it replaces an older operating system during installation. (For more information on performing upgrade installations of Windows XP, see Chapter 3, "Upgrading Windows.") For Windows XP, 2000, and NT entries on Intel and Intel-compatible processors, the location path uses the unusual Advanced RISC Computing (ARC) path syntax rather than the expected drive :\ path format used elsewhere in Windows. This is the tricky part. Tip To see the correct ARC path names for all of your hard drives , run the Recovery Console as described in Chapter 12, and type the map command. In most cases, your Windows folder is c:\windows on an IDE or SATA disk drive. In this case, the ARC path is multi(0)disk(0)rdisk(0)partition(1)\windows But, ARC paths can take one of three forms. For drives that can be accessed through standard BIOS INT 13 calls, which includes IDE disks, SATA disks, and SCSI disks on controllers with modern BIOS extensions, thus the majority of drives on home/office computers, the format is multi( c )disk(0)rdisk( n )partition( p )\ foldername
For SCSI disks that the BIOS cannot access using INT 13 calls, and that require a separate driver ( ntbootdd.sys , installed by Windows Setup), the syntax is scsi( c )disk( n )rdisk( u )partition( p )\ foldername
A third syntax is used when either of the following conditions is encountered :
(In other words, the Windows partition is too large or too far into the disk to be reachable by nonextended BIOS functions.) In this case, Windows setup will have installed a driver named ntbootdd.sys in the boot drive's root folder, and the following syntax will be used in boot.ini : signature( s )disk( n )rdisk(0)partition( p )\ foldername
During startup, ntldr must scan the n th disk on each controller until it finds the disk with the indicated signature value. For more information about basic ARC syntax, see support.microsoft.com/kb/102873. For more information about the signature() syntax, see support.microsoft.com/kb/227704. Selecting a Default Operating SystemYou could edit the boot.ini file manually to select the default operating system choice displayed on the boot menu, and the time that the boot loader waits if you make no selection, but there's an easier way. To set these options using a dialog box, follow these steps:
Editing boot.ini ManuallyIf you want to delete boot menu choices or add options to one of the selections, on Windows XP you can use the bootcfg command line program (this is distinct from the bootcfg Recovery Console command). Its use is described in Microsoft Knowledge Base article number 289022, at support.microsoft.com/kb/289022. However, it's just about as easy to edit boot.ini directly. On Windows XP, open the Startup and Recovery dialog as described in steps 1 through 4 in the previous section. Then, click the Edit button. This will temporarily remove protections from boot.ini and will let you edit the file with Notepad. It would be prudent to save a copy of the contents of boot.ini before you make any changes. When you have made your changes, save the file and exit Notepad. The file protections will put be back in place automatically. On Windows 2000 and NT, you must edit boot.ini from the command prompt. You must be logged on as a Computer Administrator. Open a Command Prompt window and type the following commands: c: cd \ attrib -s -h -r boot.ini copy boot.ini boot.ini.bak notepad boot.ini attrib +s +h +r boot.ini This procedure leaves a backup copy of boot.ini named boot.ini.bak . If you have to undo your changes, simply repeat the steps but reverse the copy command: copy boot.ini.bak boot.ini If you can't boot Windows at all, you can use the Recovery Console to repair boot.ini using the bootcfg /rebuild command, or you can create a boot.ini file on another computer and transfer it to your computer on a floppy disk. Windows Advanced Options Menu (Safe Mode)If you experience problems after installing a new driver or hardware, or if you are plagued by virus or spyware software that can't be deleted while Windows is running, you can often boot Windows in a special Safe mode that uses a very limited set of known-good device drivers, and very few additional services. In many cases Windows can be started in a degraded but functional mode in which you can then perform repairs . Windows also has boot options that keep a record of all drivers loaded to help you find which one is causing a problem. The option to boot Windows this way can be set up in special boot.ini entries as described in the previous section, but that would require advance planning, and it's not necessary. You can access the special Windows Advanced Options menu by pressing F8 while Windows starts up. There are two ways to get to it this menu:
The Windows Advanced Options menu will appear as shown in Figure 4.4. Figure 4.4. Press F8 during startup to display the Windows Advanced Options menu, which includes Safe mode.The most common choices and their uses are as follows :
All the selections in the Windows Advanced Options menu are described in the following sections. Safe ModeSafe mode boots Windows with a limited set of display and disk drivers, and minimal services. The display driver used is for the original IBM PC VGA color adapter, which all current adapters can emulate, set to 640x480 resolution, which all current monitors can display. Safe mode will often let you start Windows when viruses or adware keep it from starting, or prevent you from loading antivirus or antispyware software. It also usually works when you have a problematic driver or service that is crashing Windows. Start in Safe mode and use Driver Rollback or System Restore to repair the problem. Selecting Safe mode is the same as adding options /safeboot:minimal /sos /bootlog /noguiboot to whatever standard options are specified in boot.ini , such as /fastdetect . Safe Mode with NetworkingLike Safe mode, Safe mode with Networking uses a small set of very basic drivers and minimal services. In addition, your network adapter driver is loaded and Windows networking services are started. Use this mode when you need to perform a Safe mode repair but you need files that are stored on a network server. Selecting this mode is the same as adding options safeboot:network /sos /bootlog /noguiboot to your boot.ini entry. Safe Mode with Command PromptSafe mode with Command Prompt is the same as Safe mode, except that when you have logged on, instead of running explorer.exe to display the standard Desktop, a Command Prompt window is opened. This can help circumvent problems that prevent Explorer from starting correctly. Selecting this mode is the same as adding /safeboot:minimal (alternateshell) /sos /bootlog /noguiboot to your boot.ini enTRy. Enable Boot LoggingThis option adds the /bootlog option to your standard boot selection. This creates file \windows\ntbtlog.txt (or, rather, file ntbtlog.txt in whatever folder your copy of Windows is installed in), and this log file lists every driver loaded during startup. See the discussion of boot logging earlier in this section. Enable VGA ModeThe Enable VGA Mode selection performs a standard startup, but your existing video driver is reset to 640x480 resolution and a 60Hz refresh rate. This should fix things if you've selected an inappropriate video mode. It will not help if you have a bad or incorrect video driver installed. In that case, use Safe mode. Enable VGA Mode adds the /basevideo option to the default boot.ini options. Last Known Good ConfigurationLast Known Good Configuration starts Windows using the Last Known Good section in the Registry. This is a copy of the service and device driver selections and settings that were in effect the last time Windows was able to start up normally. These settings are recorded when Windows starts, and are marked "Last Known Good" when Windows is then shut down normally. Directory Services Restore ModeThis optione is used only on a Windows Server Domain controller. It initiates a repair procedure. Debugging ModeThe Debugging Mode option is used by device driver software developers to let a second computer monitor Windows kernel activity through a serial or IEEE-1394 port. Selecting this option is the same as adding /debug to the selected boot.ini entry. You should have added the /channel or /debugport and /baudrate options to the boot.ini entry before using this selection. Disable Automatic Restart on System FailureThis option is available on Windows XP Service Pack 2 and later. It disables the Windows automatic restart-after-crash feature so that you can then restart Windows and see what the blue screen says when Windows crashes. It's a very welcome addition. Start Windows NormallyThis selection starts your default or selected operating system with no extra recovery options. RebootThis selection restarts the computer. Return to OS Choices MenuThis selection returns to the boot menu, if it was displayed prior to your pressing F8. Installing a Multibooting SystemWindows makes it reasonably easy to choose between several different operating systems or versions of Windows when you start up your computer. This process is called multibooting . There's not room in this book to go into multiboot setup in great detail. I will give you this bit of advice, however: to create a system that lets you choose between different Windows versions and older Windows versions, use the following guidelines:
For more detailed information on setting up multibooting Windows installations, see Special Edition Using Windows XP Professional , published by Que. Also, view Microsoft Knowledge Base article number 306559 at support.microsoft.com/kb/306559. |