Super User is a question and answer site for computer enthusiasts and power users. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

Have following problem:

Computer has 3 partitions: windows swap, windows recovery, and 3rd, which currently has linux.

There is grub installed, which lets me choose to run windows recovery, or linux. Both boot fine.

But. I'd like to remove Linux, and use recovery to install windows. When I boot to recovery, and make it install windows, it does so, but after rebooting all I get is:

error: no such partition
grub rescue>

ls shows 3 msdos partitions, but I don't know what to do with it further.

When I did boot Linux rescue, and overwrote first 446 bytes of /dev/sda to remove grub - computer doesn't boot at all.

I do not have any bootable windows disks, just the rescue. I do have another computer I can work on, so I can download stuff from internet if it would help me.

share|improve this question
Which version of Windows? – Majenko Mar 6 '11 at 12:40
It's Windows 7. – user7385 Mar 6 '11 at 16:51
up vote 1 down vote accepted

Firstly you need to put some proper mbr code in the mbr instead of the grub stuff.

Did you install Linux from a live CD (or similar)? If so, it may have the "install-mbr" command available (in Ubuntu it is in the "mbr" package), which can be used to write mbr code that will boot the active partition in the same way as the Microsoft code does. This package is also available on, for example, SystemRescueCD.

Secondly, you need to make sure that the Windows partition is marked as being "active". You can do this by using the "fdisk" program within Linux - it will be installed on any Linux system that you use.

share|improve this answer
Installing Linux + fdisk + mbr program worked like a charm. Thanks. – user7385 Mar 6 '11 at 17:56

Two things I usually recommend for any form of boot problems:

  1. Try booting using Plop -

  2. Always have a copy of Hiren's Boot CD handy - it has most tools you'll ever need -

share|improve this answer
Plop was included on Hiren's Boot CD, but it didn't start. After spending ~ 1 hour of playing with what's on Hiren's I wasn't able to make the computer boot properly, but it looks like quite powerful tool, so maybe it's just that I don't know how to use it. – user7385 Mar 6 '11 at 17:56

You will have to write a new Master Boot Record. Take the Windows installation CD and go to the rescue console. Type fixmbr and fixboot afterwards your windows should boot again.

Just maybe this helps, if you don't have any windows CD at hand. Download the Ultimate Boot CD image and use the testdisk thingy. Take a look at this:

I have never done it though.

share|improve this answer
Read the question - "I do not have any bootable windows disks, just the rescue." - he has no disk. – Majenko Mar 6 '11 at 12:41
Yeah sorry, i just read the beginning of your question and hacked in my answer. But i edited it. I hope it helps. – Darokthar Mar 6 '11 at 12:46

You must log in to answer this question.