Windows Boot Options


Windows Boot Options

As 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 Menu

When 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]
 
[View full width]
[boot loader] timeout=5 default=multi(0)disk(0)rdisk(1)partition(2)\WINDOWS [operating systems] multi(0)disk(0)rdisk(1)partition(1)\WINDOWS="Microsoft Windows XP Professional" /fastdetect /NoExecute=OptIn multi(0)disk(0)rdisk(1)partition(2)\WINDOWS="Microsoft Windows 2000 Professional" /fastdetect C:\BOOTSECT.DOS="MS-DOS 6.22" C:\CMDCONS\BOOTSECT.DAT="Microsoft Windows Recovery Console" /cmdcons

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 Options

The Boot Loader section can contain any of the entries listed in Table 4.3.

Table 4.3. Boot.ini Boot Loader Section Options

Entry

Description

timeout= n

Sets the time that ntldr waits for you to press a key while the boot menu is displayed to n seconds. If you don't press a key, the default operating system is booted . If you press any key, the countdown stops and ntldr waits for you to highlight an entry and press Enter.

 

If timeout is set to 0, ntldr boots the default operating system without displaying the boot menu. If you set timeout to -1, ntldr always waits until you make a selection.

default= location

Sets the default operating system. The location text must match one of the location paths in the [operating systems] section. The location paths are the parts that appear to the left of the equal sign.


On Windows XP, you can change these settings most conveniently from the System Properties dialog, as discussed shortly.

Operating System Options

The [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

Option

Description

/basevideo

Disables your selected video adapter, and instructs Windows to use a plain VGA adapter set to 640x480 resolution.

/bootlog

Creates a file named ntbtlog.txt in the root folder of the boot drive, listing all device drivers loaded, to help diagnose driver problems. The file may not be created if the kernel crashes before it can load the file system.

/burnmemory: n

Decreases the amount of memory available to Windows by n MB. Can be used to test Windows or application performance in impoverished circumstances. See also the \maxmem option.

/fastdetect

Prevents Windows from scanning your COM ports for a serial mouse. This option can speed up the boot process if you use a USB or PS2 mouse.

/fastdetect: n

Instructs Windows that you have a serial mouse connected to COM port number n . This option can speed up the boot process if you use a serial port mouse.

/maxmem=n

Specifies the maximum amount of RAM that Windows is allowed to use, where n is the number of MB. (See /burnmemory as well.)

/noguiboot

Suppresses the graphical startup and progress bar that appears while Windows is booting. This is said to speed the boot process somewhat, but it results in a troublingly empty black screen during startup, unless you also specify /SOS .

/numproc=n

Limits the number of processors that Windows is to use to n; effective only on multiprocessor (or multicore) systems.

/safeboot:minimal

Starts Windows in Safe mode, with a minimal set of known "safe" drivers and services. See the later section on the Windows Advanced Options menu for more information about Safe mode.

/safeboot:minimal (alternateshell)

Starts Windows in Safe mode with a Command Prompt window instead of the usual desktop.

/safeboot:network

Starts Windows in Safe mode with networking support.

/safeboot:dsrepair

On a Windows domain controller server, starts Directory Services repair mode.

/SOS

Instructs ntldr to display the name of each driver it loads; this can help you identify which driver is crashing and preventing Windows from booting. Use with /basevideo for increased reliability.

 

Less Commonly Used Options

/HAL= filename.dll

Specifies a specific HAL module to load, rather than the one selected by Windows Setup. The file must be stored in \windows\system32 . Specifying an alternative HAL may not work; see Microsoft Knowledge base article 309283. See also the /kernel option. It also may not be necessary: Windows XP automatically chooses between uni- and multiprocessor HALs and kernels .

/kernel= filename

Specifies the kernel version to load, rather than the one specified by Windows Setup. The file must be stored in the \windows\system32 folder. This option is used primarily by device developers to select a "checked" debugging kernel.

/debug

Enables remote debugging of the Windows kernel or device drivers through a serial port or IEEE-1394 (Firewire) interface connected to a second computer ( remote debugging ). The debugger is activated immediately upon startup.

/crashdebug

Like /debug , but the debugger is not activated until a STOP (blue screen) occurs.

/debugport= n

Used with /debug or /crashdebug , specifies the COM port number to be used for debug communication.

/baudrate= n

Used with /debugport , sets the baud rate of the COM port used for kernel debugging to n , usually 9600 or greater.

/channel= n

Used with /debug , enables kernel debugging over an IEEE-1394 (Firewire) channel.

/nodebug

Disables kernel debugging; needed only when the installed Windows kernel has debugging enabled by default.

/redirect

The /redirect option applies to Windows Server 2003 only and is used to configure boot monitoring over a serial port for servers with no display adapters.

/3GB

Instructs the kernel to allow each application 3GB of virtual address space, with the kernel and kernel services mapped into 1GB, rather than the usual 2/2 split. Used primarily in Exchange Server installations.

/userva= n

Used in conjunction with /3GB ; sets the amount of application virtual memory space to n MB rather than the default value of 3072 set by /3GB . Applies to Windows Server 2003 only.

/PAE

Instructs ntldr to load a Windows kernel that supports Physical Address Extension (an increased memory architecture) on Server computers. This option is ignored in Safe mode.

/pcilock

Prevents Windows from managing interrupt addresses, IO ports, and memory configuration for PCI devices, leaving the original BIOS settings in place. Using this option may make Windows fail to boot.


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  

where:

c is the disk controller number, counted from 0 up.

 

n identifies the physical disk drive attached to this controller. For IDE drives this is 0 (master) or 1 (slave); for SATA drives this is a number from 0 to 3; and for SCSI drives this number can be between 0 and 15.

 

p indicates the partition number on this physical drive, counted from 1 up.

 

foldername is the name of the %systemroot% folder on this partition, usually windows or winnt .


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  

where:

c is the disk controller number, counted from 0 up.

 

n specifies the physical disk drive attached to this controller. For SCSI drives this number can be between 0 and 15.

 

u indicates the SCSI logical unit number (LUN) of the disk that contains the boot partition, typically 0.

 

p indicates the desired partition number, counted from 1 up.

 

foldername is the name of the %systemroot% folder on this partition, usually windows or winnt .


A third syntax is used when either of the following conditions is encountered :

  • Windows is installed on a partition greater than 7.8GB in size or the ending disk cylinder number for the partition is greater than 1024, and, the system BIOS does not support extended INT 13 calls or they are disabled.

  • The disk controller requires BIOS extensions, but they do not support extended INT 13 calls or they are disabled.

(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  

where:

s is an 8-digit hexadecimal number that matches a special identifying number written to the hard disk's Master Boot Record during Windows setup.

 

n specifies the disk's physical drive number, counted from 0 on up.

 

p indicates the partition number on the this physical drive, counted from 1 up.

 

foldername is the name of the %systemroot% folder on this partition, usually windows or winnt .


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 System

You 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:

1.
Log on as a Computer Administrator.

2.
Click Start, and right-click My Computer. Select Properties.

3.
Select the Advanced tab, and under Startup and Recovery click the Settings button.

4.
The Startup and Recovery dialog will appear, as shown in Figure 4.3.

Figure 4.3. The Startup and Recovery dialog lets you select a default operating system and edit boot.ini .


5.
Select a default operating system from the drop-down list.

6.
To speed up the Windows boot process when you're not attending to the screen, set Time To Display List of Operating Systems to a small number like 5 seconds.

7.
Alternatively to make Windows wait for you to make a selection no matter how much time passes , uncheck the box next to both of the Time to Display entries.

8.
Click OK to save the changes.

Editing boot.ini Manually

If 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:

  • If your system doesn't pause at the boot menu, you'll have to plan your attack. Start Windows, and as soon as the screen indicates that the BIOS startup is finished, start pressing F8 rapidly and repeatedly. If this doesn't work, restart the computer again (you may need to power it off and back on, if Windows won't start or if you can't shut it down), and this time start pressing F8 as soon as something appears on the screen.

  • If your system has multiple boot options, it will pause at the boot menu when Windows starts. You can press F8 while this menu is displayed. (This is a much calmer procedure, and makes another good reason to install the Recovery Console on your hard disk.)

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 :

  • If you have set your display adapter to a resolution or refresh rate that your monitor doesn't support, select VGA Mode. This uses your normal graphics adapter driver but sets the resolution to 640x480 at a 60Hz refresh rate.

  • If a virus or spyware is causing trouble and you can't delete it, or you can't install an antivirus or antispyware utility because of it, use Safe Mode.

  • If you have made a device driver configuration change and Windows no longer works, try Last Known Good Configuration before trying System Restore.

  • If you have installed a new driver and Windows no longer works, use Safe mode, and try to update, replace, or disable the driver. If this fails, use Safe mode and use System Restore to roll back your driver change. System Restore data is not saved in Safe mode, so you can't use System Restore to undo changes you've made in Safe mode).

  • If a device driver is making Windows crash but you don't know which driver is causing it, select Enable Boot Logging. Then, after Windows crashes, restart in Safe mode. Use Notepad to examine the file ntbtlog.txt in your \windows folder, which will display a list of drivers that were loaded. There will be two boots' worth of drivers listed. The first part begins with the operating system version and file ntoskrnl .exe , and ends (hopefully) with the driver that crashed Windows. The second part of the listing starts with the operating system version and ntoskrnl.exe again. This second part was added when you rebooted in Safe mode, so your troublesome driver should be the one just above the second part. (You can also examine ntbtlog.txt by booting up the Recovery Console.)

    Delete ntoskrnl.txt after viewing it; otherwise it will just continue to grow and will be difficult to interpret.

  • If your display adapter driver is crashing Windows, the previous technique won't helpthe crash will probably occur before Windows starts writing the log file. In this case select Safe Mode, which uses a "plain vanilla " VGA display driver, and either update your display driver or use System Restore to roll back a previous one.

All the selections in the Windows Advanced Options menu are described in the following sections.

Safe Mode

Safe 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 Networking

Like 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 Prompt

Safe 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 Logging

This 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 Mode

The 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 Configuration

Last 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 Mode

This optione is used only on a Windows Server Domain controller. It initiates a repair procedure.

Debugging Mode

The 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 Failure

This 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 Normally

This selection starts your default or selected operating system with no extra recovery options.

Reboot

This selection restarts the computer.

Return to OS Choices Menu

This selection returns to the boot menu, if it was displayed prior to your pressing F8.

Installing a Multibooting System

Windows 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:

  • If you want to be able to boot to MS-DOS, set up multiple disk partitions, or multiple disks. Format the first drive, or the first partition, with the FAT file system, using the MS-DOS setup floppy disk. This partition can be smalla few dozen to a few hundred megabytes should be sufficient.

    Install MS-DOS first. Then, install later versions of Windows.

  • If you want to boot Windows 95, 98, or Me, set up multiple disk partitions or multiple disks. For Windows 98 or Me, format a partition with the FAT32 file system to get more efficient disk utilization. Install these operating systems after MS-DOS and before Windows XP, 2000, or NT.

  • If you want to install multiple versions of Windows XP, 2000, or NT, install NT first, and then 2000, and then XP. Install each of these onto separate disk partitions . Don't succumb to the temptation to install them in differently named folders on the same partition, as the Program Files folders name is fixed, and you will end up with mismatched versions of system utilities.

    Install the latest Service Pack for Windows NT before installing Windows 2000, and the latest service pack for Windows 2000 before installing XP. This is necessary because each later version of Windows may upgrade your disks' NTFS version, and the service packs are necessary so that the older operating system can read the newer versions.

  • MS-DOS can't read FAT32 or NTFS partitions, and Windows 95, 98, and Me can't read NTFS partitions. Older operating systems will skip over any partitions they can't read when assigning drive letters , so the disk drive letter assigned to a given partition may vary from one operating system to another.

  • If you want to be able to boot Linux, your best bet is to install Linux last and use a Linux boot loader. Be careful to use the proper procedure to save a copy of the XP boot loader.

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.




Upgrading and Repairing Microsoft Windows
Upgrading and Repairing Microsoft Windows (2nd Edition)
ISBN: 0789736950
EAN: 2147483647
Year: 2005
Pages: 128

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net