Chapter 13: Fixing Windows 98 crashes
Transcription
Chapter 13: Fixing Windows 98 crashes
1974ch13.qxd 5/11/98 1:04 PM Page 540 PART IV 1974ch13.qxd 5/11/98 1:05 PM Page 541 Hardware, Peripherals, and DOS ■ Chapter 13: Fixing Windows 98 Crashes—Failure Recovery ■ Chapter 14: Installing and Supporting New Hardware ■ Chapter 15: Controlling Disks with Windows 98 ■ Chapter 16: Printing under 98 ■ Chapter 17: Running Legacy Applications under Windows 98 1974ch13.qxd 5/11/98 1:05 PM Page 542 1974ch13.qxd 5/11/98 1:05 PM Page 543 C H A PT E R T H I R T E E N Fixing Windows 98 Crashes— Failure Recovery ■ Understanding 98’s boot sequence ■ Reading BOOTLOG.TXT ■ Restoring a Registry ■ Creating a startup floppy ■ Booting to DOS ■ Using the new Windows 98 utilities ■ Creating a backup job 13 1974ch13.qxd 544 5/11/98 1:05 PM Page 544 Chapter 13 • Fixing Windows 98 Crashes—Failure Recovery T he new generation of Windows is not rock-solid, although it handles crashed applications and resources better than its predecessors did. Because you can’t just boot the computer to DOS when Windows is misbehaving anymore (well, not normally—turn to the end of the chapter for more information), this chapter will discuss how you should proceed when Windows falls down and can’t get up. We’ll talk about what’s happening during the nearly invisible boot process, what components are loaded during the process, how you can track the loading, and methods for booting your PC that allow you to circumvent Windows when it’s having a bad day. Windows 98 Boot Sequence When Windows 98 doesn’t boot, it’s easier to figure out why if you know what’s supposed to happen during the boot process. This is somewhat new territory to former DOS and Windows users, so hang on. Once you’ve got power to the system, the boot process takes place in four stages: 1. Loading the BIOS 2. Loading DOS drivers and TSRs (for backward compatibility only) 3. Initializing static VxDs in real mode 4. Starting up the protected-mode operating system and loading any remaining VxDs BIOS? VxDs? Let’s look at each of these in turn and figure out exactly what’s going on at each stage. Boot Step 1: BIOS Initialization Once your system is getting power, there has to be some functioning computing hardware to use that power. As you know, at the heart of most PCs is a single circuit board called the motherboard. The motherboard contains the CPU, some memory, and the circuitry required to transfer data from one point on the board to another—you can recognize this circuitry by its pieces, which include the 1974ch13.qxd 5/11/98 1:05 PM Page 545 Windows 98 Boot Sequence 545 bus, the direct memory access hardware, and the interrupt controller. Most of these pieces must be functioning properly for anything at all to work on the motherboard. Part of the memory included on the motherboard is in the form of ROM chips— Read Only Memory. ROM contains an important set of software called the BIOS (Basic Input/Output System). ROM and Bootstrapping Why do we need the BIOS? The answer has to do with how CPUs work. When a CPU powers up, it doesn’t know how to communicate with anything—the keyboard, display, disk drives, you name it. Before it can communicate with, say, a hard disk, a CPU needs a program in memory that tells it how to communicate with a hard disk. Virtually all PC programs must be read from disk before the PC can run them. This leads to a chicken-and-egg problem: the CPU needs diskreading instructions before it can read anything from disk, but the disk is where it loads its programs from. Where, then, does the CPU find that first disk-reading program when you turn on the computer? That’s where ROM comes in. The first disk-reading program is contained in the ROM’s BIOS, the instructions that tell the CPU how to communicate with its parts. What’s a Plug and Play BIOS? If you read the Windows 98 Resource Kit, you’ll see that Windows 98 is designed for Plug and Play BIOSes, which can automatically detect Plug and Play boards in the system and configure them to use the appropriate DMA channels, interrupts, and I/O channels. Even if your PC’s BIOS does not support Plug and Play, it will work with Windows 98—you’ll just have to configure any add-in boards by hand using the methods discussed in Chapter 14. NOTE In product literature, Microsoft rather endearingly calls BIOSes that do not support Plug and Play “legacy BIOSes.” The fact is that most current BIOSes do not support Plug and Play. 1974ch13.qxd 546 5/11/98 1:05 PM Page 546 Chapter 13 • Fixing Windows 98 Crashes—Failure Recovery How the BIOS Works Regardless of whether your PC’s BIOS supports Plug and Play, BIOS instructions are hard-wired into the ROM chips. Although RAM chips lose their contents when you shut down power on a PC, ROMs do not forget. That means that the BIOS is always available, even if some of the hardware it controls is inaccessible. A part of the BIOS that is used only when you first power up the computer is responsible for inventorying and initializing the parts of your PC: figuring out what’s there, testing the parts to make sure that they work, and preparing them to do their jobs. Now, this gets a little involved, so let’s take the process one step at a time. There are five steps to the BIOS initialization process: 1. Test some low memory 2. Scan for other BIOSes 3. Yield to other BIOSes 4. Inventory the system 5. Test the system Test Low Memory In order for the BIOS to function, it needs to work with some RAM. Therefore, the first thing that most BIOSes do is test the bottom part of the system’s RAM. If that test crashes, then most BIOSes can’t recover. Therefore, if your PC won’t boot, one troubleshooting step is to replace the lowest bank of RAM to see whether the problem is that the BIOS has no RAM to use. Unfortunately, this is not an option if the lowest bank of RAM is soldered on the motherboard (as is the case with some PCs). Scan for Other BIOSes The BIOS in your PC can’t support every possible piece of hardware—LAN boards, unusual video boards, you name it—so the important functions of inventory and initialization have to go somewhere else. That is why many add-on boards have some ROM on them; you may have noticed this when installing them. 1974ch13.qxd 5/11/98 1:05 PM Page 547 Windows 98 Boot Sequence 547 The main system BIOS allows the add-on boards to do their inventory and initialization first. But before that can happen, the main system BIOS must find those BIOSes. It does so by examining memory for BIOS signatures in the ROM area of memory, that is, the addresses between 768K and 960K. Once it finds a BIOS, it can go to the next step. Yield to Other BIOSes Once it’s found a BIOS on the add-on board, the main system BIOS passes control to the BIOS on the add-on board so that it can do whatever inventory and initialization it requires. Add-on BIOSes get to do their job before the main system BIOS. NOTE The ROM instructions on an add-in board get to run before either the system BIOS or the operating system. This means that a malfunctioning board can keep your PC from booting. For example, consider a VGA board. It has a BIOS chip on it that contains a setup routine. That setup routine announces that the board is up and ready by putting a copyright notice on the screen. When your PC is booting, the VGA message appears before the memory test occurs and before the PC checks for the drives. Again, the point here is that this VGA ROM assumed total control of the system fairly early in the boot process, as will each ROM on add-in boards. Inventory and Test the System Once all the add-in ROMs have gotten their time, and assuming that their programs ran properly and returned control to the main system BIOS, then the main system BIOS will inventory the items that it controls; these items will vary from system to system. At a minimum, the system BIOS must inventory and initialize the system memory. What does “inventory and initialize” mean here? You’ve seen at least one example of it a million times: the memory test. For another, ever notice the quick flash of the drive lights on the floppy and hard-disk drives? That’s the BIOS doing an inventory of the storage devices. 1974ch13.qxd 548 5/11/98 1:05 PM Page 548 Chapter 13 • Fixing Windows 98 Crashes—Failure Recovery CMOS Setup Information Read Before we go on to the next step, where the system actually loads CONFIG.SYS and AUTOEXEC.BAT, I should mention the final part of the BIOS initialization: the reading of the setup information. If you’ve set up new computers, or added equipment to existing computers, you’re aware that most computers built with 80286 or later CPUs store a partial inventory of the computer’s hardware in a chip called the setup chip or CMOS chip. Part of the BIOS’s inventory process, then, involves reading that setup chip. Not all of the PC hardware inventory is in that chip, only the total amount of memory, the types of disk drives on the system, the type of video adapter, and whether or not the computer is equipped with a coprocessor. The chip also contains the battery-backed clock/calendar that initializes the system clock. The CMOS is worth mentioning because this setup chip causes a lot of PC trouble calls. If the battery is dead, the setup information gets lost. The computer can’t access the hard disk if doesn’t know the hard disk’s type, and consequently it cannot boot if the setup chip is bad or has a dead battery. Now, while the lack of setup information sounds like something that’s pretty obvious, it’s often not obvious to the person who’s reporting the trouble; so keep an eye out for it when you’re on the site trying to fix the computer. NOTE People are sometimes confused when their hard disk drive type has disappeared from the CMOS but the clock still keeps good time. How can it be that some of the CMOS is damaged while some is still good? It’s actually quite simple. The clock is kept by a clock circuit, and the other information is kept by a memory. Memories need more power than clock circuits do. As a result, there may be a long period where your system’s battery has enough power for the clock but not for the memory. Boot Step 2: Loading Real-Mode Drivers Once the BIOS is loaded, your PC can “see” its hardware. Now it’s time to load the drivers that allow the PC to use the hardware. Under DOS, CONFIG.SYS contained the hardware profile. Windows 98 handles the process a little differently. 1974ch13.qxd 5/11/98 1:05 PM Page 549 Windows 98 Boot Sequence 549 When your system boots, Windows 98 polls the devices in the system to detect their hardware configuration, including the following things: • Interrupt usage • Port usage (as in COM1 or LPT2) • Computer identification • Docking-station data (if applicable and available) Windows 98 compiles the current configuration information it accumulates into a 2-byte hardware profile for each device. A hardware profile is a pointer to the configuration information for that device. NOTE In the interests of backward compatibility with 16-bit applications, Windows 98 loads the CONFIG.SYS and AUTOEXEC.BAT files at this stage of the boot process, even though it does not need these files to operate (the information in them is contained in the Registry). Boot Step 3: Initializing Static VxDs The third stage of the boot process loads Windows-specific device drivers (static VxDs) and WIN.COM, which supervises the loading process. What Are VxDs? What is a static VxD, and why would I want to initialize one? Well, a VxD is a Windows device driver. Since the early days of operating systems, it’s been clear to the designers of those systems that the part of the operating system that directly controls and manipulates the peripherals—printers, video, disk drive, and so on— should not be embedded in the operating system itself, but rather should reside in separate programs. These programs are called drivers. By separating the driver functions into separate programs, operating systems designers make it easier to add support for a new peripheral at a later date. Otherwise, every time that HP (for example) offered an improved driver for one of its printers, you’d have to buy—and install—an entirely new operating system. 1974ch13.qxd 550 5/11/98 1:05 PM Page 550 Chapter 13 • Fixing Windows 98 Crashes—Failure Recovery Windows 98 is no different from older operating systems in this respect. You cannot assemble a bare-minimum Windows configuration without including drivers for the video display, the mouse, the keyboard, and, if present, a network. Windows 98 distinguishes between real-mode drivers, which set up some systemcritical functions like the ability to boot from a SCSI drive or see upper memory, and those that Windows uses to control devices when it’s in protected mode. In order for Windows to control devices while in 386-Enhanced mode, it must have programs that allow Windows to treat those devices as virtual devices. Let’s take the display screen as an example. Virtualizing the screen means that 15 DOS programs can simultaneously modify what they think is on the display screen, while in reality none of them is getting to the actual display screen. To work this display magic, Windows has a Virtual Display Driver (or VdD) that permits applications to modify the virtual display. There’s a Virtual Mouse Driver (VmD), a Virtual Keyboard Driver (VkD), and so on. As all of these drivers have names that start with a V and end with a D, but contain something that varies in the middle; they have the generic name VxD. Windows 98 subdivides VxDs into two classes—static and dynamic: • Static VxDs are those that Windows loads on bootup—the ones that control things like the Memory Manager, the Configuration Manager, other device loaders, and so forth. In pre-Windows 95 versions of Windows, VxDs were loaded in the [386enh] section of the SYSTEM.INI file on a device= line. In Windows 98, most of the common VxDs are rolled together into one file called VMM32.VXD. You can add additional VxDs to the system by adding them to the system\vmm32 directory. Windows 98 will load any virtual device drivers found in that directory in place of those in VMM32. • Dynamic VxDs (protected-mode device drivers) are for devices like disks and network cards that must be loaded at a certain time and in a certain order. Unlike static VxDs, which are loaded by VMM32, each type of dynamic VxD is loaded by a device loader designed for that type of device. For example, the device loader for disk drivers is called IOS. You can identify dynamic VxDs in the Registry by their value names: they all begin with DevLoader. Dynamic VxDs are not loaded until the final stage of the boot process. 1974ch13.qxd 5/11/98 1:05 PM Page 551 Windows 98 Boot Sequence 551 Loading Static VxDs VMM32.VXD loads static VxDs in three steps. The process looks like this: 1. VMM32 loads all the drivers specified in the Registry, including all drivers not directly linked to any specific piece of hardware. 2. If VMM32 finds a Registry entry with the value name StaticVxD, then it loads that device driver and initializes it. By default, all of these entries are included in HKEY_LOCAL_MACHINE\System\Currentcontrolset\Services, but VMM32 would also load any others that it found elsewhere. 3. Finally, VMM32 scans the [386enh] section of SYSTEM.INI for device= lines and loads any drivers that it finds there. Entries in SYSTEM.INI take precedence over those in the Registry. WARNING Since entries in SYSTEM.INI take precedence over equivalent entries in the Registry, be cautious about editing SYSTEM.INI—if you specify a device= statement for which no device exists, you’ll cause an error. Boot Step 4: Loading the Operating System After all the static VxDs are loaded, VMM32 switches the processor to run in protected mode, rather than real mode. At this stage of the game, the Configuration Manager figures out what devices are loaded. If your PC has a Plug and Play (PnP) BIOS, the Configuration Manager loads the information from it; otherwise, it looks to see what’s already loaded and then loads the dynamic VxDs described in the previous section. If your PC has a Plug and Play BIOS and you’re using PnP cards, the Configuration Manager makes sure that none of the devices conflicts with the others. If your PC does not have Plug and Play BIOS, then Configuration Manager can’t prevent device conflicts: if you assign the same interrupt to two add-in cards, you’ll run into the device conflicts you might expect. After the Configuration Manager has established what devices are on the system, you’ll see the login dialog box. Enter your name and password, and the final components of Windows will then load in the following order: 1. KRNL386.EXE loads the underlying operating system. 2. GDI.EXE and GDI32.EXE load the graphic interface for the operating system. 1974ch13.qxd 552 5/11/98 1:05 PM Page 552 Chapter 13 • Fixing Windows 98 Crashes—Failure Recovery 3. USER.EXE and USER32.EXE load the user interface, including such items as Network Neighborhood and Explorer. 4. Resources used by Windows 98, such as fonts, are loaded. 5. The entries in WIN.INI are checked. 6. The Desktop configuration, including colors and dialog fonts, is loaded. Once you’ve logged on, the items in the Startup folder are processed, and your system is now up and running. And if it’s not? Well, that’s what the rest of this chapter is for. Dissecting BOOTLOG.TXT When you installed Windows 98, a file called BOOTLOG.TXT was created in the root directory of your boot drive. In part, it looked a bit like this: [0012371B] [0012371B] [0012371C] [0012371C] [0012371C] [00123720] [00123720] [00123720] [00123720] [00123720] [00123720] [00123720] [00123720] [00123720] [00123720] [00123720] [00123720] [00123720] [00123720] [00123720] [00123720] [00123720] [00123720] INITCOMPLETESUCCESS = VCOMM Dynamic load device C:\WINDOWS\system\serial.vxd Dynamic init device SERIAL Dynamic init success SERIAL Dynamic load success C:\WINDOWS\system\serial.vxd INITCOMPLETE = VCOND INITCOMPLETESUCCESS = VCOND INITCOMPLETE = VTDAPI INITCOMPLETESUCCESS = VTDAPI INITCOMPLETE = VFLATD INITCOMPLETESUCCESS = VFLATD INITCOMPLETE = Display1 INITCOMPLETESUCCESS = Display1 INITCOMPLETE = Display2 INITCOMPLETESUCCESS = Display2 INITCOMPLETE = DiskTSD INITCOMPLETESUCCESS = DiskTSD INITCOMPLETE = voltrack INITCOMPLETESUCCESS = voltrack INITCOMPLETE = CDRASPI INITCOMPLETESUCCESS = CDRASPI INITCOMPLETE = SCSIPWR INITCOMPLETESUCCESS = SCSIPWR 1974ch13.qxd 5/11/98 1:05 PM Page 553 Dissecting BOOTLOG.TXT [00123720] [00123720] [00123720] [00123720] [00123720] [00123720] [00123720] [00123720] [00123720] [00123720] [00123720] [00123720] 553 INITCOMPLETE = REGTAPE INITCOMPLETESUCCESS = REGTAPE INITCOMPLETE = SPAP INITCOMPLETESUCCESS = SPAP INITCOMPLETE = HSFLOP INITCOMPLETESUCCESS = HSFLOP INITCOMPLETE = ESDI_506 INITCOMPLETESUCCESS = ESDI_506 INITCOMPLETE = SERENUM INITCOMPLETESUCCESS = SERENUM INITCOMPLETE = LPTENUM INITCOMPLETESUCCESS = LPTENUM Although this output doesn’t look very useful, if you can decipher the information it gives, you can get a clue as to what’s going on with your system. When Is BOOTLOG.TXT Created? You don’t get a new BOOTLOG.TXT every time you restart your system. Instead, one is created when you first install Windows 98; unless you install something new or you’re trying to isolate a boot problem as described in the following section, you don’t need to create another one. When you do need one, you can create one by choosing the interactive system startup (by pressing Ctrl) and selecting the Create boot log option from the menu, or by typing win /b from the command line to start up Windows. Essentially, you should probably keep a printout of your BOOTLOG file around for reference (you can’t diagnose sick if you don’t know what healthy looks like), but you don’t need a new one every day. What Can You Learn from BOOTLOG.TXT? Since BOOTLOG.TXT is created only if your system boots successfully, you can use your handy printed copy of a successful boot’s BOOTLOG.TXT to narrow the field of possible suspects when your system doesn’t boot. For example, if you read a BOOTLOG.TXT created when your system booted successfully and notice that some of your VxDs did not load during that bootup, you can probably assume that those VxDs are not suddenly responsible for your system’s inability to boot properly at a later date. The system worked before without ’em; it’s not likely that it’s suddenly going to freeze up now unless something else has changed. You can also use BOOTLOG for troubleshooting if your system boots successfully but not all of its components start up. Reboot, create a new version of the file, and scan it for errors, as described in the next section. 1974ch13.qxd 554 5/11/98 1:05 PM Page 554 Chapter 13 • Fixing Windows 98 Crashes—Failure Recovery Reading BOOTLOG.TXT BOOTLOG.TXT is divided into five parts that correspond roughly to the stages of the boot process. These parts give you a record of: • Loading real-mode drivers • Loading VxDs (Windows device drivers, remember) • Initializing system-critical VxDs • Initializing devices dependent on VxDs • Successful initializations Let’s look at each of these sections in turn. Section 1: Loading Real-Mode Drivers As you’ll remember from the description of the boot process earlier in this chapter, before Windows 98 starts up it loads the DOS drivers that you used in earlier versions of Windows, so as to ensure that all of your old applications can use them. Below is a short list of some possible failures and the entries that you should look for in this short section of BOOTLOG.TXT if you encounter these failures. TIP If an entry is missing, make sure that you have the corresponding statement in your CONFIG.SYS—for example, if you don’t have access to memory beyond 640K, check for a HIMEM.SYS entry in CONFIG.SYS. • • Problem: No extended (XMS) memory in which to run Windows. • BOOTLOG Entry: loadfailed=c:\windows\himem.SYS • Implication: Only the lower 640K of memory is available to your programs—you can’t run Windows without extended memory. Problem: Incorrect DOS version. (This message appears when you try to run programs or drivers that worked before.) • BOOTLOG Entry: loadfailed=c:\windows\setver.EXE • Implication: You can’t run some DOS programs because they’re not included in the version of DOS that the system thinks you have. 1974ch13.qxd 5/11/98 1:05 PM Page 555 Dissecting BOOTLOG.TXT • • 555 Problem: Windows 98 won’t boot from a bus-mastered hard drive. • BOOTLOG Entry: loadfailed=c:\windows\dblbuff.SYS • Implication: If your boot hard-disk controller uses bus mastering, you can’t boot from C:. Problem: IFSHLP.SYS message appears briefly at command prompt; Windows won’t run, and your system locks up. • BOOTLOG Entry: loadfailed=c:\windows\ifshlp.SYS • Implication: The Installable File System Helper (which loads device drivers for Windows 98) did not load. Only the minimal file system in IO.SYS is available. You can’t run Windows in this case either, as VFAT won’t run. Section 2: Loading VxDs This section of BOOTLOG.TXT logs the results of every attempt to load VxDs. Note that these drivers are not initialized until the next section; these entries only record whether or not the drivers were even loaded into memory. If you run into problems, make sure first of all that each Loading statement has a corresponding LoadSuccess= statement, like the sample lines below: [000F0F5C] [000F0F5E] [000F0F5E] [000F0F60] [000F0F60] [000F0F61] [000F0F62] [000F0F64] [000F0F65] [000F0F66] [000F0F66] [000F0F67] [000F0F68] [000F0F68] Loading Vxd = VMM LoadSuccess = VMM Loading Vxd = C:\WINDOWS\SMARTDRV.EXE LoadSuccess = C:\WINDOWS\SMARTDRV.EXE Loading Vxd = vnetsup.vxd LoadSuccess = vnetsup.vxd Loading Vxd = ndis.vxd LoadSuccess = ndis.vxd Loading Vxd = ndis2sup.vxd LoadFailed = ndis2sup.vxd Loading Vxd = JAVASUP.VXD LoadSuccess = JAVASUP.VXD Loading Vxd = CONFIGMG LoadSuccess = CONFIGMG 1974ch13.qxd 556 5/11/98 1:05 PM Page 556 Chapter 13 • Fixing Windows 98 Crashes—Failure Recovery TIP Remember that your system can successfully boot and work fine even if you see some Fail entries in BOOTLOG.TXT, so record the boot process while it’s still working to give yourself some basis for comparison. Table 13.1 lists a couple of specific VxD load statements that you’ll want to watch for if you run into problems. T A B L E 1 3 . 1 : Loading VxDs If You Have This Problem Look for This Message in BOOTLOG Cannot access DoubleSpaced or DriveSpaced (compressed) drives loadsuccess=c:\dblspace.bin Sharing violations occur loadsuccess=vshare Please note that if VSHARE does not load successfully, you should not add it to your CONFIG.SYS. Instead, since VSHARE is one of the VxDs rolled into VMM32, simply ensure that it’s included in the section of the Registry labeled HKEY_LOCAL_ MACHINE\CurrentControlSet\Control\VMM32Files. NOTE Even if VSHARE loads successfully, sharing violations can still occur. A successful load, however, at least narrows the field. Section 3: Initializing System-Critical VxDs The next section of BOOTLOG records the system’s attempts to initialize vital VxDs, those that it requires to run at all. This longish section begins where the entries start to look like this: [000F0FA1] [000F0FA1] [000F0FA1] [000F0FA2] [000F0FA2] [000F0FA3] SYSCRITINIT = VMM SYSCRITINITSUCCESS = VMM SYSCRITINIT = MTRR SYSCRITINITSUCCESS = MTRR SYSCRITINIT = VCACHE SYSCRITINITSUCCESS = VCACHE 1974ch13.qxd 5/11/98 1:05 PM Page 557 Dissecting BOOTLOG.TXT 557 The previous section merely recorded the loading process; your system will not start up, however, if there are any Fail entries in this section. Only those VxDs that loaded successfully will be initialized. Section 4: Initializing Device VxDs The fourth section of BOOTLOG records the system’s attempt to initialize VxDs that relate to devices. Its entries look something like this: [000F0FCC] [000F0FCD] [000F0FCD] [000F0FCE] [000F0FCE] [000F0FCF] DEVICEINIT = VMM DEVICEINITSUCCESS = VMM DEVICEINIT = MTRR DEVICEINITFAILED = MTRR DEVICEINIT = VCACHE DEVICEINITSUCCESS = VCACHE Some device VxDs are composed of a bunch of smaller drivers. The entries for these devices will look something like this: [000F1016] [000F101A] [000F101C] [000F101C] [000F101D] [000F101E] [000F101F] [000F1020] [000F1021] [000F1021] [000F1022] [000F1023] [000F1024] [000F1024] [000F1025] [000F1026] [000F1027] [000F1027] [000F1028] [000F1029] [000F102A] DEVICEINIT = IOS Dynamic load device C:\WINDOWS\system\IOSUBSYS\apix.vxd Dynamic load success C:\WINDOWS\system\IOSUBSYS\apix.vxd Dynamic load device C:\WINDOWS\system\IOSUBSYS\atapchng.vxd Dynamic load success C:\WINDOWS\system\IOSUBSYS\atapchng.vxd Dynamic load device C:\WINDOWS\system\IOSUBSYS\cdfs.vxd Dynamic load success C:\WINDOWS\system\IOSUBSYS\cdfs.vxd Dynamic load device C:\WINDOWS\system\IOSUBSYS\cdtsd.vxd Dynamic load success C:\WINDOWS\system\IOSUBSYS\cdtsd.vxd Dynamic load device C:\WINDOWS\system\IOSUBSYS\cdvsd.vxd Dynamic load success C:\WINDOWS\system\IOSUBSYS\cdvsd.vxd Dynamic load device C:\WINDOWS\system\IOSUBSYS\disktsd.vxd Dynamic load success C:\WINDOWS\system\IOSUBSYS\disktsd.vxd Dynamic load device C:\WINDOWS\system\IOSUBSYS\diskvsd.vxd Dynamic load success C:\WINDOWS\system\IOSUBSYS\diskvsd.vxd Dynamic load device C:\WINDOWS\system\IOSUBSYS\necatapi.vxd Dynamic load success C:\WINDOWS\system\IOSUBSYS\necatapi.vxd Dynamic load device C:\WINDOWS\system\IOSUBSYS\scsi1hlp.vxd Dynamic load success C:\WINDOWS\system\IOSUBSYS\scsi1hlp.vxd Dynamic load device C:\WINDOWS\system\IOSUBSYS\torisan3.vxd Dynamic load success C:\WINDOWS\system\IOSUBSYS\torisan3.vxd 1974ch13.qxd 558 5/11/98 1:05 PM Page 558 Chapter 13 • Fixing Windows 98 Crashes—Failure Recovery [000F102A] [000F102B] [000F102C] [000F102D] [000F102E] [000F102F] [000F1030] [000F1033] [000F1033] [000F1035] [000F1035] [000F1036] [000F1037] [000F1038] [000F1038] Dynamic load device C:\WINDOWS\system\IOSUBSYS\voltrack.vxd Dynamic load success C:\WINDOWS\system\IOSUBSYS\voltrack.vxd Dynamic load device C:\WINDOWS\system\IOSUBSYS\drvspacx.vxd Dynamic load success C:\WINDOWS\system\IOSUBSYS\drvspacx.vxd Dynamic load device C:\WINDOWS\system\IOSUBSYS\drvwcdb.vxd Dynamic load success C:\WINDOWS\system\IOSUBSYS\drvwcdb.vxd Dynamic load device C:\WINDOWS\system\IOSUBSYS\drvwppqt.vxd Dynamic load success C:\WINDOWS\system\IOSUBSYS\drvwppqt.vxd Dynamic load device C:\WINDOWS\system\IOSUBSYS\drvwq117.vxd Dynamic load success C:\WINDOWS\system\IOSUBSYS\drvwq117.vxd Dynamic load device C:\WINDOWS\system\IOSUBSYS\rmm.pdr Dynamic load success C:\WINDOWS\system\IOSUBSYS\rmm.pdr Dynamic load device C:\WINDOWS\system\IOSUBSYS\bigmem.drv Dynamic load success C:\WINDOWS\system\IOSUBSYS\bigmem.drv DEVICEINITSUCCESS = IOS This series of entries records the initialization of the device loader, which then loads a slew of internal files. The bottom entry shown here (DEVICEINITSUCCESS = IOS) tells you that the IOS device loader successfully loaded all of its files. The Windows Startup Menu If Windows doesn’t boot properly when you start up the machine, and rebooting once doesn’t work, you can manage the boot process with the Startup menu. Using the seven main selections available, you can boot your PC in almost any way that your heart desires. (Quiet, you there in the back claiming that there are really eight selections—we’ll get to that later in this chapter.) Contents of the Startup Menu You can switch to the Startup menu while your computer is booting after the system identifies the drives. Press Ctrl when you see that message, before the logo appears. You’ll see a menu like DOS 6’s MultiConfig menu. If you installed 98 on top of MS-DOS, it will include the following six options: 1. Normal 2. Logged (\BOOTLOG.TXT) 3. Safe mode 1974ch13.qxd 5/11/98 1:05 PM Page 559 The Windows Startup Menu 4. Step-by-step confirmation 5. Command prompt only 6. Safe mode command prompt only 559 A seventh option, Previous version of MS-DOS, will be included in the Startup menu if you edit MSDOS.SYS as described later in this chapter. If the system boots up too fast for you to hit Ctrl before the logo screen comes up, you can increase the interval during which you can access this menu by adding the line BootDelay= to the [Options] section of MSDOS.SYS and providing as a value the number of seconds to wait. For example, BootDelay=5 gives you five seconds to press Ctrl and get the Startup menu before Windows starts up. When you’ve edited the file, that section should look something like this: [Options] BootMulti=1 BootGUI=1 DoubleBuffer=1 AutoScan=1 BootDelay=5 So far, so good. Now let’s find out what each Startup option does, what happens when you choose one, and why you should you prefer one over another. Normal Choose the default option, Normal, and normal is what you’ll get: the system will continue booting as though you hadn’t interrupted it with the Ctrl keystroke. This is useful if you pressed Ctrl by mistake, so you don’t have to reboot again. Logged (\BOOTLOG.TXT) As with Normal, the second option, Logged, directs the system to boot normally. In the background, however, Windows 98 will create a record of the boot process (as discussed earlier in this chapter), so you can watch for failed processes. Select this menu item if something isn’t working right in Windows and you can’t track down the problem child, but the problem isn’t serious enough to warrant a more restricted system startup. You can also use this option to review the boot process when things are going well. 1974ch13.qxd 560 5/11/98 1:05 PM Page 560 Chapter 13 • Fixing Windows 98 Crashes—Failure Recovery Safe Mode If you choose option 3, Safe Mode, from the Startup menu (or press the F5 key after you see the drive information), your PC will bypass CONFIG.SYS and AUTOEXEC.BAT; it will load the Registry and HIMEM.SYS so that Windows can start up in a vanilla configuration: VGA mode, no network drivers, and only the drivers needed to get Windows going. When Windows has started up, your display will appear as you left it (that is, the color scheme and fonts will not revert to Windows Default), except that it will appear in VGA mode and the words Safe Mode will be written in the four corners of the screen. During the startup process, 98 will alert you to the limitations of safe mode with a dialog box like the one in Figure 13.1. FIGURE 13.1: Warning notice for running Windows in safe mode Click OK, and you’ll log in to the machine. NOTE You won’t log in to your domain or workgroup, because safe mode does not support networking. Safe mode is for those times when you suspect that your system’s configuration is messed up, but perhaps not enough to entirely prevent you from using Windows. It’s good for any of the following situations: • Windows 98 hangs once you see the blue Windows 98 splash screen. 1974ch13.qxd 5/11/98 1:05 PM Page 561 The Windows Startup Menu 561 • Windows 98 stalls for an extended period at startup. • Something isn’t working properly or works differently than you expected. • The video does not display correctly (resolution, not color scheme). • Your PC suddenly slows down or begins stalling repeatedly. For example, if you accidentally changed your display to a configuration that your monitor can’t handle (difficult to do, given the way that you change video resolutions in 98, but possible if you really try) or if you’ve added a new driver to your startup files that’s playing havoc with your system, then safe mode can get you far enough to correct the problem. Remove the errant driver or restore the resolution to a configuration that works, and then restart your computer. Safe Mode’s Not Always a Good Thing One really annoying thing about working in safe mode (or safe mode with networking, for that matter) is that 98 doesn’t deal well with persistent connections that aren’t currently working. It continually polls, looking for the mapped drives, and if it doesn’t find them it alerts you to the fact—over and over. It’s highly irritating when you’re trying to fix the problem, whatever it is, and Windows insists on tugging on your hem and complaining, “Hey, I still can’t find drive G: mapped to \\ALDEBARAN\PUBLIC.” In the interests of your own sanity, make disconnecting from all persistent connections one of your first priorities when you’re working in safe mode. Open the My Computer folder and right-click any drives with a red × on them, then choose Disconnect from the pop-up menu that appears. You’ll have to remap those connections once you get the system started normally, but that’s better than living with Windows nagging you about the connections that it can’t find. You should also remember that you cannot log off a network and then back on again from regular safe mode. For that you need the second safe mode option, Safe mode with network support. 1974ch13.qxd 562 5/11/98 1:05 PM Page 562 Chapter 13 • Fixing Windows 98 Crashes—Failure Recovery Safe Mode with Network Support If you press F5 instead of Ctrl before the splash screen, you’ll get a slightly different Startup menu, which includes this option. Choosing item 4, Safe mode with network support, from this menu starts Windows 98 in safe mode, but also loads NETSTART.BAT to enable networking. This is essentially the same as running Windows in safe mode except that you have (as the logon text puts it) “limited network functionality.” It’s pretty limited. Your persistent connections won’t load at startup, and you can’t connect to the network drives from the Network Neighborhood object, either. If you log off and log back on again, you log on only to the machine, not to the network. Don’t try to run Net Start from the command line, as you’ll be told that you can’t start or stop the network from a DOS prompt. And, as I mentioned just a minute ago, you can’t choose MSDOS mode from the Shut Down menu, because programs that require DOS mode cannot run in safe mode. Essentially, you should choose Safe mode with network support from the Windows Startup menu for the same kinds of situations as Safe mode. If something goes fairly wrong with your system setup, but not so wrong that you can’t fix it if you can get into Windows, this is a good option. Step-by-Step Confirmation Choosing menu item 4 (or pressing Shift+F8 at the Startup menu) allows you to review each of the startup files and choose whether to implement them when starting up the computer. This enables you to review the following processes: • Loading the Registry • Creating BOOTLOG.TXT • Running the files in CONFIG.SYS (confirming each separate entry in the file) • Running AUTOEXEC.BAT (confirming each separate entry) Choose whether or not to activate each process by pressing Enter for Yes or Esc for No. If you activate all the options, Windows will start up normally, except that you won’t see the initial logo. 1974ch13.qxd 5/11/98 1:05 PM Page 563 The Windows Startup Menu 563 You should use this step-by-step confirmation option to start up Windows if you think that a particular driver or configuration setting might be causing your bootup problems. As this is a line-by-line process, it’s best if you use this when you already have a pretty good idea what the problem is. Command Prompt Only Choosing option 5 from the menu (or pressing Shift+F5 after the drive information) allows you to start up Windows from the command prompt, and so lets you add switches to WIN.COM. The following command can be useful when you need to isolate an incorrectly configured setting. The command syntax is as follows (the brackets, of course, merely indicate options): win [/B] [/D:[F] [M] [N] [S] [V] [X]] • /B creates a BOOTLOG.TXT file that records operating system messages generated during system startup. • /D: is used for troubleshooting when Windows 98 does not start correctly. The switches that follow may be used with /D:. • F turns off 32-bit disk access. This is equivalent to 32BitDiskAccess= FALSE in SYSTEM.INI. Briefly, 32-bit disk access increases throughput on Western Digitalcompatible disks by bypassing the BIOS. It may cause bus-mastered disks to be unstable, so try disabling it if you’re having trouble with hard disk crashes. 32-bit disk access is less problematic than it was under Windows 3.x, however. • M starts Windows in safe mode. It’s equivalent to choosing item 3 from the main Startup menu. • N enables safe mode with networking. It’s equivalent to choosing item 4 from the main Startup menu. • S specifies that Windows 98 should not use the ROM address space between F000:0000 and 1MB to break out of a virtual machine mode. This is equivalent to SystemROMBreakPoint=FALSE in SYSTEM.INI. Use this switch if Windows 98 stalls during system startup. Sometimes, third-party memory managers scramble ROM so that it makes a less predictable jumping point to move between real mode and protected mode, and this can cause Windows problems. If you have this problem and want to keep using the Memory Manager, add the line to your SYSTEM.INI. 1974ch13.qxd 564 5/11/98 1:05 PM Page 564 Chapter 13 • Fixing Windows 98 Crashes—Failure Recovery • V specifies that the ROM routine will handle interrupts from the hard disk controller. This is equivalent to VirtualHDIRQ=FALSE in SYSTEM.INI. Use this switch if Windows 98 stalls during system startup. In brief, it causes Windows to switch to real mode whenever it needs to access the disk. It’s not the best solution, but if you want to keep using that ultra-fast disk controller and its manufacturer has not created a VdD for it, you may discover that you don’t have a choice. • X excludes all of the adapter area from the range of memory that Windows 98 scans in looking for unused space. This is equivalent to EMMExclude=A000_FFFF (memory addresses 640 through 1024) in SYSTEM.INI. Using the X switch keeps Windows from using any upper memory, so, if you’re having problems with memory conflicts, think of this less as a cure than as a diagnostic tool. If this switch keeps Windows from crashing, check your documentation or start excluding ranges of memory addresses to identify the reserved memory that Windows is stomping on. Once you’ve started Windows from the command line, it will start up as usual, except that you won’t see the beginning logo and it seems to take a little longer than a normal startup. Safe Mode Command Prompt Only Select item 6 and you’ll load safe mode from the command prompt. At first, it may look as though you’ve booted to DOS. Don’t be fooled, however: type ver and the system will assure you that you’re running Windows 98. Your capabilities here are pretty much those of a DOS session, however: you can start up the network, map your drives to other machines, and so forth. Getting anything done here requires a certain level of proficiency with the command line, but if you’re able to get around the keyboard it’s a useful mode if something’s gone so badly wrong with your system that even your VGA drivers no longer work. From here, you can: • Copy the .DAT files of the Registry or other system files from a disk or a network directory, if your local ones are corrupted or missing 1974ch13.qxd 5/11/98 1:05 PM Page 565 Restoring a Registry 565 • Pull drivers from other machines to replace missing ones • Copy or move files between drives and directories just as you would from the File Manager or the My Computer object Generally speaking, anything that you can do from a DOS command prompt you can do from the Windows 98 command prompt. Previous Version of MS-DOS This is part of the BootMulti= option you’ll see listed in MSDOS.SYS. If this option is set to 0, you won’t see this listed in the menu. If it’s set to 1, you’ll see a seventh option in the Startup menu: Previous version of MS-DOS. If you installed 98 on top of MS-DOS, selecting this option will start MS-DOS instead of Windows 98. Restoring a Registry As I’ve said elsewhere, Windows 98 keeps its system information in a file called the Registry (SYSTEM.DAT and USER.DAT). If there’s no system information, then there’s no Windows. Therefore, it’s important to back up a working copy of your system’s Registry and to know how to restore it when something happens to the original. In the best case, Windows 98 will automatically restore your Registry on bootup (we’ll discuss how in just a minute), but you can also restore it by hand if necessary in one of the following ways: • Run Setup and verify system files • Run REGEDIT from the command prompt in real mode and import a saved copy of the Registry • Run the Registry Editor from Windows and import a backed-up Registry from another location First, we’ll discuss why you shouldn’t need to use any of these options, and then how to make them work if you do. 1974ch13.qxd 566 5/11/98 1:05 PM Page 566 Chapter 13 • Fixing Windows 98 Crashes—Failure Recovery Gone, but Not Forgotten: How Automatic Restore Works Every time that Windows 98 boots successfully, it backs up SYSTEM.DAT and USER.DAT to SYSTEM.DA0 and USER.DA0, respectively. If the Registry is missing on bootup, Windows 98 will restore the Registry files from the backups. Any unsaved changes that you made to the Registry during your last session will be lost, but at least you’ll have a recent copy of the configuration files. NOTE This is similar to the Last Known Good configuration that NT users are accustomed to. If you’d like to see how this works before you have to do it under pressure, move SYSTEM.DAT and USER.DAT from the \windows directory to a floppy disk, write-protect the disk, and set it safely aside. (Technically, you don’t need to do this, but I’m not blowing away my Registry information on purpose without backing it up.) Then restart the machine. When the machine starts up, it’ll first flip to the familiar logo screen, but then it rethinks the situation and sends you to the Windows Startup menu. You’ll see the message: “Windows has detected a Registry/configuration error.” Selection 5 from the menu, Command Prompt Only, will be highlighted, and you’ll have 30 seconds to choose another mode in which to start up Windows. Select Safe Mode instead, and press Enter so that you can restore the Registry. The Windows logo will then appear, and the Registry Scanner will restore the Registry from the latest backup. After it has finished, you’ll need to reboot, and everything should be back to normal. Of course, this requires working .DA0 files. If you have neither SYSTEM.DAT nor SYSTEM.DA0, you’ll see a message informing you that the Registry services are not available for this session. This innocuous-sounding statement means that most Windows operations will fail, as the Registry contains the brunt of your system’s configuration. If you see this message, you’ll need to rebuild the Registry, using one of the methods described below. 1974ch13.qxd 5/11/98 1:05 PM Page 567 Restoring a Registry 567 Restoring the Registry by Hand If you corrupt or destroy your system’s Registry, you have a few different options, depending on what the problem is and how you prepared for the eventuality. Here are some common situations: • You accidentally imported an incorrect Registry to replace your good one, but you have a backup. • You accidentally erased your .DAT and .DA0 files, but you backed up the Registry to the local disk or a floppy. • You erased your .DAT and .DA0 files, and you don’t have backups. Replacing the Current Registry If Windows boots normally and the problem is merely that you don’t like the last change you made, you may be able to get away with simply importing the Registry and having done with it—if you exported a working configuration before you made the change. The following steps show you how to do this: 1. Once Windows has started up, run REGEDIT.EXE to start up the Registry editor. 2. Choose Import Registry File from the Registry menu. 3. Move to the directory where you exported the working Registry, and select the proper one. (This is where those long filenames that Windows 98 supports come in handy. You can give exported copies good, descriptive names like Configuration before installing new TCP/IP drivers or whatnot.) 4. Click OK, and you’ll import that Registry over the old one. Note that any changes that you’d made to the system configuration since exporting the Registry will be lost. If you hadn’t exported the Registry but you include it as part of your backup routine, you can restore SYSTEM.DAT and/or USER.DAT from the backups. Just copy them over the existing files (or insert them into C:\windows) and reboot. Once again, any changes that you made to the system since backing up will be lost. 1974ch13.qxd 568 5/11/98 1:05 PM Page 568 Chapter 13 • Fixing Windows 98 Crashes—Failure Recovery NOTE If Windows 98 booted successfully, then there’s no point in renaming the .DA0 files to .DAT files in an effort to restore the configuration. Remember that Windows 98 re-creates the .DA0 versions every time that it boots successfully. If the new Registry booted, that’s what’s in the .DA0 files, even if something’s wrong with it. Rebuilding the Registry with SETUP.EXE All right, Windows 3.x users: what happens if you accidentally delete or corrupt a system file? If you’re lucky and you know what you did, you can copy the file from your backups, but sometimes nothing will do but to reinstall the entire operating system. Although it’s not that tricky a job if you’ve done it a few times, it’s certainly time-consuming—and you can probably think of better ways to spend those precious work hours. If your system configuration is corrupted and you can’t restore it from the .DA0 files, you may be able to restore the corrupted or missing files from the installation CD or diskettes. You can run Setup from safe mode or protected mode; the only catch is that, to run it from safe mode, your CD must be locally available— no network support, remember. If you run Setup after you’ve already installed the operating system, it will ask if it should reinstall Windows 98 or just verify installed components. If you want to verify installed components, Setup examines the setup log and reruns the installation process without completely copying all system components. During this process, Windows 98 checks the already installed files against the files on the installation disks. If a file on the computer is missing or has metamorphosed into its evil twin, Setup will reinstall that file. Since only corrupted or missing files are reinstalled, this speeds up the process immeasurably. NOTE NOTE Just to run Setup, you’ll need the same amount of free space on your hard disk as if you were installing Windows 98 from scratch (about 100MB)—even if you don’t restore any files. Note that this doesn’t include the version of 98 you already have installed. Running Setup to restore the Registry will restore the files to their original configuration from when you first installed Windows 98. Most of the time, this will be OK, but it’s worth keeping in mind. 1974ch13.qxd 5/11/98 1:05 PM Page 569 Restoring a Registry 569 Living Dangerously: Using the Command Prompt If you have to, you can run REGEDIT.EXE from the command prompt and import or export Registries or edit the Registry (.REG files, not .DAT files) with a text editor. This is potentially really, really dangerous, because: • The command line is neither intuitive nor forgiving—that is, if you do something you didn’t intend, you can’t undo it easily. • The Registry looks different in EDIT.COM than in its natural habitat, so it’s easy to get disoriented. • Not only can the Registry still not tell a valid entry from your grocery list, it lets you wantonly edit and delete trees, keys, and subkeys—not just values. Reserve using the command prompt for those times when (a) you’re really sure of what you’re doing, and (b) you have no other choice. No other choice in this context means that you can’t run Windows at all. You can do pretty much anything from the command prompt that you can using the GUI Registry Editor. Table 13.2 shows some actions and syntax examples. T A B L E 1 3 . 2 : Command-Line Syntax of REGEDIT Action Example Export the entire Registry to a file (NEWREG.REG) Regedit /e newreg.reg Export one branch (HKEY_LOCAL_MACHINE) of the Registry to a file (NEWBRNCH.REG) Regedit /e HKEY_LOCAL_MACHINE newbrnch.reg Import a Registry file (NEWREG.REG) Regedit newreg.reg Import the Registry file NEWREG.REG, made from a specific SYSTEM.DAT and/or USER.DAT, located (respectively) at systempath and userpath Regedit /L: systempath /R: userpath newreg.reg Replace the current Registry with a previously exported one (NEWREG.REG) Regedit /c newreg.reg 1974ch13.qxd 570 5/11/98 1:05 PM Page 570 Chapter 13 • Fixing Windows 98 Crashes—Failure Recovery Be very careful about replacing the Registry with another file (the /c switch). If you import a Registry file that is a branch of the entire Registry, it will only replace the branch to which it corresponds. On the other hand, if you replace the Registry with a file that contains only a branch of the entire file, then your system’s Registry will consist only of that branch. For example, if you export HKEY_CURRENT_ USER as NEWUSER.REG and then replace the registry with NEWUSER.REG, you will blow away all of your hardware configuration information and default user setups. TIP It’s probably safer to stick with importing and exporting Registry files, and relegate the Replace function to the “interesting but overkill” closet. To replace a missing Registry, type the following: Regedit backup registry path and filename where backup registry path and filename is where you previously exported the Registry to. Don’t forget that if you used a long filename for the exported Registry, it will be listed in its shortened form when you’re in real mode. For example, Backup Registry made on 8/31/98.REG will become BACKUP~1.REG when it’s abbreviated to the eight-dot-three format. If you can’t avoid it, you can edit the Registry with EDIT.COM. Type Edit c:\windows\testconf.reg (or whatever the name of your Registry is) and you’ll see output that looks like the following: [HKEY_LOCAL_MACHINE\SOFTWARE\Classes\.ME] @=”txtfile” [HKEY_LOCAL_MACHINE\SOFTWARE\Classes\123Worksheet] @=”1-2-3 Worksheet” [HKEY_LOCAL_MACHINE\SOFTWARE\Classes\123Worksheet\protocol] [HKEY_LOCAL_MACHINE\SOFTWARE\Classes\123Worksheet\protocol\ StdFileEditing] [HKEY_LOCAL_MACHINE\SOFTWARE\Classes\123Worksheet\protocol\ StdFileEditing\SetData Formats] @=”NotesDocInfo” [HKEY_LOCAL_MACHINE\SOFTWARE\Classes\123Worksheet\protocol\ StdFileEditing\verb] [HKEY_LOCAL_MACHINE\SOFTWARE\Classes\123Worksheet\protocol\ StdFileEditing\verb\0] @=”Edit” 1974ch13.qxd 5/11/98 1:05 PM Page 571 The Emergency Recovery Utility 571 [HKEY_LOCAL_MACHINE\SOFTWARE\Classes\123Worksheet\protocol\ StdFileEditing\server] @=”c:\\123r4w\\programs\\123w.EXE” Reading these entries is similar to reading command-line file and directory information—the name of the branch is on the far left, and the keys and subkeys progress downward from left to right, like this: branch\key\subkey\subkey\subkey The part of the entry that reads @=”Edit” or the like is the value name. WARNING When using a text editor, do not edit any part of the Registry other than the value data. It’s even easier to mess up your system’s configuration here than it is in the GUI Registry Editor, as that application will not permit you to edit anything other than value data in the first place. Using a text editor, you could destructively edit the names of keys and subkeys, or delete them altogether, and you’d never get any warning that you might’ve just trashed your system—until it’s too late. The Emergency Recovery Utility You can never have too many ways of backing up your system. So far, we’ve seen how to back up the Registry. Later on in this chapter, you’ll see how to create a startup floppy and how to back up your data using Backup. There’s one more tool you should be aware of. The Emergency Recovery Utility (ERU) backs up your system configuration files (CONFIG.SYS, IO.SYS, USER.DAT, among others) to a floppy or to another folder on your system. Then, if you encounter a problem when starting Windows 98, you can recover the files you’ll need to restore your system to its original state. Backing Up Your Configuration Files You can find the ERU on the Windows 98 CD in \TOOLS\MISC\ERU\ERU.EXE. Start the program; Figure 13.2 shows you the instructions on how to use it. 1974ch13.qxd 572 5/11/98 1:05 PM Page 572 Chapter 13 • Fixing Windows 98 Crashes—Failure Recovery FIGURE 13.2: The Emergency Recovery Utility Click Next and you’ll need to decide whether to copy the files to a floppy or to another location on your machine. The files don’t take up much space, so it does not really matter where you put them. In case of an emergency, you might want to put your configuration files on a floppy for safekeeping. That way, if your drive becomes unrecoverable, you can at least reinstall 98 on another machine and copy the system configuration files to restore your settings. Once you’ve specified a destination folder, click Next, and you’ll see the screen shown in Figure 13.3, with the list of files that the ERU will back up. If you only want a few files from the list to be backed up, click Custom. Figure 13.4 shows the list of files you’ll be able to choose from. FIGURE 13.3: List of files to be backed up 1974ch13.qxd 5/11/98 1:05 PM Page 573 The Emergency Recovery Utility 573 FIGURE 13.4: Selecting which files to back up Here are a couple of things to remember, though, before you go ahead and restore your configuration files from the backup: TIP • Don’t look for the restore program, ERD.EXE, on the CD. You won’t find it there. Instead, the ERU creates its own copy in the folder or floppy where you saved the configuration files. • Don’t run ERD.EXE from Windows. It may not be able to overwrite files that are in use. Try booting from a startup disk instead. Or boot into Safe Mode Command Prompt Only (see “The Windows Startup Menu,” earlier in this chapter). Then you can safely run ERD.EXE. Run the ERU right after you have installed all your applications. Some applications may make changes to CONFIG.SYS or AUTOEXEC.BAT, for example, so you should wait until they’re installed before you back up your configuration files. 1974ch13.qxd 574 5/11/98 1:05 PM Page 574 Chapter 13 • Fixing Windows 98 Crashes—Failure Recovery Be warned: once you start ERD.EXE, there’s no backing out. Run ERD.EXE and you’ll be asked if you want to continue. Press Y and your configuration files will be restored. At the end, you’ll get a curious little message stating that you should run ERD.EXE /UNDO to undo the changes you made when you recovered your old configuration files. However, that switch doesn’t work. If you run ERD.EXE /? to get the command syntax, you’ll get two options: /UNDO and /NOUNDO. Both switches return the same error: Unknown or invalid switches What’s even more curious is that it states that the command syntax should really be EMRGRECV /UNDO | /NOUNDO Regardless, EMRGRECV.EXE is a command that doesn’t exist—and neither do the switches that go with ERD.EXE. Just go ahead and run ERD.EXE and restore your files. WARNING Be careful to make sure that you’re only restoring what needs to be restored. Don’t restore anything that’s working properly—or else you may end up losing some configuration data that you really wanted to keep. Creating and Using a Startup Floppy Like DOS, Windows 98 permits you to boot from a floppy in case of emergency. The only catch is that your computer’s A: drive must be the 31⁄2 -inch drive, as the startup files take up more than 1.2MB, and a 51⁄4 -inch floppy can’t hold that much data. The emergency floppy contains files for booting up and (hopefully) fixing your computer, as you can see in Table 13.3. T A B L E 1 3 . 3 : Contents of a Startup Floppy File Name Function ATTRIB.EXE Assigns attributes (such as archived, read-only, hidden, or system file) to files COMMAND.COM Provides an operating environment. Executes AUTOEXEC.BAT and NETSTART.BAT DRVSPACE.BIN Permits the boot disk to recognize a drive compressed with DRVSPACE continued on next page 1974ch13.qxd 5/11/98 1:05 PM Page 575 Creating and Using a Startup Floppy 575 T A B L E 1 3 . 3 C O N T I N U E D : Contents of a Startup Floppy File Name Function EBD.SYS Utility for the startup disk. EDIT.COM Text editor for editing startup files (including the Registry, but only as a last resort—see precautions in this chapter) FDISK.EXE Configures the partitions on a hard disk. With the /MBR switch, can also rebuild (but not fix) the MBR without destroying the data on the disk FORMAT.COM Formats the partitions on a disk IO.SYS The real-mode operating system that replaces DOS—reads the small portion of SYSTEM.DAT on the startup disk (Note: This is not the same IO.SYS used with DOS—that file is now called IO.DOS.) MSDOS.SYS Contains information for backward compatibility between Windows 98 and MS-DOS applications (Note: This is not the same MSDOS.SYS used with DOS— that file is now called MSDOS.DOS.) REGEDIT.EXE Used to import, export, or replace all or part of the Registry SCANDISK.EXE Disk analysis and repair utility for common disk and file errors such as lost clusters, bad clusters, and cross-linked files SCANDISK.INI Initialization file for Scandisk SYS.COM Copies IO.SYS, MSDOS.SYS, and COMMAND.COM to the drive you specify You can create the startup floppy either while installing Windows 98 or, if you delete or lose the floppy, afterwards: • To create the floppy during installation, have a junk floppy (that is, one not containing anything you want to keep) on hand and insert it as directed. • To create a startup floppy after installation, open the Control Panel, choose Add/Remove Programs, and select the Startup Disk tab. Click the Create Disk button, and the system will begin to set up the startup files. Insert a disk as prompted (I recommend writing the date as well as the name on the disk label), and the system will create the disk. To make troubleshooting easier, it’s a good idea to copy CONFIG.SYS, AUTOEXEC.BAT, WIN.INI, SYSTEM.INI, 1974ch13.qxd 576 5/11/98 1:05 PM Page 576 Chapter 13 • Fixing Windows 98 Crashes—Failure Recovery and a copy of your system’s Registry onto this disk. Do that and your startup disk will contain all the files that you need to fix your hard disk and replace your configuration. Keep the startup floppy write-protected and labeled, so you don’t delete it accidentally. If your computer will not boot normally, you’ll need this disk around just to get the system going. Booting to DOS OK, I lied earlier: if you really want to, it’s possible to make your computer capable of booting to DOS. It just requires either some forethought (and a lot of empty space on your hard disk to contain 40MB of operating system files) or some postinstallation tweaking. Installing Windows 98 for Dual Boot When installing Windows 98, you have the choice of either installing the operating system to a new directory or installing it into your old Windows directory over the previous installation (as Microsoft recommends). If you go with the default, then Windows 98 overwrites your earlier version of Windows and absorbs any previous system settings that apply to it. This is convenient, but (as noted at the beginning of this chapter) it limits your options if something goes wrong with Windows 98. If you decide to install to a new directory instead of going with the default, specify the new directory during installation. This will preserve your old Windows installation. Other than that, the installation process will proceed normally. When you’ve finished installing Windows 98, remove the read-only attribute for MSDOS.SYS and open the file in Notepad. In the [Options] section, add the line BootMulti=1. When you’ve finished, the active portion of MSDOS.SYS should look something like this: [Paths] WinDir=C:\WINDOWS WinBootDir=C:\WINDOWS HostWinBootDrv=C UninstallDir=F:\ 1974ch13.qxd 5/11/98 1:05 PM Page 577 New Utilities in Windows 98 577 [Options] BootDelay=5 BootMulti=1 BootGUI=1 DoubleBuffer=1 AutoScan=1 Reboot and hold down the Ctrl key when you see your machine’s drive information. You’ll now see an additional option in the Windows Startup menu: Previous version of MS-DOS. Choose that item, and DOS will boot. Booting to DOS Although the Windows 98 Resource Kit describes an elaborate process for setting up dual DOS/98 booting after installation, the sad fact is that it doesn’t work— renaming the command interpreter with a DOS extension seems to make it unreadable, and loading COMMAND.COM doesn’t work either. However, you can still boot to DOS if necessary, using the old-fashioned method of creating a DOS bootable floppy. Go to a DOS-based machine and create a system disk (this must be a DOS machine, not a Windows 98 machine). Insert the disk in drive A: and reboot, and your system will boot to DOS, and you’ll have access to any DOS programs on your system. Kludgy, but it works. New Utilities in Windows 98 Windows 98 includes a few utilities that should make your life a little easier when it comes to troubleshooting your machine. The System File Checker scans your system files and replaces them if they’re corrupted. Dr. Watson has been updated to give you a more detailed look at why a particular application crashed. The System File Checker If you’re having problems running Windows 98, it just may be possible that one of your system files has become corrupted. You might have a general idea of why the problem is occurring, but you can’t quite pin it down. 1974ch13.qxd 578 5/11/98 1:05 PM Page 578 Chapter 13 • Fixing Windows 98 Crashes—Failure Recovery It’s kind of like a string of Christmas tree lights. One light goes out, and suddenly the whole string doesn’t work. Finding the bad bulb is not only a timewasting, frustrating activity—it sometimes seems nearly impossible, especially if you have more than one burned-out bulb on the same string. The same goes for system files. A corrupted file can cause a chain reaction in a given process, virtually knocking out your entire system. It’s almost impossible to tell a good file from a corrupted one, unless one of your diagnostic tools tells you that a particular file doesn’t work. Which brings us to the System File Checker (SFC). This utility will scan your system files, check for corruption, and replace anything that it finds to be out of the ordinary. Start the program by clicking Start ➣ Run, type sfc, then click OK. You’ll see the dialog box shown in Figure 13.5. FIGURE 13.5: The System File Checker As you can see, you have some choices. If you’re not sure whether or not your system has corrupted files, choose Scan for altered files However, if you do know of a specific corrupted file, you can use the utility to extract it for you and put it in the correct folder. 1974ch13.qxd 5/11/98 1:05 PM Page 579 New Utilities in Windows 98 579 Scanning System Files for Errors Running the SFC is a pretty automated process. It scans your system files for errors, skips past those files it determines to be working properly, and stops on any file that it finds to have changed. When it comes across a file that fits its search criteria (read the section on changing the System File Checker settings), it’ll ask you if you want to restore the original version of the file, ignore the error, or update the verification information the SFC uses to determine whether a file needs to be updated. For example, Figure 13.6 shows a sample file that was found to have differences between the current version and originally installed version. In this example, the only difference is that the current file has a version number while the original does not. In this case, I’m pretty sure that this is the only difference, so I’m going to update the verification information so that this file doesn’t show up again the next time I run the SFC. FIGURE 13.6: Possible corrupted file 1974ch13.qxd 580 5/11/98 1:05 PM Page 580 Chapter 13 • Fixing Windows 98 Crashes—Failure Recovery Now, if the current file was older than the original, a different size, or had an older version number, then I might think that something was amiss. Take, for instance, Figure 13.7. The original file is newer and a different version than the current file. Should I restore the original? If I do, I run the risk of completely crashing my machine. However, the SFC allows you to back up the so-called corrupted files to another location, just in case you made an error in judgement. FIGURE 13.7: Differences between original and current MSVCIRT.DLL files To make my life more interesting, I’ll select Restore file. Figure 13.8 shows the dialog box you’ll see when you need to restore a file. Unfortunately, the SFC doesn’t know where the original file is kept. Go figure— it knows everything about the file except its location. Couldn’t Microsoft have added that in the verification information as well? The SFC assumes that you can find it wherever you stored your source files when you installed 98, but that location is easily changed. 1974ch13.qxd 5/11/98 1:05 PM Page 581 New Utilities in Windows 98 581 FIGURE 13.8: Restoring a file So, how do I know that the file I’m restoring is the version I’m looking for? If you have already extracted the file from the CD, right-click the file name and select Properties. In the General tab, you’ll see when the file was last modified and its size. These should match the date given in the SFC. Click the Version tab to check the file number. This should also match the version listed in the SFC. If either of these doesn’t match, you have the wrong file. If you haven’t extracted the replacement file from the CD and want to be sure that it’s the correct file, you can use the SFC to extract a particular file to use later (more on that in the next section). Once you’ve determined which file you’re going to restore, specify the source path in the Restore from window and specify the destination path in the Save file in window. Click OK to restore the file and continue with the file scan. The process will continue until all the files have been checked. Restart your computer, and if your files were indeed corrupted, your problems should be fixed. Extracting a File System files on the Windows 98 CD are pretty difficult to locate. The file you’re going to need may be on any of a possible 70 .CAB files. Unless you’re an extremely patient person, I can’t see why you’d want to search all of the compressed files on the CD by hand in order to find a replacement file. Good thing that there’s a way to do a quick search of .CAB files. At the command prompt, change the directory path to the \Win98 folder on your CD-ROM drive. There, you’ll find EXTRACT.EXE. Even though the file is 1974ch13.qxd 582 5/11/98 1:05 PM Page 582 Chapter 13 • Fixing Windows 98 Crashes—Failure Recovery titled appropriately for extracting .CAB files, you can also use it to search those cabinet files as well. To search the files on the CD, use this syntax extract /A /D <starting .CAB file> <file to be extracted> | more where <starting .CAB file> is the first .CAB file listed alphabetically in the folder and <file to be extracted> is the file you wish to search for. You can use wildcard characters if you wish, but you must specify only one .CAB file name for the tool to work. When you execute the command, any files that fit your search criteria will be listed underneath the cabinet file that the file you’re looking for belongs to. OK, now that you know how to locate a file on the CD, it’s time to extract it. Run the System File Checker and select the Extract one file from installation disk option. In the window, specify the .CAB file you located using EXTRACT.EXE and click Start. You’ll see a dialog box like the one in Figure 13.9. FIGURE 13.9: Specify source and destination directories In this dialog box, you’ll need to specify source and destination directories. In the Restore from window, type the name of the folder where the .CAB file is located on the CD. In the Save file in window, specify a temporary path where the file should be extracted and move the files to their proper folders. When you’re ready, click OK to extract the file. If you’re not sure where the replacement file belongs, just run Find from the Start menu and search for the file in C:\Windows and its subfolders. When you know where to put the replacement file, copy it from the temporary folder to the appropriate folder in C:\Windows. TIP Rule #1 for extracting files: don’t extract any files to C:\Windows or any of its subfolders. You might accidentally overwrite another file. 1974ch13.qxd 5/11/98 1:05 PM Page 583 New Utilities in Windows 98 583 Changing the System File Checker Settings Before you do anything, you should check the SFC settings. The default settings leave out a lot of stuff that you should be aware of. Click the Settings button at the bottom of the dialog box and you’ll see the screen shown in Figure 13.10. FIGURE 13.10: System File Checker Settings tab It’s important to back up files before a restore. Unless you’re pressed for drive space, you should always back up your files before you replace them. In any case, being the free-thinking individual you undoubtedly are, you’re given choices: you can have your files backed up automatically, you can be prompted for a backup, or you can choose not to back up the files at all. I’d advise against the last option. You’ll be sorry later—trust me. TIP Rule #2 for extracting files: always back up your files before you replace them. It’s your choice, but you’ll be well advised to follow this rule. Believe me, there will come a day where you’ll need that backup file and you’ll be glad that you have it. 1974ch13.qxd 584 5/11/98 1:05 PM Page 584 Chapter 13 • Fixing Windows 98 Crashes—Failure Recovery Select a location for the backup files by clicking Change. The folder must already exist on your machine, so if you want to create a backup folder, do it before you change the settings. Also, you should specify whether you want a log file and if so, whether any existing log should be appended or overwritten. If you’ve run the SFC previously, you can look at the log file by clicking View Log. By default, the SFC doesn’t check for changed or deleted files. If you’ve accidentally deleted a file, or if one of your applications has changed the contents of a file, you can check for these changes, as well. Check the appropriate boxes in order to scan for these files. Click the Search Criteria tab and you’ll see a screen like the one in Figure 13.11. Here, you’ll be able to specify which folders are searched and whether their subfolders are searched as well. You can also specify which file types to check. FIGURE 13.11: Modifying and creating search criteria Click the Advanced tab to see the screen shown in Figure 13.12. Here, you can either specify which verification data file you want to use, or create your own. 1974ch13.qxd 5/11/98 1:05 PM Page 585 New Utilities in Windows 98 585 Since the validation process may take quite a while, you might want to create a profile that only searches a specific folder or for certain file types. Maybe you know that you deleted a certain file, but you’re not sure where it’s supposed to be. If the file is listed in the verification information, you may be able to restore the file. Or a file may have changed in the \Windows\System folder, but you can’t remember which specific file it was. FIGURE 13.12: Advanced settings for System File Checker If you want to create a new verification data file, click Create. Select the folder you want to put the profile in, and specify a filename. Now, when you click the Search Criteria tab, you’ll notice that the dialog box contains no information at all. Here’s your chance to specify which folders and files the SFC will search for. Once you’ve got at least one folder and file type and you’ve clicked Apply, your new profile will be saved. You can always select a different profile if you’re not happy with the one you’ve created. 1974ch13.qxd 586 5/11/98 1:05 PM Page 586 Chapter 13 • Fixing Windows 98 Crashes—Failure Recovery TIP Don’t worry if you’ve altered the default verification data file. Click the Restore Defaults tab and specify the path to the \WIN98 folder on the CD. Click OK, and your default settings will be restored. But, just in case you don’t have the CD available, it would be best to create a separate data file instead of changing the default settings. An Improved Dr. Watson Microsoft did a good thing in revamping Dr. Watson. “Elementary, my dear Watson” described perfectly the Windows 95 version of the program. The only thing it did really well was to tell you that a specific application had crashed. Why bother telling me that my application stopped working when I could see it for myself? Talk about being redundant. It’s kind of like having your car break down, only to have the mechanic tell you that your car is “broken.” What you want to know is why the car stopped functioning, not that it doesn’t work. You already knew that. By the way, didn’t Holmes have to explain everything to Dr. Watson? If Watson was so smart, why couldn’t he figure anything out for himself? I guess that’s how that’s how this application got its name. It only points out that something happens, but it can’t explain why. So now we have the improved Dr. Watson. This time around, it has a few answers of its own. It’s still up to you to determine what happened, but now you actually have clues. Instead of scratching your head, you can now say, “Aha!” after you’ve determined what went wrong. Here’s an example to show you how useful the new Dr. Watson can be. One of my co-workers, Kris, was running Windows 98 one day and suddenly one of her applications crashed. A Dr. Watson window appeared, saying that it was generating a system snapshot (see Figure 13.13). FIGURE 13.13: Generating a snapshot of the Windows 98 operating system 1974ch13.qxd 5/11/98 1:05 PM Page 587 New Utilities in Windows 98 587 Unfortunately, one of the things that Dr. Watson still lacks is the ability to tell you exactly what application it was that crashed. In Figure 13.14, you can see that the application name is actually the filename that the application uses. Unless you’re familiar with the filenames of your applications, knowing which application had a problem can be a mystery. This is especially true with integrated programs, such as the Microsoft Office suite. Because these programs share files, it may be impossible to see which program has the problem. FIGURE 13.14: Dr. Watson error message Still, it’s not impossible to find out—it just takes a bit of work. OK, so we know that something went wrong. The error message itself doesn’t help us at all: The application or one of its DLLs used an uninitialized function pointer variable or attempted to use a DLL which has already been freed. This being Dr. Watson, it’s still kind of vague: • It doesn’t tell me which .DLL file it attempted to use. • It doesn’t know which module was in use at the time. • I have no idea which application is tied to WINPM-32.EXE. 1974ch13.qxd 588 5/11/98 1:05 PM Page 588 Chapter 13 • Fixing Windows 98 Crashes—Failure Recovery And, of course, there’s that nice solution offered by Dr. Watson: Restart the program. If the problem persists, you may need to reinstall it. That sounds kind of like when I was a kid: we had a really old black-and-white TV that didn’t tune in very well. The best remedy for the poor reception was to keep hitting it on the side until the picture came in better (we were kids, after all—patiently tuning the TV meant nothing to us). For my sisters and me, there was no reason to think that the thing needed to be fixed—it just needed a good hard whack. Now, whenever I have an application that stops working, the only solution that Dr. Watson offers is to try it again. Not that there could be anything wrong with the application itself. It doesn’t need to be fixed, of course. So far, I haven’t seen Dr. Watson offer any other solutions. The System Tab Anyway, let’s take a look at the System tab. Figure 13.15 tells us a number of things: • The version of Windows 98 Kris was using • How it was installed (In this case, she upgraded from an earlier version of Windows.) • Which version of Internet Explorer was installed • How long her machine had been running before the error • The mode her system was running (either Normal or Safe) • Her machine’s name and the user ID that she logged on with • What type of processor the machine contains and the amount of memory it has • The amount of free resources • The drive where the system’s swap file is located and the amount of free space on that drive 1974ch13.qxd 5/11/98 1:05 PM Page 589 New Utilities in Windows 98 • The location of the system’s temporary files • The date and time that the snapshot was taken NOTE 589 Your Dr. Watson screens may look slightly different from those in this section. FIGURE 13.15: Dr. Watson System tab The Tasks Tab The System tab gives us an idea of what state the machine was in, but it really doesn’t give us a clue as to why the program crashed. So, I’ll move on to the Tasks tab. Figure 13.16 shows us what applications were running at the time of the crash. Hopefully, WINPM-32.EXE will show up there and the mystery will be solved. 1974ch13.qxd 590 5/11/98 1:05 PM Page 590 Chapter 13 • Fixing Windows 98 Crashes—Failure Recovery FIGURE 13.16: Applications running at the time of the crash WINPM-32.EXE is listed at the bottom. Just my luck, it’s the only one listed without a description. There is a directory path, however (you can’t see it here, but you’d see it by scrolling to the right), so that may be of some help, just in case. The Startup Tab The Startup tab shows the applications that were running when the system was first initialized. Figure 13.17 shows that there were a number of programs in the Startup group in addition to other system tools that are started via the Registry. Here, we gain a lot more insight about which program was affected. If you look at the listing for Pegasus Mail, you’ll see that program run at the command line is the same as the file we’re looking for, WINPM-32.EXE. So, we can assume that it was Pegasus Mail that crashed—even though I’m sure this was painfully obvious when the application stopped working. 1974ch13.qxd 5/11/98 1:05 PM Page 591 New Utilities in Windows 98 591 FIGURE 13.17: Programs running upon system startup The Hooks Tab Applications or functions can preempt parts of a system as part of their normal configuration. The Hooks tab, shown in Figure 13.18, shows exactly what function has been taken over by what file in what application, as well as the location of the file and the application. The Kernel Drivers Tab The Kernel Drivers tab shows the Windows kernel-mode drivers that were installed. Since the error pertained to a missing or inaccessible .DLL, we shouldn’t be too concerned with this tab at the moment. However, if you did come across an error about a corrupt or invalid .VXD file, this tab is where you should start looking. Figure 13.19 shows the Kernel Drivers tab. 1974ch13.qxd 592 5/11/98 1:05 PM Page 592 Chapter 13 • Fixing Windows 98 Crashes—Failure Recovery FIGURE 13.18: Intercepting modules FIGURE 13.19: Kernel-mode drivers installed on the system 1974ch13.qxd 5/11/98 1:05 PM Page 593 New Utilities in Windows 98 593 The User Drivers Tab The User Drivers tab displays user-mode drivers installed on your system. Again, in our case, we’ve been told that a .DLL file could not be accessed. The only one listed here is a multimedia driver that Pegasus Mail doesn’t use, so our problem can’t be here. Figure 13.20 shows this dialog box. FIGURE 13.20: User-mode drivers The MS-DOS Drivers Tab The MS-DOS Drivers tab shows the MD-DOS drivers installed at the time of the crash. The files listed in Figure 13.21 aren’t going to help us, though. Since Pegasus Mail isn’t a DOS application, this stuff really doesn’t apply. The Modules Tab Moving on to the Modules tab, you can see a bunch of .DLL files in Figure 13.22. Now, we know that our error message had something to do with an unknown .DLL. Maybe it can be found here. Unfortunately, the problem is that none of the .DLL files listed shows any direct link to Pegasus Mail. We do see, however, WINPM-32.EXE. That is probably our unknown module, as there’s no description given and every other file listed is part of the operating system. 1974ch13.qxd 594 5/11/98 1:05 PM Page 594 Chapter 13 • Fixing Windows 98 Crashes—Failure Recovery FIGURE 13.21: MS-DOS drivers FIGURE 13.22: 32-bit modules in use before the crash 1974ch13.qxd 5/11/98 1:05 PM Page 595 New Utilities in Windows 98 595 The 16-Bit Modules Tab The 16-bit Modules tab shown in Figure 13.23 displays more .DLL files, but these are all linked to multimedia, system, and power management applications. The Details Tab There’s one more place to look: the Details tab. Figure 13.24 shows the output from the program showing an invalid page fault. This is actually the problem we were looking for. As you learned in Chapter 2, a page fault is exactly what Dr. Watson called it—the program tried to access something in memory that didn’t exist. So, judging from that assessment, it’s probably best to follow Dr. Watson’s advice and restart Pegasus Mail. If the problem continues to occur, Kris will probably have to reinstall the program. After all, it is her computer. FIGURE 13.23: 16-bit modules in use before the crash 1974ch13.qxd 596 5/11/98 1:05 PM Page 596 Chapter 13 • Fixing Windows 98 Crashes—Failure Recovery FIGURE 13.24: Detailed output from Dr. Watson error “Watson, Come Here—I Need You” After that lengthy explanation of an error which could easily have been diagnosed without searching through every Dr. Watson screen, you might be wondering why you even need Dr. Watson. Well, the answer is fairly simple: if you’re a system administrator or even someone who just wants to help out, you need a little information before you can tell what went wrong. Only the person who was using the operating system at the time would know that Pegasus Mail had crashed. Anyone else would need to know what applications were running at the time of the crash, the state the system was in, and what file had caused the error. Anything less than giving users precise detail about a problem would bring us back to the days of the old Dr. Watson, when we didn’t know anything that was going on. 1974ch13.qxd 5/11/98 1:05 PM Page 597 Backing Up Your Data 597 Backing Up Your Data Ask anyone who’s lost a vital document about the importance of backups. These days, you can’t be too sure how reliable your files are. Files can become corrupted, accidentally deleted, or overwritten without your knowing it. That’s why it helps to have an additional copy, just to be safe. I wish I did when I started writing this chapter. About halfway through, somehow the file became corrupted and I couldn’t recover the document. Fortunately for me, I had planned to work on it at home and put it on a floppy a few days earlier. If it weren’t for that pseudo-backup, I’d have caused myself a lot of pain. Run Backup by selecting it from Programs ➣ Accessories ➣ System Tools in the Start menu. You’ll see the Welcome dialog box shown in Figure 13.25. I’ll cover the two main choices listed in this menu: creating and restoring backup files. Before I show you the easy way to back up your files (“Aw, no fair!”, I hear you cry), I want give you the details on how to create a backup job on a tape. Once you understand how this is done, you can have the Backup Wizard do most of the work for you. After all, no one learned how to fly a plane by starting with the autopilot. FIGURE 13.25: Welcome to Microsoft Backup 1974ch13.qxd 598 5/11/98 1:05 PM Page 598 Chapter 13 • Fixing Windows 98 Crashes—Failure Recovery Preparing the Tape Before you do anything, you’re going to have to get the tape ready. There are a couple things that have to be done: erasing and retensioning the tape. Even if you haven’t used the tape yet, it has to be erased—in a sense, to format it. Retensioning the tape removes the slack that can cause errors during the backup. “What Kind of Media Should I Use?” I’ve been asked that question a number of times. The answer depends on what you need. If you need to restore data quickly, a removable disk may be in order. Hard disks are much faster than tape backups and may offer more space, as well. Tape backups, on the other hand, are more cost effective and portable than removable disks. All you have to do is pop a tape into a tape drive and start the backup or restore. One drawback to using tapes, however, is that the backup process takes up system resources. Since tape backups can be pretty slow, you may end up sitting around watching a backup that can take a couple hours. If other users need access to your machine, they may have trouble if you’re running the backup during the day. Floppies are good if you have a minimal amount of data to back up. If you don’t mind switching floppies every minute or so and you don’t have a lot of data to back up, then maybe this is the way to go. I like to use floppies to keep backups of drivers that I might need. Windows 98 doesn’t carry the drivers for every adapter available—and it may be that you will have one of those adapters. If this is the case, keep a copy of the drivers on a floppy and when the time comes, you’ll have it ready. There are a couple ways to erase a tape. The quickest way to erase it is to initialize it. Initializing a tape renames the tape and does a quick erase. If you’re overwriting a tape, you should use this option. To initialize the tape, select Media ➣ Initialize from the Tools menu. You’ll see a screen like the one shown in Figure 13.26. Once Backup has read the tape header, it will ask you to give the tape a name. Then, the quick erase will occur. This will just erase the tape header that keeps an index of everything that’s on the tape. In all, depending on your system, it should only take a minute or two to complete the initialization. If data already exists on the tape, you’ll need to verify that you want to overwrite the data. 1974ch13.qxd 5/11/98 1:05 PM Page 599 Backing Up Your Data 599 FIGURE 13.26: Reading the beginning of the tape TIP When naming your backup tape, give it a meaningful name like “Full Backup 12/17/97” or “Backup of Parts Database 4/22/98”. It’s always a good idea to put the date on the label so that you can be sure you grab the right tape when you need it. The other way to erase a tape is to do a full erase. This will completely erase the tape from beginning to end. You’ll need to do this when you back up data to a new tape. To do a full erase, select Media ➣ Erase from the Tools menu. You’ll see the dialog box shown in Figure 13.27. FIGURE 13.27: Erasing a tape 1974ch13.qxd 600 5/11/98 1:05 PM Page 600 Chapter 13 • Fixing Windows 98 Crashes—Failure Recovery You can also do a full erase with used tapes, but it’s not really necessary, especially if you’re in a hurry. Depending on the length of the tape, you may be waiting around 10–15 minutes for the tape to erase. Next comes the retension. Select Media ➣ Retension from the Tools menu. You’ll see the screen shown in Figure 13.28. FIGURE 13.28: Retensioning a tape Now your tape is ready for the backup. Creating a Backup Job When you start Backup, skip past the Welcome screen by clicking Close. This will take you to the Backup tab shown in Figure 13.29. Since this is the first job you’re creating, you won’t see any jobs listed other than “Untitled,” so don’t worry. Once you create a job, that one will be listed, as well. Now we come to some real choices. You have a choice of whether to back up all of the files that you’ve selected, or just those that are new or have changed. If you back up your files on a regular basis and want to append your data to a backup that already exists, then you should choose New and changed files. That’ll save you some space. Otherwise, if you consistently overwrite your old backups, you should choose All selected files. 1974ch13.qxd 5/11/98 1:05 PM Page 601 Backing Up Your Data 601 FIGURE 13.29: Creating a backup job Now you’ll want to select the drives and/or files that you want to back up. If you want to back up an entire hard disk, check the box next to the drive letter you plan to back up. Otherwise, if you want to back up a specific set of folders or files, you’re going to have to specify those that you want to back up. Figure 13.30 shows how to do this. To drill down to a specific folder, double-click the drive letter that the folder resides on. Keep double-clicking each folder name until you find the folder you’re looking for. When you’ve found the folder, check it, and each file in that folder will have a blue checkmark next to it. If you want only specific files, uncheck those you don’t want to back up. If you see a gray checkmark next to a box, that means that the path is being backed up, but not all of the files and subfolders underneath it. Now, all that you have to do is decide where the backup should be saved. In the Where to back up list box, select the drive you’ll use to back up your files (usually a tape drive), or select File to back up your files to a hard disk, network drive, or floppy. If you selected File, you’ll also need to specify a location where the backup will be saved. 1974ch13.qxd 602 5/11/98 1:05 PM Page 602 Chapter 13 • Fixing Windows 98 Crashes—Failure Recovery FIGURE 13.30: Selecting files for backup TIP If you’re saving your backup to your hard disk, create a special folder that’s easy to find when you really need it. That way, all of your backups will be in one location and easily accessible. Setting the Backup Options Click the Options button and you’ll see the Backup Job Options dialog box, shown Figure 13.31. The General tab allows you to specify how the data will be compressed, whether the backup can be overwritten or appended, and whether it will be verified. Click the Password tab, and you’ll see the screen shown in Figure 13.32. This dialog box allows you to specify a password in order to keep others from gaining access to the backup. If you’ve got sensitive documents or applications that other users shouldn’t use, you’ll probably want to specify a password. 1974ch13.qxd 5/11/98 1:05 PM Page 603 Backing Up Your Data FIGURE 13.31: General backup options FIGURE 13.32: Specifying a passwordprotected backup 603 1974ch13.qxd 5/11/98 1:05 PM 604 Page 604 Chapter 13 • Fixing Windows 98 Crashes—Failure Recovery Clicking the Type tab will allow you to specify the type of backup you want to perform. Figure 13.33 shows that you can select either All selected files or New and changed files only. If you select All, a full backup of every file you select will be done. If you select New and changed, you’re given the choice of the following backups: • TIP You can tell if the archive bit is set by right-clicking a file in Windows Explorer and selecting Properties. If the Archive box is checked in the Properties screen, then the archive bit is set. • FIGURE 13.33: Backup types Differential backup type, which backs up all of the files that have changed since you last did a full backup. When the archive bit for a file is set, the file is backed up and the archive bit is still set to on. Incremental backup type, which backs up all files that have changed since the last full or incremental backup. Files that have the archive bit set to off are copied and the archive bit is then set to off. 1974ch13.qxd 5/11/98 1:05 PM Page 605 Backing Up Your Data 605 Whether to choose differential or incremental backups is up to you. As Figure 13.33 shows, each has its own advantages: • Differential backups take up more space and are slower, but the restores are faster. So if you need to restore your files more quickly or aren’t pressed for space, this may be the way to go. • Incremental backups are quicker and take up less space, but the restores are slower. If you don’t have a whole lot of space to play around with and you don’t mind waiting for your restore to finish, this could be the option for you. Click the Exclude tab and you’ll see the screen shown in Figure 13.34. Any files with extensions listed here will be excluded from the backup. For example, you might not want to back up any sound files. In this case, you could specify any file with a .WAV, .AIF, .AIFC, .AIFF, or .AU extension to be skipped during the backup process. FIGURE 13.34: Files to be excluded from a backup Click Add to specify other file extensions you want to exclude. Figure 13.35 shows the dialog box you’ll encounter. Select the file extension from the list, if it exists. If you can’t find the extension but know it exists, you can choose the Custom type option and specify the extension there. For example, at one time my 1974ch13.qxd 606 5/11/98 1:05 PM Page 606 Chapter 13 • Fixing Windows 98 Crashes—Failure Recovery company used to write all its documents in Ami Pro, which uses the .SAM extension. Now that we’ve converted everything to Microsoft Word, we no longer have to do daily backups of those .SAM files. So why bother? If I specify that I want .SAM file extensions to be excluded from the backup, I won’t have to waste a whole lot of space backing up files that I don’t need. Sure, it’s good to have those files around, and we keep that stuff on an archived backup—but for daily backups it doesn’t make any sense. FIGURE 13.35: File extensions to be excluded from a backup Click the Report tab to specify the information you want to put into the report file. Figure 13.36 shows the options available. You can also indicate that you want Windows 98 to perform an unattended backup. Choosing this option will allow 98 to automatically back up your data without user intervention. If you want to monitor the backup as it runs, however, uncheck this box, and you’ll be prompted to verify information during the backup. TIP The default setting for the report option is to list files that are not backed up. However, this won’t give you a clue as to what’s on your backup tape. If you want to restore a file from your backup tape, why should you care if TEST.DOC wasn’t included in the backup? Uncheck this box, and check the box listing files that were backed up instead. That way, if you’re not sure that the file you’re trying to restore is on the tape, you can look at the report file to see whether it is. 1974ch13.qxd 5/11/98 1:05 PM Page 607 Backing Up Your Data 607 FIGURE 13.36: Backup report options Once the backup is completed, you can find a copy of the report in <%rootdir%>\ Program Files\Accessories\BACKUP\reports. The report file will have the same name as your backup job. A typical report looks like this: Start Job Report ________________________________________________________________ Job Name: Untitled Backup Job Started - 12/15/97 2:50:11PM C:\SCSI\ !adpt001.dll 9/15/95 9:00AM !adpt002.dll 3/14/97 9:01AM !adpt003.dll 3/14/97 9:01AM ECD95.CNT 3/14/97 9:01AM MCAM18XX.SYS 3/14/97 9:01AM 238,080 173,056 111,616 7,050 19,888 1974ch13.qxd 608 5/11/98 1:05 PM Page 608 Chapter 13 • Fixing Windows 98 Crashes—Failure Recovery SCBNCH32.EXE 3/14/97 9:01AM SCBNCH32.HLP 3/14/97 9:01AM afdisk.cwa 9/15/95 9:00AM afdisk.exe 3/14/97 9:01AM … … 9/15/95 9:00AM pcdlib.dll 9/15/95 9:00AM pcdxbmp.dll 9/15/95 9:00AM pcdxeps.dll 9/15/95 9:00AM pcdxpcx.dll 9/15/95 9:00AM pcdxrif.dll 9/15/95 9:00AM pcdxtif.dll 9/15/95 9:00AM psslib.dll 9/15/95 9:00AM Processed File Count: 78 Total Bytes After Compression: 3,175,874 Total Bytes Before Compression: 5,787,646 Operation Completed – Yes 59,392 12,597 24,836 165,335 84,448 3,808 11,104 4,864 3,840 16,064 33,732 Notice that the report shows the size of the backup before and after compression. In the case above, compression caused a difference of about 2.5MB. Verification information is shown in the same report immediately after the backup information. It looks just like the backup information, so if there are any differences in the files, you can see them here. Backup Job Ended - 12/15/97 2:50:24PM Compare Job Started - 12/15/97 2:50:25PM C:\SCSI\ !adpt001.dll 9/15/95 9:00AM !adpt002.dll 3/14/97 9:01AM 238,080 173,056 1974ch13.qxd 5/11/98 1:05 PM Page 609 Backing Up Your Data !adpt003.dll 3/14/97 9:01AM ECD95.CNT 3/14/97 9:01AM MCAM18XX.SYS 3/14/97 9:01AM SCBNCH32.EXE 3/14/97 9:01AM SCBNCH32.HLP 3/14/97 9:01AM afdisk.cwa 9/15/95 9:00AM afdisk.exe 3/14/97 9:01AM … … 9/15/95 9:00AM pcdxrif.dll 9/15/95 9:00AM pcdxtif.dll 9/15/95 9:00AM psslib.dll 9/15/95 9:00AM Processed File Count: 78 Total Bytes Before Compression: 5,787,646 Operation Completed - Yes Compare Job Ended - 12/15/97 2:50:32PM 609 111,616 7,050 19,888 59,392 12,597 24,836 165,335 3,840 16,064 33,732 ________________________________________________________________ End Job Report Click the Advanced tab to see the screen shown in Figure 13.37. This dialog box will allow you to back up your Windows 98 Registry in addition to the files you specified earlier. Backing up the Registry is important, but you don’t have to do it by hand, unless you specifically want it on tape. As a precaution, Windows 98 automatically backs up your Registry each time you boot your machine. However, there may come a time where you’ll actually need that taped backup of the Registry. For example, some day you might have to wipe out the contents of your hard drive and reinstall Windows 98. Once you’ve reinstalled all your applications, you’ll have to change their settings to they way they used to be. A good way to do this is to restore the Registry—not very easy to do if you no longer 1974ch13.qxd 610 5/11/98 1:05 PM Page 610 Chapter 13 • Fixing Windows 98 Crashes—Failure Recovery have a copy of the old Registry. OK, restoring the Registry may be a little extreme, but it illustrates the need to keep a backup. Also, the amount of space that the Registry will take up on a tape is minimal compared to the amount of grief you’ll have to go through in order to reset everything to normal. FIGURE 13.37: Backing up the Registry Using the Backup Wizard Wizards have always been a favorite of mine because they follow the lazy person’s credo: do the greatest amount of work for the least amount of effort. The least amount of effort on the user end, that is, which is what I care about. If I can get the job done without having to know the intricate details about how it’s done, then I’m better off. Select Backup Wizard from the Tools pull-down menu, and you’ll see the screen shown in Figure 13.38. You’re given two choices: • You can back up all of the files on your local machine. • You can specify which files, folders, and drives you want to back up. 1974ch13.qxd 5/11/98 1:05 PM Page 611 Backing Up Your Data 611 FIGURE 13.38: The Backup Wizard For a full backup, you’ll want to select Back Up My Computer. If you normally back up everything on your machine, this is the backup for you. Click Next and you’ll see the screen shown in Figure 13.39. FIGURE 13.39: Backing up all or most recent files 1974ch13.qxd 612 5/11/98 1:05 PM Page 612 Chapter 13 • Fixing Windows 98 Crashes—Failure Recovery This option allows you to choose to back up everything on your machine or to back up only those files that have been created or changed since the last backup. You can also back up particular folders, files, and drives. Click the second option offered in Figure 13.38, and it will take you to the screen shown in Figure 13.40. Select the drives, folders, or files you want. The drives to be backed up will be indicated by a blue checkmark. FIGURE 13.40: Selecting items to be backed up You’ll need to select where the backup will be located. Take a look in the Where to back up section in Figure 13.41. If you select File from the drop-down list, you’ll need to specify a path on your local machine. Otherwise, indicate the backup device you’ll be using. Click Next and you’ll see the dialog box shown in Figure 13.42. You’ll need to specify here whether the backup is to be verified and whether you would like to use compression during the backup. Verifying is pretty essential to the backup process—it’s always better to take a little more time and make sure that it worked. If you don’t verify and errors occur, you won’t notice the errors until you need to restore the file. By that time, it’s too late. 1974ch13.qxd 5/11/98 1:05 PM Page 613 Backing Up Your Data FIGURE 13.41: Destination for the backup FIGURE 13.42: Verification and compression options 613 1974ch13.qxd 614 5/11/98 1:05 PM Page 614 Chapter 13 • Fixing Windows 98 Crashes—Failure Recovery Figure 13.43 summarizes the options you’ve chosen for the backup. If anything is incorrect, click the Back button and make the necessary changes. Finally, you’ll need to give a name to your backup job. Once you do this, all you have to do is tell Backup which job you want to run. Just type a name in the window and click Start to run the Backup. FIGURE 13.43: Backup job summary TIP There is one drawback to the Backup Wizard. It seems that the only way you’ll be able to save the job is to run the backup at least once. If you’ve got a lot of stuff to back up, this can tie up your machine. If you want to create a backup job, but you don’t want to run it right away, you should create the job by hand instead. Restoring a Backup File When you first click the Restore tab, you’ll be asked if you want to refresh the current view. This is a confusing way of asking you whether you want to view the directory structure of the latest backup. Figure 13.44 shows what Restore tab looks like without a catalog loaded. The figure shows that the “Catalog is empty for the selected device,” meaning the backup set hasn’t been loaded yet. 1974ch13.qxd 5/11/98 1:05 PM Page 615 Backing Up Your Data 615 FIGURE 13.44: No catalog loaded yet Select the location of the backup set in the Restore from window. Pop the tape in the drive and click Refresh. Once Backup has finished scanning the tape, you’ll see a screen like the one shown in Figure 13.45, which shows the backup sets available on the tape. FIGURE 13.45: Available backup sets 1974ch13.qxd 616 5/11/98 1:05 PM Page 616 Chapter 13 • Fixing Windows 98 Crashes—Failure Recovery Pick the sets you want (if the sets contain the same files, you’ll receive the files from the more recent backup set). Click OK, and Backup will create a catalog that you can use to select the files to be restored. Select the files, drives, and folders you want to restore. Anything with a blue checkmark next to it will be restored. WARNING Backup doesn’t ask you if you’re sure that you want to restore the files you’ve selected. You may want to copy your original files to a temporary folder—or even back them up to tape—before you do a restore, just to make sure that you don’t overwrite something you shouldn’t. To copy the files to a temporary folder, select Alternate Location in the Where to restore drop-down list, then specify a directory path in the window that will appear when you select the Alternate Location option. One other way to make sure that you don’t overwrite files is to change the Options settings. Changing the Restore Options Click the Options button at the bottom of the Restore tab and you’ll see Figure 13.46, where you can decide how the files are restored. Your options include not overwriting in any case, replacing only older files, or always replacing the file during the backup. If you’re a cautious sort of person, the first option is probably your best one. At least if a file is overwritten that shouldn’t have been, you took just about every precaution. Replacing only older files keeps you from replacing an updated driver file with a previous version. Updated is usually better, so why would you want to replace your current file with an inferior version? Then again, if you’re a daring sort of person, you can always replace any file that happens to be in the backup set. I did this once when I was restoring our Web site, and I don’t think that it’s always the best thing to do unless you’re absolutely sure that the files you’re restoring need to be on your system. In the case of my Web site, I restored the wrong copy of the files I needed and ended up with the wrong versions of the files. Even though the current site had a few problems, it worked better than the version I restored it with. I was left with no choice but to update the entire Web site by hand. 1974ch13.qxd 5/11/98 1:05 PM Page 617 Backing Up Your Data 617 FIGURE 13.46: How files will be replaced The Report and Advanced tabs look exactly like those in the Backup Options dialog box shown in Figures 13.26 and 13.27, except that the Report tab options deal with, well, restoring instead of backing up. The Restore Wizard Restoring a file is even easier when you use the Restore Wizard. It breaks the Restore dialog box down to a number of screens to make sure that you don’t miss anything. To access it, click Tools ➣ Restore Wizard. You’ll be taken to the screen shown in Figure 13.47. Select the device that contains the backup set. This will be a tape drive, your local hard disk, a network drive, or a floppy disk. Click Next, and Backup will scan the tape for backup sets. Once it has finished, it’ll list the backup sets available, like the ones shown in Figure 13.48. Select the ones you want and click OK. Backup will then create a temporary catalog so that you can select the files you want to restore. 1974ch13.qxd 618 5/11/98 1:05 PM Page 618 Chapter 13 • Fixing Windows 98 Crashes—Failure Recovery FIGURE 13.47: Restore Wizard opening screen FIGURE 13.48: Backup sets on tape Select the files, folders, and drives you want to restore. Remember that only the files with blue checkmarks next to them will be restored. Click Next and you’ll need to specify where the files will be located. You can restore the files to the same folder path that you specified when you selected your files, or you can restore them to an alternate folder. If you select an alternate folder, you’ll need to specify the complete path as well. 1974ch13.qxd 5/11/98 1:05 PM Page 619 Backing Up Your Data 619 Click Next, and you’ll see the screen shown in Figure 13.49, which lists the types of restoration you can do. You can choose to not to restore files that currently exist on your hard disk, you can replace only files that are older than the versions in your backup set, or you can replace everything listed in the backup set. FIGURE 13.49: Ways to restore a file TIP When replacing files, you should be sure that these are files you want to replace. Just to make sure, set the restore to either Do not replace the file on my computer or Replace the file on my computer only if the file is older. If you’re restoring everything, you should understand that there’s no turning back. Once you’re ready, click Start. You’ll then be told that a tape with a given name should be in the drive. If it’s not, you won’t be able to complete the restore. Once that’s done, Backup will restore the data to the location you’ve specified.