• We’re currently investigating an issue related to the forum theme and styling that is impacting page layout and visual formatting. The problem has been identified, and we are actively working on a resolution. There is no impact to user data or functionality, this is strictly a front-end display issue. We’ll post an update once the fix has been deployed. Thanks for your patience while we get this sorted.

How to restore a WinXP boot sector?

absinthe

Senior member
Ok, I can't for the life of me recall the best way to do this:

I have Linux (FC) on a 20 GB hard drive and WinXP on a 120 GB drive. I've now purchased a 160 GB drive to replace the 20 GB drive, which means my Linux install is basically going to have to go for now .

My computer is set up to boot from Grub on the 20 GB drive, where I get the usual Fedora/Windows selection. My Windows drive (the 120 GB) has a rather complex partition scheme. Obviously, I can't just pull out the 20 GB drive as the computer won't be able to find GRUB.

How can I restore the computer to simply boot straight to Windows on the 120 GB drive, and without screwing up my Windows partitions? Will using the DOS "fdisk /MBR" allow this?
 
Without knowing more about your "complex partition scheme", you should be able to just run through the XP repair process after you move your 120GB drive to the master (assuming you do make it master, otherwise things will be more complicated). XP repair should replace NTLDR and NTDETECT, and add a boot.ini.

 
Thanks for the replies. Just to note, the 120 GB drive containing XP already is the master. The little 20 GB drive containing Linux and Grub is a slave on IDE2. If I'm correct, the way things work is: computer sees boot sector on 120 GB drive, which points to Grub on the 20 GB drive, and Grub gives option of which OS to boot. Isn't that how it normally works with this kind of setup? So basically I just want to the computer to boot to the same drive (120 GB), but instead of pointing to Grub to just go ahead and boot Windows.

Guess I'll have to reinstall Fedora from scratch again, tho. Bummer.

-abs
 
Just copy the fedora partitions on your 20 gig drive over to the 120gig drive. It depends on where grub is located, on the actual fedora partition, like hdb1, or the hdb itself. If it's installed on hdb1 I think you can just physically copy over all the contents of the 20 gig drive, either using linux natively, or something like partition magic to handle it for you. Partition magic's boot magic might also help, but I try to avoid it in general.

You can do all this through your linux currently I think, including making any grub configuration file changes, I could be and probably am wrong on this, but it's worth a try, doing a fresh install is a pain.
 
Originally posted by: h2
Just copy the fedora partitions on your 20 gig drive over to the 120gig drive. It depends on where grub is located, on the actual fedora partition, like hdb1, or the hdb itself. If it's installed on hdb1 I think you can just physically copy over all the contents of the 20 gig drive, either using linux natively, or something like partition magic to handle it for you. Partition magic's boot magic might also help, but I try to avoid it in general.

You can do all this through your linux currently I think, including making any grub configuration file changes, I could be and probably am wrong on this, but it's worth a try, doing a fresh install is a pain.
Now that is something I hadn't considered. I believe GRUB is on hdb1, in fact. Still not sure how I would get the boot sector to point to the newly relocated partition(s), though.

And you're right on about Partition Magic. I find that it really screws things up when dealing with Linux. I try to abide by advice that was given to me long ago: when dealing with Windows partitions, using Windows tools; when dealing with Linux partitions, use Linux tools.

Thanks for the idea. I'm going to give that a try ...

-abs
 
As I see it, you won't have to change much, if this works:
create partitions on 120 gig drive using fdisk or whatever, to replicate your current structure on 20 gig drive.
copy over all of linux to correct partitions.
remove 20gig drive, replace with 120 gig drive.

see if it boots normally. If it does you're done. Since the 120 will also be hdb, and your linux will still be on hdb1, your boot parameters shouldn't have changed. However, I don't know this, if you try and it works we'll both know 🙂

By the way, I've seen the same pretty serious problems using partition magic and native Linux partitioning tools, especially the newer graphic installer paritioning tools, can't remember it's name since I only see it on installing Yoper.
 
Hey h2,

Thanks for the idea, but unfortunately my Linux partitions were too big to move anywhere.

I just used a bootable floppy, typed "FDISK /MBR," and it worked like a charm. Windows now boots with no problem.

But here's a thought: I now possess a 20 GB hard drive (which I'm not using) with a perfect Linux install on it. Is there some way, if I hold onto the drive, that I could install it in some other machine later on down the road and get it to boot?

Just a thought 🙂

Thanks,

-abs
 
Back
Top