Re: for FAT32: FIXMBR vs FDISK /MBR - which is correct?



"Jeff W" <ms-newsRemoveForSpam@xxxxxxxxx> wrote in message news:exRlsUcgFHA.1948@xxxxxxxxxxxxxxxxxxxxxxx
Here's a puzzler.  People are writing (and I can find stuff on-line to
back them up) that, even for winXP systems, the way to 'fix' an
unbootable FAT32 disk is FDISK /MBR (run from a bootable dos floppy).

I've been doing it successfully from the recovery console, using
FIXMBR.   (although, FIXMBR does NOT make the partition active).

so - why does FIXMBR work?  maybe it's the -right- way now?

(also - is there any way to mark a partition 'active' from recovery
console?  Right now I have to attach it to another PC and do it from
disk management)


Both programs replace the bootstrap program area (first 460 bytes) of the master boot record (the first sector on the hard drive). Although folks may refer to a "standard" bootstrap program, there are actually several versions of it but they all perform the same task. The bootstrap code added to the MBR when using FDISK /MBR will be different in size (i.e., how much of the 460-byte area gets used in the MBR) depending on which version of Windows that you use. The bootstrap code provided by FDISK /MBR from Windows 98 is smaller than the bootstrap code provided by FIXMBR from Windows XP but both will perform the same task. Microsoft has never bothered to explain the reasons for the size differences.

With a Win9x bootable floppy containing FDISK, you just use FDISK to mark the active partition. Under WinXP's recovery console, use DISKPART (run "diskpart /?" to see the commands). Typically I would go into interactive mode (just run diskpart) so you can run the list command to show your drives and their partitions and then use the select command to pick the drive and then the partition. Once in interactive mode, just enter "?" to get help on commands. For example, to set the 2nd partition on my 1st hard drive to be the active one (which means it MUST be a primary partition if you are using the "standard" bootstrap program):

diskpart
?
list disk
select disk 0
list partition
select partition 2
detail partition
?
active
exit

Hard drives are numbered starting from zero. Partition are numbered starting from one. I only showed the "?" command to let you see that the help displayed shows you the commands you can use. The active command is the only one that makes a change, so you might want to play around with the list, select, and detail commands to get comfortable inside diskpart. However, using FDISK from a bootable floppy created by Windows 98/ME might be easier to select which is the active partition. Both diskpart and FDISK will simply update the partition table (also part of the MBR) to indicate which is the current active-marked primary partition (so the bootstrap program knows which bootstrap sector to load from which partition).

Remember that the operating system is not yet loaded. The BIOS bootstrap program (from EEPROM) does it checks (POST), finds the MBR bootstrap program, loads it, passes control to it, and then the MBR's bootstrap program reads the partition table in the MBR to see which one of its 4 entries is marked as active, gets the sector number for the first sector (boot sector) of that active-marked partition, loads that boot program into memory (this boot program is part of the operating system), and then passes control to it. You can use any of the Windows 95/98/ME/NT/2000/XP bootstrap programs. They differ some in size (but all are restricted to 460 bytes, or less) but not in functionality. In fact, those MBR utilities that include the option to insert a working MBR bootstrap program might not even know which operating system is your primary OS.

Note that using FDISK /MBR or FIXMBR will replace the current contents of the 460-byte bootstrap area with a "standard" bootstrap program. This can result in your drive not working anymore if you were infected. A boot virus that replaces the MBR's bootstrap program might also change the relative position of the partition table in the MBR (or even move it into the remainder of track 0). The virus' bootstrap program knows how to find the relocated partition table but the standard bootstrap program will look in the standard location. Since it cannot find the virus relocated partition table, your hard drive's partitions are unusable without resorting to utilities that hunt around for the typical bytes that define the start of a partition (i.e., the recover tool has to rebuild the partition table in the standard location in the MBR by scanning through the hard drive). So be careful why you are using FDISK /MBR or FIXMBR.

.



Relevant Pages

  • Re: Protecting the Operating System
    ... The MBR is not protected if physical ... Regarding point 2, it is very easy to boot up from, say, a known good read- ... Rather than have it load a program that is stored within a partition, use the first track which isn't accessible to any partition. ... MBR bootstrap program reads the partition table to find which partition to boot from. ...
    (alt.computer.security)
  • Re: Mbr messed up?
    ... can't boot up at all after coming out of hibernation. ... Looked at the MBR sector which seems to be ok ... The bootstrap program is in the first 460 ... > program reads the partition table to find out which partition is marked ...
    (microsoft.public.windowsxp.help_and_support)
  • Re: FixMBR says I have on-standard or invalid boot record
    ... This computer appears to have a non-standard or invalid boot record. ... Fixmbr may damage your partition tables if you proceed. ... Are you sure you want to write a new mbr? ... That means a good bootstrap program that looks at the standard offsets will not properly find the start of your partitions. ...
    (microsoft.public.windowsxp.general)
  • Re: Getting to DOS with Grub -- is my linux box fried?!
    ... even the grub> prompt should be smart enough to redirect your grub ... snippet in the mbr to the dos partition. ... suspect the same commands would apply to your case, ...
    (comp.os.linux.setup)
  • Re: will FIXMBR lose track of my data partition?
    ... >and a FAT32 data partition. ... Currently GRUB is installed in the MBR so I ... overwritten to place a standard bootstrap program there. ...
    (microsoft.public.windowsxp.hardware)

Loading