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 tried to install in my laptop 12.04 so that I can dual-boot with Windows 7. I made some mistakes during this process and I didn't manage to install Ubuntu. But my real problem now is that I'm afraid that I also destroyed the installation of Windows 7. Your help would be precious for me.

Here are the details of what I did:

1.) I followed these instructions to dual boot Ubuntu 12.04 and Windows 7.

The only difference from what is described above, is that in my case the device names where:

/dev/mapper/isw_fdjdhbadc_Volume0* instead of /dev/sda*

Note that I had created a bootable USB stick to do that.

2.) The installation proceeded normally, but in the end I got a fatal error because the grub-install failed.

3.) Then, after Googling this problem, I run Ubuntu from the USB stick and run this command:

sudo grub-install --root-directory=/home/ubuntu/temp /dev/mapper/isw_fdjdhbadc_Volume0p5

(/isw_fdjdhbadc_Volume0p5 was the partition that I had made for /boot) but this command also failed.

4.) Then, I did something stupid (I think): I run the above command as:

sudo grub-install --root-directory=/home/ubuntu/temp /dev/mapper/isw_fdjdhbadc_Volume0

namely I tried to install grub in the device isw_fdjdhbadc_Volume0 instead of the boot partition isw_fdjdhbadc_Volume0p5

The above command did not fail and was executed OK.

5.) After that, I tried to boot my laptop, but it seemed that I had no operation system. Not even Windows were detected.

6.) I thought that I should uninstall grub from isw_fdjdhbadc_Volume0. So following some online instructions that I found, I booted again Ubuntu from the USB stick and run the following command (this was stupid since the instructions were for a totally different case than mine):

sudo dd if=/dev/zero of=/dev/mapper/isw_fdjdhbadc_Volume0  bs=446 count=1

Afte that, I was still unable to boot Windows. I realize that I deleted something that I shouldn't, but I'm hope that this is not crucial and I can recover somehow.

When I boot Ubuntu from the USB, I can see that the partition with Windows is still there, with all the directories, Windows files, my data etc.

So, my question is: Is there a way to undo the mistakes that I described above and recover Windows 7? This is my major question. After solving that, I'd also like to know what I did wrong with the installation of Ubuntu.

share|improve this question

Boot from Windows Installation disk and use the instructions given here.

share|improve this answer
sriram pandey, thanks a lot for your link! Let me clarify that I'm getting the following error when I open my laptop: "Operating System Not Found" Do you think that this case needs a different treatment than what is described to the link you sent (where the reported error is “BOOTMGR is missing”)? Another question: It would be great if you could help me understand the following: By using the "dd" command, did I delete crucial data from the windows partition, or from somewhere else (that can be recovered)? – Tassos Jun 11 '12 at 18:52
If you follow these directions, you will not make it worse. If your description is ok. – Anders Jun 12 '12 at 17:02
Hi all, Finally I solved the problem and managed to recover Windows 7. I followed the instructions from the link of siriam pandey. I first tried the "Automated Startup Repair" as suggested in this link but it didn't work. Then, I tried the command-line stuff and it worked! Thank you for your help and suggestions!! – Tassos Jun 18 '12 at 13:44

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.