Archive for August 2011

Diagnose boot problems in Windows XP using MSCONFIG

Diagnose boot problems in Windows XP using MSCONFIG


                 Among all the wizards and utilities in Microsoft Windows XP is one great utility that has its roots in the Windows 9.x product line: the System Configuration Utility, or MSCONFIG. This handy utility allows you to make changes to boot files and startup parameters when troubleshooting boot problems. I’ll teach you all about the features included with MSCONFIG so you can eradicate pesky boot problems from a Windows XP workstation.

Launching MSCONFIG

To use MSCONFIG, click the Start button and select Run. In the Open box, type MSCONFIG and click OK. The utility will open, as illustrated in image 1.

Image 1

You must be logged on to the computer using an Administrator account before you can run MSCONFIG.
The MSCONFIG window contains six tabs: General, SYSTEM.INI, WIN.INI, BOOT.INI, Services, and Startup. We’ll take a closer look at each of these tabs in the following sections.

The General tab

The MSCONFIG General tab gives you some basic options for starting a computer. As shown in Figure A, the default setting for the utility is Normal Startup. The other two options for starting the computer are Diagnostic Startup and Selective Startup.
Diagnostic Startup allows you to start the computer with only the most basic devices and services that are needed for the computer to run. This startup gives you a clean environment for troubleshooting.
Selective Startup provides a variety of startup options that you can use for troubleshooting. By default, all the options under Selective Startup are chosen. However, deselecting one of these preselected options allows you to prevent one or more of the Selective Startup options from running.
For instance, if you think one of the programs that launch on startup is causing a problem, you can deselect the Load Startup Items option to prevent any startup program from launching. While this won’t help you determine which program is causing the problem, it will help you isolate the problem to a certain area. Please note that you’re unable to select the Use Modified BOOT.INI file unless you make a change on the BOOT.INI tab, which I’ll discuss later.
Finally, the Launch System Restore button provides easy access to the System Restore function, and the Expand File button is a very useful feature if you encounter a corrupted file and want to restore it.

The SYSTEM.INI and WIN.INI tabs

The SYSTEM.INI and WIN.INI tabs are included for legacy compatibility, and you may not need to use them very often. These tabs give you the ability to modify the SYSTEM.INI and WIN.INI files or prevent lines of code from executing when the computer is started.
In Image 2, each line of the SYSTEM.INI file is displayed in the window. Sections of the file, such as drivers, are expandable to allow you to work with the lines of code in those sections. You can also deselect a section to prevent the entire section from being executed.

Image 2

Deselect a section to prevent the entire section from being executed.
The Move Up and Move Down buttons allow you to move lines or sections to other locations in the file. The Find button is used to search the file; the New button lets you add new lines; and Edit lets you change the value of a line. The Enable All and Disable All buttons at the bottom of the window will select or deselect all the lines of the program. Using these buttons to alter these files is much easier and safer than using a text editor to perform the same tasks.
As you can see in Image 3, the WIN.INI tab provides the same functionality as the SYSTEM.INI tab.

Image 3

Same as before, select and deselect.

Boot options using the BOOT.INI tab

The BOOT.INI tab, shown in Image 4, gives you many options for starting the computer. The top portion of the window contains the BOOT.INI file that the computer is currently using. You cannot edit this file using MSCONFIG. You can change the timeout value for the boot menu. Even if you can’t edit the file, it is easy to view the file when you use MSCONFIG.

Image 4

Microsoft recommends that you don’t attempt to use MSCONFIG to edit BOOT.INI unless you’re directed to do so by a Microsoft support professional.
Three of the four buttons provided in this window are for editing purposes and are grayed out by default. The Check All Boot Paths button is used to verify that the boot paths in the BOOT.INI file are correct. When you click this button, you’ll receive either an error message you can use for troubleshooting or a window alerting you that the boot paths have been verified.

Boot option pane

The most valuable functions on the BOOT.INI tab are the boot options, which are explained below. You can use these choices for a variety of troubleshooting techniques:
  • /SAFEBOOT gives you suboptions for starting the computer.
    • /SAFEBOOT with MINIMAL starts the computer in Safe Mode.
    • /SAFEBOOT with NETWORK starts the computer in Safe Mode with networking support.
      Note: /SAFEBOOT with NETWORK does not load the normal network configuration; instead, it loads a generic TCP/IP network configuration.
    • /SAFEBOOT with DSREPAIR is used to repair Directory Services on Domain Controllers.
    • /SAFEBOOT with MINIMAL (ALTERNATESHELL) starts the computer in Safe Mode with Command Prompt.
  • /NOGUIBOOT starts the computer without the VGA video driver that displays graphics during the boot process and Blue Screen crash information.
  • /BOOTLOG enables boot logging to help you debug and troubleshoot startup problems.
  • /BASEVIDEO starts the computer using a standard VGA video driver, as opposed to the one installed for the graphics card.
  • /SOS causes the driver names to be displayed when they’re loaded. You can use this switch to diagnose driver-related issues.
The BOOT.INI Advanced Options screen, shown in Image 5, offers you more options for starting your computer:
  • /MAXMEM limits the amount of memory that Windows XP can use. You can use this switch if you believe that your system has a bad memory chip.
  • /NUMPROC limits the number of processors used in a multiprocessor system.
  • /PCILOCK stops Windows XP from dynamically assigning system resources to PCI devices. The devices will use the BIOS configuration instead.
  • /DEBUG starts the computer in debugging mode. It allows you to configure the machine with three additional suboptions, as follows:
    • /DEBUG with /DEBUGPORT specifies the communications port to be used for debugging.
    • /DEBUG with /BAUDRATE specifies the baud rate to be used for debugging. The default baud rate is 9600 with a modem and 19200 with a null-modem cable.
    • /DEBUG with /CHANNEL specifies the 1394 communications channel for debugging.

Image 5

These are the advanced options.

Working with the Services tab

The MSCONFIG Services tab, shown in Image 6, allows you to prevent specific services from starting when the computer is started. This is extremely useful when you’re troubleshooting service-related problems.

Image 6

Microsoft has designed the majority of services in Windows XP. To make it easier to find a non-Microsoft service, you can select the Hide All Microsoft Services option.

Troubleshooting using the Startup tab

The Startup tab lets you prevent items in your startup folder from starting when you log in. As you can see in Image 7, you can simply deselect the service to prevent it from starting. If you want to disable all the services, click the Disable All button. To enable all the services again, click the Enable All button.

Image 7

These are the startup choices.

My favorite feature

The System Configuration Utility is easy to use and will help you troubleshoot a wide variety of Windows XP boot problems. The ease with which you can temporarily modify the boot files, system services, and startup files makes MSCONFIG an extremely useful troubleshooting utility. The best troubleshooting features I have found are the boot options located within the BOOT.INI tab. Remember to use caution when manipulating boot option parameters and always write down any changes you make in case you get stuck.
Friday, August 26, 2011

Diagnose and Repair an Unbootable XP or Vista PC

Diagnose and Repair an Unbootable XP or Vista PC

How do I prepare an emergency boot disc so I'm ready in case Windows becomes unbootable?
Paul Lopez, Allentown, Pennsylvania
Alas, the days when Windows came with a program for creating a useful emergency boot floppy are long gone. And those old boot floppies wouldn't help with XP or Vista--even if you PC had a floppy drive.
Boot from one of the discs that came with your PC, and examine the menus (don't select anything that might wipe your drive). You're looking for emergency utilities.
You're in real luck if you have a full Windows XP CD or Vista DVD. These come with great tools for diagnosing and repairing an unbootable PC. In fact, if you don't have a real Windows disc, find one you can borrow in an emergency. Don't install Windows from a borrowed disc, but if it has the same version of Windows as your PC, use its repair tools.
Boot from an XP CD, and press R at the 'Welcome to Setup' screen to see the Recovery Console, a DOS-like command-line environment with a number of useful utilities. Consult "What to Do When XP or 2000 Won't Boot" for additional details.
If you boot from a Vista DVD, click Repair your computer to open the System Recover program. There you'll find options to automatically fix boot problems, restore your hard drive from an image backup, diagnose memory, or perform a system restore.
If you're ready for a Windows alternative, try Puppy Linux, which you can download as a ready-to-burn .iso file from the Puppy Linux Web site. Boot from the CD, and you'll have a nongeek's version of Linux running on your PC. Puppy Linux is the best tool I've found for one extremely important job: copying important files off an unbootable hard drive. Unlike UBCD4Win, Puppy recognizes USB drives, making it extremely easy to put these files where you can readily access them.

The XP CD's Boot Tool Kit

Enter these commands in Windows XP's Recovery Console to perform CPR on your disks and files.
Command
Action
Attrib
Changes the attributes of a file or directory.
Batch
Executes the commands specified in the text file.
Bootcfg
Boot file (boot.ini) configuration and recovery.
ChDir (Cd)
Displays the name of the current directory or changes the current directory.
Chkdsk
Checks a disk and displays a status report.
Cls
Clears the screen.
Copy
Copies a single file to another location.
Delete (Del)
Deletes one or more files.
Dir
Displays a list of files and subdirectories in a directory.
Disable
Disables a system service or a device driver.
Diskpart
Manages partitions on your hard drives.
Enable
Starts or enables a system service or a device driver.
Exit
Exits the Recovery Console and restarts your computer.
Expand
Extracts a file from a compressed file.
Extract
Extracts files from compressed .cab archives.
Fixboot
Writes a new partition boot sector onto the specified partition.
Fixmbr
Repairs the master boot record of the specified disk.
Format
Formats a disk.
Help
Displays a list of commands you can use in the Recovery Console.
Listsvc
Lists the services and drivers available on the computer.
Logon
Logs on to a Windows installation.
Map
Displays the drive letter mappings.
Mkdir (Md)
Creates a directory.
More
Displays a text file.
Net Use
Connects a network share to a drive letter.
Rename (Ren)
Renames a single file.
Rmdir (Rd)
Deletes a directory.
Set
Displays and sets environment variables.
Systemroot
Sets the current directory to the systemroot directory of the system you are currently logged on to.
Type
Displays a text file.



Repairing Windows XP in Eight Commands

Repairing Windows XP in Eight Commands

      Most of us have seen it at one time or another; perhaps on our own PC, the PC of a loved one, or perhaps a PC at your place of employment. The system spends weeks or months operating in a smooth fashion, taking you to the far reaches of the wide, wibbly web, and after one particularly late evening of browsing and gaming, you shut your PC off and go to bed. Millions of people across the globe do just this every night, but a few of us have turned our PCs on the next day not to the standard Windows XP loading screen, 
but instead this dreaded error:

Windows could not start because the following file is missing or corrupt:
\\WINDOWS\\SYSTEM32\\CONFIG\\SYSTEM

You can attempt to repair this file by starting Windows Setup
using the original Setup CD-ROM.

Select ‘R’ at the first screen to start repair.

Which renders your PC inaccessible from the standard boot procedures of Windows XP. You try safe mode, to no avail. You’re particularly savvy and try issuing the FIXBOOT and FIXMBR commands in the Windows recovery console, but after each reboot, you’re merely greeted with the same obnoxious and terrifying blue screen of death that’s preventing you from accessing your precious data.

Perhaps you’ve also seen these error screens:
Windows NT could not start because the below file is missing or corrupt:
X:\\WINNT\\System32\\Ntoskrnl.exe_________________
Windows NT could not start because the below file is missing or corrupt:
X:\\WINNT\\System32\\HAL.dll_________________
NTLDR is Missing
Press any key to restart
_________________
Invalid boot.ini
Press any key to restart
Allow me to build tension by prefacing the end-all/be-all solution with my background: Having worked for the now-incorporated Geek Squad branch of Best Buy Corporation for the better part of eight months, I have seen dozens upon dozens of systems come through our department with any one of these errors, brought in by customers who are afraid they did something, have a virus, or are in jeopardy of losing their data. Prior to my discovery of an invaluable sequence of commands, our standard procedure was to hook the afflicted drive to an external enclosure, back up a customer’s data and then restore the PC with the customer’s restore discs or an identical copy of Windows with the customer’s OEM license key. If the customer wasn’t keen on the applicable charges for the data backup, we informed them of the potential risks for a Windows repair installation (Let’s face it, they don’t always work right), had them sign a waiver, and we did our best.
Neither of these procedures are cheap in the realm of commercial PC repair, nor do they inspire a tremendous level of confidence in the technician or the hopeful client.
In an effort to expedite our repair time and retain the sanity of myself and other technicians, I received permission to undertake a case study on a variety of PCs currently in service that exhibited any of the aforementioned symptoms, and I took it upon myself to find a better solution. After crawling through the MSKB, Experts Exchange, MSDN and sundry websites all extolling the virtues of a solution to these problems, I only found one that worked, and it has been reliably serving me for the better part of two weeks on seventeen PCs to date. The process is simple: Get to the Windows Recovery Console for your particularWindows installation, navigate to the root letter of your installation (C: in most cases), issue eight commands, and reboot. The cornerstone of this process is a command called “BOOTCFG /Rebuild” which is a complete diagnostic of the operating system loaded into the recovery console; the purpose of the command is to remove/replace/repair any system files that were preventing the operating system from loading correctly. Amongst the files it fixes are:

·         Windows Hardware Abstraction Layer (HAL)
·         Corrupt registry hives (\\WINDOWS\\SYSTEM32\\CONFIG\\xxxxxx)
·         Invalid BOOT.INI files
·         A corrupt NTOSKRNL.EXE
·         A missing NT Loader (NTLDR)

The command process may apply to other types of blue screens or Hive/HAL/INI/EXE/DLL-related stop errors, but I have not had the luxury of computers in this type of disrepair. The process I am about to outline is virtually harmless, and if you feel you may be able to correct your PC’s boot-time blue screens and stop errors with the sequence, feel free to try. Let us now begin with a step-by-step instruction for correcting these issues.
Getting to the Windows Recovery Console
1.       Insert your Windows XP CD into your CD and assure that your CD-ROM drive is capable of booting the CD. Configuring your computer to boot from CD is outside of the scope of this document, but if you are having trouble, consult Google for assistance.
2.       Once you have booted from CD, do not select the option that states: “Press F2 to initiate the Automated System Recovery (ASR) tool.” You’re going to proceed until you see the following screen, at which point you will press the “R” key to enter the recovery console:




After you have selected the appropriate option from step two, you will be prompted to select a valid Windows installation (Typically number “1″). Select the installation number, (As mentioned, “1″ in most cases), and hit enter. If there is an administrator password for the administrator account, enter it and hit enter. You will be greeted with this screen, which indicates a recovery console at the ready:


Proceeding With the Repair Functions :

  • There are eight commands you must enter in sequence to repair any of the issues I noted in the opening of this guide. I will introduce them here, and then show the results graphically in the next six steps. These commands are as follows:
    • C: CD ..
    • C: ATTRIB -H C:\\boot.ini
    • C:ATTRIB -S C:\\boot.ini
    • C:ATRIB -R C:\\boot.ini
    • C: del boot.ini
    • C: BOOTCFG /Rebuild
    • C: CHKDSK /R /F
    • C: FIXBOOT
  • To “Go up a directory” in computing is to revert back to the directory above the current folder you’re operating in. If, for example, I’m in the C:WINDOWSSYSTEM32 directory, and I want to get at a file in the WINDOWS directory, I would merely type CD .. and I would be taken out of the SYSTEM32 folder and up one level to WINDOWS. We’re going to do the same thing here from the WINDOWS folder to get to the basic root of C:


Now that we are at C: we can begin the process of repairing the operating system
and that begins with modifying the attributes of the BOOT.INI file. Briefly, BOOT.INI controls what operating systems the Windows 
boot process can see, how to load them, and where they’re located on your disk. We’re going to make sure the file is no longer hidden from our prying eyes, remove the flag that sets it as an undeletable system file, and remove the flag that sets it as a file we can only read, but not write to. To do this, we will issue three commands in this step:

  • C:ATTRIB -H C:\\BOOT.INI
  • C:ATTRIB -R C:\\BOOT.INI
  • C:ATTRIB -S C:\\BOOT.INI
to remove the Hidden, System and Read Only flags.

Now that we’ve modified the attributes for the BOOT.INI file, it’s up for deletion. The syntax for it is simple: { DEL | FILE NAME }, e.g., C:DEL BOOT.INI deletes the BOOT.INI file.



Now for the most important step of our process, the BOOTCFG /REBUILD command which searches for pre-existing installations of Windows XP and rebuilds sundry essential components of the Windows operating system, recompiles the BOOT.INI file and corrects a litany of common Windows errors. It is very important that you do one or both of the following two things: First, every Windows XP owner must use/FASTDETECT as an OS Load Option when the rebuild process is finalizing. Secondly, if you are the owner of a CPU featuring Intel’s XD or AMD’s NX buffer overflow protection, you must also use/NOEXECUTE=OPTIN as an OS Load Option. I will demonstrate both commands for the purpose of this guide, but do not set NOEXECUTE as a load option if you do not own one of these CPUs. For the “Enter Load Identifier” portion of this command, you should enter the name of the operating system you have installed. If, for example, you are using Windows XP Home, you could type “Microsoft Windows XP Home Edition” for the identifier. This gives the process some authenticity, if you’re keen on being a perfectionist.


This step verifies the integrity of the hard drive containing the Windows XP installation. While this step is not an essential function in our process, it’s still good to be sure that the drive is physically capable of running windows, in that it contains no bad sectors or other corruptions that might be the culprit. No screenshot necessary here! Just type CHKDSK /R /F at the C:> prompt. Let it proceed; it could take in excess of 30 minutes on slower computers, when this is finished move on to the seventh and final step.
This last step also requires no screenshot. When you are at the C:> prompt,
simply type FIXBOOT. This writes a new boot sector to the hard drive and cleans up all the loose ends we created by rebuilding the BOOT.INI file and the system files. When the Windows Recovery Console asks you if you are “Sure you want to write a new 
bootsector to the partition C: ?” just hit “Y,” then enter to confirm your decision.

Results and wrap-up

It’s time to reboot your PC by typing EXIT in the Windows Recovery Console and confirming the command with a stroke of the enter key. With any luck, your PC will boot successfully into Windows XP as if your various DLL, Hive, EXE and NTLDR errors never existed. You’ve just saved yourself from many hours of work, frustration, potential data loss and shelling out your hard-earned greenbacks at a brick’n'mortar operation.
Keep in mind that this solution is only designed to resolve the issues introduced in the preface if the cause is unrelated to spyware and viruses; while I have had significant luck with rebuilding heavily-infected systems in the method I have described, it is not guaranteed. If you believe your PC has affected one of these symptoms due to spyware or viruses, today’s fastest-growing PC nuisance, here is our recommended list of software that can help keep your computer safe:


Pageviews

Followers

Blog Archive

Powered by Blogger.

- Copyright © 2013 Selva Sharing -Selvasharing- Powered by Blogger - Designed by @ Access -