IPAddr

Use FDisk to Rewrite a Master Boot Record for Win-XP or Win-2003 etc

The Master Boot Record (MBR) is created when the disk is partitioned. The MBR contains a small amount of executable code called the master boot code, the disk signature, and the partition table for the disk. At the end of the MBR is a 2-byte structure called a signature word or end of sector marker, which is always set to 0x55AA. A signature word also marks the end of an extended boot record (EBR) and the boot sector.

When you start a computer from the hard disk, the system BIOS code identifies the startup disk and reads the MBR. The master boot code in the MBR searches for the active, primary partition on the hard disk. Occasionally the MBR can become corrupted. This can be caused by human error, hardware problems, power fluctuations, viruses, and other factors.

Prior to boot sector viruses, it was rare that any support person even knew what a MBR (Master Boot Record) was. If your MBR has been contaminated by a virus, use the virus vendors document to recover it. If you can not, the preferred approach is to have a backup of the MBR. See Backup/Restore MBR. If its too late for that the next best approach is to rewrite the Master Boot Record using the DOS-based FDISK command:


  fdisk /mbr
  

Use a dos boot disk and run it. If you don't understand what this means, don't try this tip. As an absolutely last option (thats absolutely), Mark Minasi (NT Mag Summer 1999) published assembler code to wipe the MBR. If all else fails, you can try it. If you remember when the following technique was common (ie you are an old fart), you should understand the dangers of this technique. For the babes in the woods, DEBUG code was widely used in the OLD days by assembler language coders who did not own an assembler and as a method to publish small code snippets.

I have not tried the debug approach. Let me know if it works for you. Definitely on your own. Try it as a last resort before total reinstall. Very risky. You may have to reinstall anyway.

Boot the sick system with MS-DOS boot disk containing DEBUG.EXE command. You can not do this in NT - it does not allow direct disk access.


  Start DEBUG.EXE and type following debug commands 
  -F 9000:0 L 200 0 
  -a 
  0C5A:0100 Mov dx,9000 
  0C5A:0103 Mov es,dx 
  0C5A:0105 Xor bx,bx 
  0C5A:0107 Mov cx,0001 
  0C5A:0109 Mov dx,0080 
  0C5A:010A Mov ax,0301 
  0C5A:010D Int 13 
  0C5A:0110 Int 20 
  press Enter 
  press Enter 
  -u 100 L 12 
  -g 
  Program terminated normally 
  -quit

Make sure before you type the -g in th debug code above that ALL of the code has been typed correctly !!!

You can now install a replacement MBR using

FDISK /MBR

Caution: if you need to replace the MBR to remove a boot sector virus, check your virus vendors documentation on the virus very carefully. Replacing the MBR may the worst thing you can do given certain viruses that twiddle with disk sectors - hidding or encrypting data. In such a case, replacement of the MBR will result in ALL your disk partitions and data being lost. If you have such a virus, use anti-virus software to remove the virus.

Remember the term backups? Sorry. Couldn't resist.


Use Recovery Console to Rewrite a Master Boot Record for Win-XP or Win-2003 etc

The Recovery Console allows system administrators to access the file system of a Windows NT/XP/2000/2003 computer even if the hard disk is formatted using NTFS by using the Windows NT/XP/2000/2003 Setup CD. This allows support professionals to fix even a non-booting Windows NT/XP/2000/2003 system. Since the Recovery Console has batch support, it is even possible for system administrators to create batch files to fix common scenarios and distribute those batch files for users to run on their systems.

It's a good idea to install Recovery Console on all of your Windows NT/XP/2000/2003 computers especially those used by developers, software testers, or fearless power users.

To install the Recovery Console on your system:


  winnt32 /cmdcons
 

To install the Recovery Console unattended (you can script this as part of a setup):


  winnt32 /cmdcons /unattend

Cool use of the Recovery Console:

Fix the Master Boot Record (MBR) in case it was corrupted by a virus or another problem. Previously, this might have involved using DOS FDISK (fdisk /mbr) but you can now use the command:


  fixmbr


You can't boot after changing the motherboard and/or disk controller

A "Stop 0x0000007B" error message occurs when you start your computer after you install a new motherboard

When you start your computer after you install a new motherboard, you may receive the following error message on a blue screen:


  STOP: 0x0000007B: (parameter1, parameter2, parameter3, parameter4) INACCESSIBLE_BOOT_DEVICE

Cause: This problem may occur if the new motherboard contains an embedded IDE/SATA/RAID/SCSI controller that uses a different chipset than the original motherboard.

Resolution: To resolve this problem, restart Windows Setup and then repair the Windows installation. To do so, follow these steps:

  1. Start your computer by using the Windows Setup floppy disks or from the Windows CD-ROM. (Note To start your computer from the Windows CD-ROM, your computer must be configured to start from the CD-ROM drive or DVD drive. For more information about how to configure the computer to start from the CD-ROM drive or DVD drive, see the documentation that came with your personal computer or contact the manufacturer.)
  2. At the Welcome to Setup screen, press ENTER.
  3. Read the license agreement, and then when you are prompted to accept the Windows licensing agreement, press F8.
  4. Select your current installation of Windows (if it is not already selected), and then press R.
  5. Follow the instructions that appear on the screen to repair your installation of Windows.