What is best way to fix MBR in XP?

A

Al Smith

My question is: What is the fastest, easiest, most reliable way to
restore the MBR of the C drive to its Windows XP state?

Last night I went through one of my periodic attempts to use
Linux. Installed Ubuntu, didn't like it, decided to install
Mandrake again just to take another look at it, so installed it
over the drive that had Ubuntu on it. Didn't like Mandrake,
decided to go back to only Windows XP on that computer.

And there is the problem. I had a devil of a time getting my
Windows XP master boot record (MBR) back to its normal state so
that I could boot directly into Windows without passing through
Grub or LILO (the Linux boot loaders).

I finally had to fall back on a mirror of my C drive, made just
before this little exercise in frustration, with Drive Image 7.
Worked like a charm. It has a provision for fixing the MBR during
the restore.

Things I tried:

-- Booting from Windows 98 Startup disk and running "fdisk /mbr"
command. Didn't work, probably because the floppy couldn't access
the NTFS file system of my C drive. I couldn't get to C to run the
command.

-- Booting from Windows XP CD, going into repair console, running
"fixmbr" command from command line. Didn't work. I thought it
worked. It *said* it worked, but when I rebooted, there was Grub,
laughing at me.

-- After installing Mandrake over Ubuntu, I tried removing LILO
using the "lilo -u /dev/hda" command from the command line in
Mandrake running as root. This worked fine, but brought me back to
Grub, which I don't know how to remove. I wanted to go back to the
Windows MBR.

What is the best way of getting the MBR back to its original
state, after you play around with Linux distros?
 
W

WTC

Al Smith said:
My question is: What is the fastest, easiest, most reliable way to restore
the MBR of the C drive to its Windows XP state?

Last night I went through one of my periodic attempts to use Linux.
Installed Ubuntu, didn't like it, decided to install Mandrake again just
to take another look at it, so installed it over the drive that had Ubuntu
on it. Didn't like Mandrake, decided to go back to only Windows XP on that
computer.

And there is the problem. I had a devil of a time getting my Windows XP
master boot record (MBR) back to its normal state so that I could boot
directly into Windows without passing through Grub or LILO (the Linux boot
loaders).

I finally had to fall back on a mirror of my C drive, made just before
this little exercise in frustration, with Drive Image 7. Worked like a
charm. It has a provision for fixing the MBR during the restore.

Things I tried:

-- Booting from Windows 98 Startup disk and running "fdisk /mbr" command.
Didn't work, probably because the floppy couldn't access the NTFS file
system of my C drive. I couldn't get to C to run the command.

-- Booting from Windows XP CD, going into repair console, running "fixmbr"
command from command line. Didn't work. I thought it worked. It *said* it
worked, but when I rebooted, there was Grub, laughing at me.

-- After installing Mandrake over Ubuntu, I tried removing LILO using the
"lilo -u /dev/hda" command from the command line in Mandrake running as
root. This worked fine, but brought me back to Grub, which I don't know
how to remove. I wanted to go back to the Windows MBR.

What is the best way of getting the MBR back to its original state, after
you play around with Linux distros?


Run recovery console, then at the command prompt type

fixmbr

Description of the Windows XP Recovery Console
http://support.microsoft.com/default.aspx?scid=kb;en-us;314058

How to install and use the Recovery Console in Windows XP
http://support.microsoft.com/default.aspx?scid=kb;en-us;307654
 
A

Al Smith

-- Booting from Windows XP CD, going into repair console, running "fixmbr"
Run recovery console, then at the command prompt type

fixmbr

Guess you didn't read all of my admittedly long post. I did the
"fixmbr" thing. It seemed to work. It didn't.
 
S

Steve N.

Al said:
My question is: What is the fastest, easiest, most reliable way to
restore the MBR of the C drive to its Windows XP state?

Last night I went through one of my periodic attempts to use Linux.
Installed Ubuntu, didn't like it, decided to install Mandrake again just
to take another look at it, so installed it over the drive that had
Ubuntu on it. Didn't like Mandrake, decided to go back to only Windows
XP on that computer.

And there is the problem. I had a devil of a time getting my Windows XP
master boot record (MBR) back to its normal state so that I could boot
directly into Windows without passing through Grub or LILO (the Linux
boot loaders).

I finally had to fall back on a mirror of my C drive, made just before
this little exercise in frustration, with Drive Image 7. Worked like a
charm. It has a provision for fixing the MBR during the restore.

Things I tried:

-- Booting from Windows 98 Startup disk and running "fdisk /mbr"
command. Didn't work, probably because the floppy couldn't access the
NTFS file system of my C drive. I couldn't get to C to run the command.

Using this method you don't run FDISK from C: you run it from A:. If
FDISK is not on A: then of course it won't work, as you've found. You
need not just simply a Win98 bootable diskette but one containing FDISK.
-- Booting from Windows XP CD, going into repair console, running
"fixmbr" command from command line. Didn't work. I thought it worked. It
*said* it worked, but when I rebooted, there was Grub, laughing at me.

I'm not real familiar with recent incarnations or GrUB but it may be
doing something with the boot sector as well as the MBR. Try FIXBOOT to
fix the boot sector then FIXMBR to fix the MBR.
-- After installing Mandrake over Ubuntu, I tried removing LILO using
the "lilo -u /dev/hda" command from the command line in Mandrake running
as root. This worked fine, but brought me back to Grub, which I don't
know how to remove. I wanted to go back to the Windows MBR.

Of course it didn't work. LILO and GrUB are not the same boot loader. If
you're using GrUB how will issuing a command to remove LILO do any good?
What is the best way of getting the MBR back to its original state,
after you play around with Linux distros?

I have always booted a Win98 floppy and run FDISK /MBR from there. Never
had it fail yet.

Steve
 
W

WTC

Al Smith said:
Guess you didn't read all of my admittedly long post. I did the "fixmbr"
thing. It seemed to work. It didn't.


Sorry about that, it always work for me when removing the GRUB boot loader.
 
A

André Gulliksen

Al said:
What is the best way of getting the MBR back to its original
state, after you play around with Linux distros?

Try this:

Make sure the partition containing your Windows XP installation is active.
To do this you need some sort of third party partition manager. PQMagic
probably works if you have it, any fdisk/gfdisk/whatever you have on your
Linux CDs might work. Alternatively you might want to make yourself an
MS-DOS/Win9x boot floppy and throw http://www.ranish.com/part onto it. It
has worked wonders for me in the past.

Now, if you are absolutely positively sure that your C: partition (or
wherever your Windows boots from) is the one and only[1] active partition,
fire up your recovery console. Now you type two commands: 'fixboot',
followed by 'fixmbr'. Now reboot, cross your fingers, and feel very free to
post here if it worked.

[1] This is important. I have seen partition managers that allows you to
have multiple active partitions, with the result that the BIOS totally
freaks out on you when you try to boot.
 
A

Al Smith

What is the best way of getting the MBR back to its original state,
Sorry about that, it always work for me when removing the GRUB boot loader.

I've been reading up on the question since posting here. It seems
that running "fixmbr" from the XP recovery console works in normal
situations, but if there is something abnormal going on, it may
not work. This was true in my own case.

When I tried to reformat the drive I had installed Ubuntu and then
Mandrake on using Partition Magic 8, I got a bad something or
other message. Partition Magic just refused to reformat it. So did
the Maxell install and diagnostic boot floppy. I was only finally
able to get the drive formatted again when I noticed that
something I had done had caused it to be recognized in Windows XP.
I was able to format the drive to NTFS from within Windows XP (it
was another drive, not the boot drive).

I figure whatever screwed up the drive was responsible for the
"fixmbr" command not working. For a while there I thought the
Linux install had trashed my harddrive and made it unusable.
 
A

Al Smith

Now, if you are absolutely positively sure that your C: partition (or
wherever your Windows boots from) is the one and only[1] active partition,
fire up your recovery console. Now you type two commands: 'fixboot',
followed by 'fixmbr'. Now reboot, cross your fingers, and feel very free to
post here if it worked.

[1] This is important. I have seen partition managers that allows you to
have multiple active partitions, with the result that the BIOS totally
freaks out on you when you try to boot.

Thanks, I'll remember. I think my problem was that I installed
Ubuntu with Grub, then on top of it installed Mandrake with LILO.
LILO came off just fine with the remove command that it has, but
naturally it restored Grub instead of the Windows MBR. Somehow
that process screwed up the formatting of the drive I put them on.
Partition Magic offered to fix a problem. I let it. Probably a
mistake on my part, since it would not reformat the drive after
that. Very messy situation. I got my MBR restored by replacing my
entire C drive with a mirror, and was able finally to format the
other drive from within XP. It will be a while before I play with
Linux again.
 
B

BBUNNY

Al Smith wrote:
||| -- Booting from Windows XP CD, going into repair console, running
||| "fixmbr"
|||| command from command line. Didn't work. I thought it worked. It
|||| *said* it worked, but when I rebooted, there was Grub, laughing at
|||| me.
||||
|||| -- After installing Mandrake over Ubuntu, I tried removing LILO
|||| using the "lilo -u /dev/hda" command from the command line in
|||| Mandrake running as root. This worked fine, but brought me back to
|||| Grub, which I don't know how to remove. I wanted to go back to the
|||| Windows MBR.
||||
|||| What is the best way of getting the MBR back to its original
|||| state, after you play around with Linux distros?
||
||
||
|| Run recovery console, then at the command prompt type
||
|| fixmbr
|
| Guess you didn't read all of my admittedly long post. I did the
| "fixmbr" thing. It seemed to work. It didn't.

No need to go the Rube Goldberg route. Since you are able to post
here go to www.bootdisk.com download the win98 custom boot disk.
Place a good formated diskette into a:, click the boot98sc.exe file when
it is
finished doing its thing. Reboot (I would think that your BIOS is set
to
floppy, cdrom, hard disk)
a:\fdisk /mbr
It always works for me.
 
D

DanS

My question is: What is the fastest, easiest, most reliable way to
restore the MBR of the C drive to its Windows XP state?

Last night I went through one of my periodic attempts to use
Linux. Installed Ubuntu, didn't like it, decided to install
Mandrake again just to take another look at it, so installed it
over the drive that had Ubuntu on it. Didn't like Mandrake,
decided to go back to only Windows XP on that computer.

<SNIP>

I was wondering, what was it about those 2 different Linux distribution's
that you were able to decide you didn't like either of then in one evening
?
 
A

André Gulliksen

Al said:
Thanks, I'll remember. I think my problem was that I installed
Ubuntu with Grub, then on top of it installed Mandrake with LILO.

Not likely. The simple fixes (fixmbr and 'fdisk /mbr') both offer simple
ways to reset the MBR. Installing Grub probably put Grub on the MBR, and
then later you got LILO on the MBR. Either way the simple fixes should have
worked, since they don't really care what the MBR contains in the first
place. You are probably looking at another source of error, such as C: not
being active.
 
A

Al Smith

Last night I went through one of my periodic attempts to use
<SNIP>

I was wondering, what was it about those 2 different Linux distribution's
that you were able to decide you didn't like either of then in one evening
?

Mostly just a matter of them not being compatible with my
hardware. Ubuntu wouldn't recognize my modem. That means no
Internet, which is a deal breaker for me. Mandrake wouldn't
recognize my modem (Linux never recognizes Winmodems) or my sound
card -- double deal breaker.

I like Linux as far as the look and feel go, but until some distro
comes out that recognizes all the hardware on my computers, I
won't use it.
 
A

Al Smith

Guess you didn't read all of my admittedly long post. I did the
| "fixmbr" thing. It seemed to work. It didn't.

No need to go the Rube Goldberg route. Since you are able to post
here go to www.bootdisk.com download the win98 custom boot disk.

I'll download it right now. Seriously, looks like it might be
useful. :)
 
B

BBUNNY

Al Smith wrote:
||| Last night I went through one of my periodic attempts to use
|||| Linux. Installed Ubuntu, didn't like it, decided to install
|||| Mandrake again just to take another look at it, so installed it
|||| over the drive that had Ubuntu on it. Didn't like Mandrake,
|||| decided to go back to only Windows XP on that computer.
||
|| I was wondering, what was it about those 2 different Linux
|| distribution's that you were able to decide you didn't like either
|| of then in one evening ?
|
| Mostly just a matter of them not being compatible with my
| hardware. Ubuntu wouldn't recognize my modem. That means no
| Internet, which is a deal breaker for me. Mandrake wouldn't
| recognize my modem (Linux never recognizes Winmodems) or my sound
| card -- double deal breaker.
|
| I like Linux as far as the look and feel go, but until some distro
| comes out that recognizes all the hardware on my computers, I
| won't use it.

That is the idea behind Linux especially Debian based it is free and
hardware that needs non-free software to be usable is not usable
with Linux. (exception: paid for distributions)
 
S

Steve N.

Al said:
Mostly just a matter of them not being compatible with my hardware.
Ubuntu wouldn't recognize my modem. That means no Internet, which is a
deal breaker for me. Mandrake wouldn't recognize my modem (Linux never
recognizes Winmodems) or my sound card -- double deal breaker.

I hear you on the winmodem, I went with an external modem for this
reason (serial not USB). All OSes recognize an external modem. Winmodems
are not true modems anyway, they are telephone interfaces to the CPU and
use CPU cycles to do their job.

What sound card do you have?
I like Linux as far as the look and feel go, but until some distro comes
out that recognizes all the hardware on my computers, I won't use it.

To be honest, I haven't been real impressed with any Linux distros I've
tried since Red Hat 7.2.

Steve
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top