LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   General (https://www.linuxquestions.org/questions/general-10/)
-   -   Need Help to install WindowsXP without removing Fedora (https://www.linuxquestions.org/questions/general-10/need-help-to-install-windowsxp-without-removing-fedora-583944/)

amrapali_bs 09-11-2007 01:31 PM

Need Help to install WindowsXP without removing Fedora
 
Hi All,

Here is my problem.
I have Windows XP and Fedora Core6 on my desktop.

Windows has got some virus, bcoz of which it keeps on restarting infinitely.
So want to format Windows and install it again.
When I try to boot WindowsXP bootable cd. It goes to the screen "Setup checking Hardware config"...and thats it...a black screen...it doesn't move forward.

From the other threads, I got to know abt formatting the complte harddisk with

dd if=/dev/zero of=/dev/hda bs=512 count=16

And then installing Windows followed by FC6

However, I dont wish to lose data on other Windows prtitions ( D & E) also dont wish to remove FC6 for the same.

Can someone please help, How I can format C drive and reinstall Windows.

blackhole54 09-11-2007 07:20 PM

One option would be to use a program like partimage to save images of the other partitions, do the dirty work you need to do to reinstall XP, recreate the other partitions and restore them from their images. If you do this, you do need to make sure that the partitions you are restoring to are at least as large as the original partitions.

You will need to find someplace to store the images. You can save them across a network if you have another computer that has room.

Jorophose 09-11-2007 07:22 PM

You're probably going to have to resort to backing everything up, wiping the hard drive, and then reinstalling XP and then Fedora.

That's what you get for XP's lammo habbits. =/

Wim Sturkenboom 09-11-2007 11:30 PM

I think your problem lays somewhere else. Booting from the XP CD should work.

Formatting the whole HD sounds like overkill to me, but I might be wrong. You can try to remove the C-partition from within Linux and next try to install XP in the free space. Afterwards you can re-install Grub in the MBR (no experience with that).

PS Make backups if the data is important. A power failure or one little mistake by you or XP and it might all be gone.

amrapali_bs 09-12-2007 01:35 AM

Guys, thanks a lot for the replies..

The XP cd doesn't boot at all while Fedora is there...

So, even if I format C partition, keeping the Fedora, XP cd still might not boot...
On the other hand...if I cud have got the XP cd booted...i cud have formatted the C partition from there also...no need to format it from Linux.

So to get the XP cd working I guess I will have to format the linux partitions atleast...

blackhole54 09-12-2007 06:16 AM

Quote:

Originally Posted by amrapali_bs (Post 2889369)
So to get the XP cd working I guess I will have to format the linux partitions atleast...

The instructions you found on the Internet wipe out (well, actually fill with zeros) the first 16 sectors of your disk, including the MBR, but do not touch your partitions per se. However, it does wipe out the partition table, which appears to make the partitions (Linux and otherwise) disappear. You could try using dd to save the partition table first, zero the first sixteen sectors and re-write the partition table, and see if it works. But before you try anything like that, you really should back up anything of value .

amrapali_bs 09-15-2007 07:52 AM

Can you please tell me how to use dd to save the partition table ?

blackhole54 09-16-2007 02:18 AM

Just in case I screw up the offsets or something, or you make a typo, I would recommend first saving the whole MBR. If you have that, then you are guaranteed not to have lost the partition table. (Yes, we all make mistakes! :) ) I am assuming below that your primary drive is /dev/hda. (If it is /dev/sda or something, just adjust the commands accordingly.)

Code:

dd if=/dev/hda bs=512 count=1 > filename.MBR
Choose the filename you want and prepend a path if you wish. Just make sure you get it someplace safe, such as a floppy or flash drive.

Then to copy just the partition table:

Code:

dd if=/dev/hda bs=1 count=64 seek=446 > filename.pt
To restore just the partition table:

Code:

dd if=filename.pt of=/dev/hda bs=1 skip=446
Setting both the input and output block size (bs) to 1 in both cases may be a bit inelegant, but it should get the job done.


All times are GMT -5. The time now is 09:43 AM.