1. Computer problem? Tech Support Guy is completely free -- paid for by advertisers and donations. Click here to join today! If you're new to Tech Support Guy, we highly recommend that you visit our Guide for New Members.

Solved: Re-installing Windows While Linux is Installed

Discussion in 'Linux and Unix' started by nuaimat, Jan 13, 2006.

Thread Status:
Not open for further replies.
Advertisement
  1. nuaimat

    nuaimat Thread Starter

    Joined:
    Jan 13, 2006
    Messages:
    7
    Hi everybody

    I have two OS's , Windows XP(C:\) and RedHat Linux 9 (on other partition i think /dev/hda6)


    My Micro$hit windows is 'ill' ,lol , i really can't find another word describing my windows status ...:p


    windows is very slow , no reason as always ..

    I have to Re-Install my Windows XP ..
    I have GRUB and as a default bootloader ..



    My Question is :

    How can i install a fresh copy of Windows on C:\ drive without effecting the MBR (and as a result i cant run GRUB) ... i didn't install Windows yet , i just think it will update the MBR and erase GRUB ?? am i wrong ?

    Thanx in advance
     
  2. jiml8

    jiml8 Guest

    Joined:
    Jul 2, 2005
    Messages:
    2,634
    You can't.

    What you should do is back up your MBR from Linux. This command:

    dd if=/dev/hda of=mbrimage bs=512 count=1

    will do it.

    Also make sure you have a linux boot disk so that you can boot into linux from the boot disk.

    Then, blow off the mbr and replace it with a standard Windows mbr using the windows repair facilities, and repair your Windows installation (if you can).

    After you have repaired your windows system, boot into linux with your boot disk, then execute this command:

    dd if=mbrimage of=/dev/hda bs=512

    and your dual-boot mbr will be rewritten.
     
  3. nuaimat

    nuaimat Thread Starter

    Joined:
    Jan 13, 2006
    Messages:
    7
    Really Thanx for ur fast reply (y)
    i will Do what u have said ...

    but i was wondering (i am curious .. :p )

    isn't 512 in
    "dd if=/dev/hda of=mbrimage bs=512 count=1"
    is a Computer Speicific , depends on my FileSystem ?? or what ? :confused:


    can u explain it please ...
     
  4. jiml8

    jiml8 Guest

    Joined:
    Jul 2, 2005
    Messages:
    2,634
    The master boot record is the first block on the hard drive and is 512 bytes in length. This is pretty much an industry standard and applies to any IDE, SATA, or SCSI HD (also fibre channel, I am pretty sure).

    The MBR is not part of any file system and will be found on every hard drive, whether a boot loader is there or not, because the last 128 bytes is taken up by the partition table.
     
As Seen On
As Seen On...

Welcome to Tech Support Guy!

Are you looking for the solution to your computer problem? Join our site today to ask your question. This site is completely free -- paid for by advertisers and donations.

If you're not already familiar with forums, watch our Welcome Guide to get started.

Join over 733,556 other people just like you!

Loading...
Thread Status:
Not open for further replies.

Short URL to this thread: https://techguy.org/433876

  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice