Ask Ubuntu is a question and answer site for Ubuntu users and developers. 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

I have dual boot configured with Windows 7 (32bit) and Ubuntu 12.04(64bit). I installed Ubuntu after windows, now my windows is corrupt due to some virus and I need to reinstall it. Currently when I start my PC, grub loader comes up and I need to select Ubuntu or Windows.

I was wondering how can I install windows again and still have my Ubuntu install? Is there a way to do this?

I do not want to install Ubuntu again and lose my settings and data there.

Thanks, Ketan

share|improve this question
up vote 1 down vote accepted

Point to note: By dual boot you meant Ubuntu not installed by wubi.

Install windows 7 as usual in the same drive as it is now. It will replace the GRUB and ubuntu will not be bootable. But ubuntu isn't deleted. You can recover it using a simple tool boot-repair without complicated commands.

Boot using ubuntu disk after installation of windows 7.

Use boot-repair to perform a Recomemnded Repair . Instructions are here

share|improve this answer
Thanks! I will try that. I hope I can format the drive that has windows? – user108451 Nov 16 '12 at 8:42
yes. Just don't touch linux drives (swap & main directory) – Web-E Nov 16 '12 at 10:36

Short answer yes and no. No you cannot install windows and expect grub to be there with a menu after you have done it.

Yes you can install windows, AFTERWARDS, using the medium you used to install ubuntu, boot to the live CD/USB. And run the grub recovery commands.

I will not clutter this answer with the grub recovery commands as you may not accept this answer.,

It is NOT particularly hard to do.

Good Luck - Mal

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.