Welcome Guest. Sign in or Signup

13 Answers

Did I destroy Windows 7 during failed installation of dual-boot Ubuntu 12.04 with Windows 7?

Asked by: 1635 views , , ,
Ubuntu

Hi there,

I tried to install in my laptop Ubuntu 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:

http://www.linuxbsdos.com/2012/05/17/how-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 runned 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

After 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 desribed 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! :-)

Thanks in advance for your valuable help!

0saves
To have future articles like this delivered automatically to your Feed Reader or Inbox, please subscribe to this blog via RSS or email. For detailed reviews and tutorials, visit LinuxBSDos.com.

13 Answers



  1. aarn on Jun 22, 2012

    Hi Trassos,

    mmmm, you are certainly having a hard time. I understood that there were some compatability problems re. SSDs and linux, but methinks not so big. I don’t know, maybe your O/S is on one SSD, your stick wants to install on the other SSD, that is causing a problem? Anyway, if you get around this, you can later get hold of easyBCD to restore the win MBR as boss of GRUB.

    OK, my recommendations were based on using GUI rather than command-line techniques. I wonder, if your comp. has two SSDs, then I think you will need to know exactly where your win7 O/S is, and where is the ~ 20Gb ‘space’ you have set aside for the installation.

    From the usb stick (ie. before starting your installation), get gparted on the move (summon it via DASH – top left corner of screen, just type gpar… or get a terminal (ctrl + alt + t), type ‘sudo gparted’. Gparted will tell you how all your devices (including the usb stick are labelled).

    When it comes to doing the installation, if you don’t want to go the route I suggested (ie. a screen will come up with three options: ‘install alongside existing O/S’; ‘install [wiping all data]‘; or ‘something else [which is how you do fancy command-line stuff], then you should now know where to place the root [\] partition when prompted. Might have to do some fancy R-clicks on partitions to get the hang of this.

    If all else fails, perhaps do a fresh download of Ub 12.04. I prefer to get images via torrents, sometimes direct downloading from a mirror has a minor break in transmission, and the whole thing is stoofed… If that is still no good, maybe try another linux distribution (www.distrowatch.com). Puppy (lupu.528) is small and runs in memory. And I am just playing with the latest Zorin, which looks very smart! I must admit, I had big problems using linuxmint 13 cinnamon and mate, lubuntu 12 and xubuntu 12…

    There are also the forums (www.ubuntuforums…) where you can tap into the real experts’ knowledge. I’m only a part-timer in Thailand. AA

    0 Votes Thumb up 0 Votes Thumb down 0 Votes



    • aarn on Jun 22, 2012

      Hi Trassos,

      I have just been playing with latest Zorin distribution (am quite partial to the eyerish myself) and it may suit you. It is based on Ub 12.04, and you can select the desktop appearance from Ub, win7 or xp. You can download the 1.3Gb .iso file from distrowatch.com, use the latest unetbootin to put it on your stick. I guess your system is 64bit? Me only 32bit.

      I freed-up a 20Gb unallocated space (in win7) by shrinking the win7 parition (to 180Gb). Also have partition with Ub 12.04 (20Gb). When I booted from the usb with Zorin, clicked on install Zorin icon, then selected ‘install alongside other operating systems’ from three options as per previous posts, there was a seemless, fast installation (on my old machine). Now have a triple O/S system, GRUB is located in the Zorin parition but have used Grub-customizer to default boot into win 7. With a bit of tweaking, I am booting into any partition in ~ 35sec, you should go much faster with 4Gb RAM/SSDs on your machine.

      If an old fart like me can do it, you should have no probs. Good luck, AA

      0 Votes Thumb up 0 Votes Thumb down 0 Votes



  2. Trassos on Jun 21, 2012

    Some more details about my laptop:
    It is a Sony Vaio, Z Series VPCZ13M9E.

    Sorry for not mentioning that earlier.

    0 Votes Thumb up 0 Votes Thumb down 0 Votes



  3. aarn on Jun 19, 2012

    OK, to now install Ub 12.04, download the .iso image (presume you have already done that…) and put it on a usb stick using unetbootin. (latest version is 575, google it, only about 4 Mb opensource file). No need to create ‘persistence’- although unetbootin gives that option.

    Now, remove your usb, and create a space for the dual installation. First, backup all your files. Second, do a disk cleanup then defrag windows. Then go into disk manager (click start, then type in disk – disk manager should be one of the options). Click on your hard disk (normally ‘C’), right click, then select ‘shrink volume’. A box will come up indicating that it is checking the available shrink space – I find 20 Gb (of total 250 Gb hard disk) is plenty. Adjust the shrink space target to 20 Gb, click, then soon you will have created a 20 Gb unallocated/free area (graphically, you can see a green component).

    Shut down windows, insert your usb, on startup bring up your bios (normally hit F12 key whne prmpted – be quick!), and when prompted select ‘boot from usb’ or somesuch. There will be a delay of a few minutes, then Ub should show up. Just select ‘install ubuntu’. After a further delay,there should be three options: install ubuntu alongside current operating systems’, ‘install ubuntu on entire disk’, and ‘something else’. Select the first option, Ubuntu will set itself up in that 20Gb free space, and GRUB will overwrite windows MBR, so that when the installation is complete (could take up to an hour, during which you should be on AC power and access the www.) and you are prompted to remove the usb then restart, as the comp. reboots the grub menu will come up, with Ub 12.04 the default.

    Plenty more tips on getting your machine to boot and run faster, also installing windows MBR (via easyBCD) if you want to over-ride grub. Good luck, AA

    0 Votes Thumb up 0 Votes Thumb down 0 Votes



    • Trassos on Jun 21, 2012

      Dear aarn,
      Thanks a lot for the instructions.
      I followed them precisely (even though what you suggested was very similar to what I had initially done).
      Unfrotunately, I got the same error as I got initially:

      Towards the end of the installation, I got the following message:

      =========================
      Unable to install GRUB in /dev/mapper
      Executing ‘grub-install /dev/mapper’ failed.
      This is a fatal error.
      ==========================

      0 Votes Thumb up 0 Votes Thumb down 0 Votes



      • Trassos on Jun 21, 2012

        …after pressing OK in the above error dialogue box (“Unable to install GRUB in /dev/mapper”), I’m getting an other dialogue box that says:

        ============
        Sorry, an error occured and it was not possible to install the bootloader at the specified location.
        How would you like to proceed?
        -Choose a different device to install the bootloader on:
        [drop-down list]
        -Continue without a bootloader
        -Cancel the installation.
        =============

        In the [drop-down list], I’m getting the following choices:

        =============================
        /dev/mapper/isw_fdjdhbadc_Volume0 Linux device-mapper (striped) (128.0 GB)
        /dev/mapper/isw_fdjdhbadc_Volume0p1 Windows Recovery environment (loader)
        /dev/mapper/isw_fdjdhbadc_Volume0p2 Windows 7 (loader)
        /dev/mapper/isw_fdjdhbadc_Volume0p3
        /dev/mapper/isw_fdjdhbadc_Volume0p5
        /dev/mapper/isw_fdjdhbadc_Volume0p1 Linux device-mapper (linear) (8.5 GB)
        /dev/mapper/isw_fdjdhbadc_Volume0p1 Windows Recovery environment (loader)
        /dev/mapper/isw_fdjdhbadc_Volume0p2 Linux device-mapper (linear) (104.9 GB)
        /dev/mapper/isw_fdjdhbadc_Volume0p2 Windows 7 (loader)
        /dev/mapper/isw_fdjdhbadc_Volume0p3 Linux device-mapper (linear) (100.5 GB)
        /dev/mapper/isw_fdjdhbadc_Volume0p3
        ================================

        What should I do? Any suggestions?

        Note that in the beginning of the installation, I selected 18000 MB for Ubuntu.
        Also I have two SSD disks of 64 GB each.

        0 Votes Thumb up 0 Votes Thumb down 0 Votes



  4. Trassos on Jun 18, 2012

    Thank you all for your help and your suggestions!

    Finally, I managed to recover Windows by following the instructions from this link (I used the command-line stuff because the automated tool didn’t work):

    http://www.howtogeek.com/howto/32523/how-to-manually-repair-windows-7-boot-loader-problems/

    I still haven’t manage to install Ubuntu as dual-boot.
    After having restored Windows 7, I also tried the Ubuntu Windows installer:

    http://www.ubuntu.com/download/desktop/windows-installer

    but even this didn’t work.

    Again, thanks a lot for your answers!

    0 Votes Thumb up 0 Votes Thumb down 0 Votes



  5. aarn on Jun 14, 2012

    If you have a toshiba laptop, try holding down the 0 (zero, nil) key before you turn the power on, and keep it held down (make take some minutes!). On some tosh laptops, this will boot you into emergency recovery mode, you can reinstall win7 back to factory state, then create empty space and install your linux system there.

    Otherwise, looks like you have to put ubuntu 12.04.iso on a usb stck (use unetbootin,some of the other usb-maker tools are unreliable (in my experience)], and install. Later you can download the free Win 8 preview (just google it, can also install from usb stick if your laptop has > 1200×600 screen resolution), and have a play with it… Good luck, AA

    0 Votes Thumb up 0 Votes Thumb down 0 Votes



    • finid on Jun 14, 2012

      That is assuming that the Toshiba lappy is running an OEM installation of Windows. Otherwise, there will likely be no recovery partition to recover with.

      0 Votes Thumb up 0 Votes Thumb down 0 Votes



  6. finid on Jun 13, 2012

    Long problem this is.

    Question:

    Did you install Ubuntu with the Alternate CD installation image?

    Looks likely, if a device is named /dev/mapper/isw_fdjdhbadc_Volume0

    In any case, I think plenty of damage has been done. My best suggestion is to reinstall Ubuntu. But this time, use the ISO image with the graphical installer.

    During installation, opt for manual disk partitioning, create the partitions, then install GRUB in the MBR (the default). After successful installation and reboot, you should see a GRUB menu with an entry for Ubuntu and Windows.

    Try booting into both. If you can boot into Windows, you would need to install EasyBCD to restore the Windows boot loader to the MBR.

    You may download EasyBCD from http://neosmart.net/download.php?id=1 .

    this article should help in restoring the boot loader

    0 Votes Thumb up 0 Votes Thumb down 0 Votes



    • Trassos on Jun 21, 2012

      Dear finid,
      sorry I had missed this question.

      1) I have created bootable USB stick and run the installation from there. I followed these instructions:

      http://www.ubuntu.com/download/help/create-a-usb-stick-on-windows

      2) I’m not sure how to do what you suggest “install GRUB in the MBR (the default).”
      Can I do what you suggest with some appropriate selection after the grub install error?
      As I described previously, after the error I’m getting the message:

      ============
      Sorry, an error occured and it was not possible to install the bootloader at the specified location.
      How would you like to proceed?
      -Choose a different device to install the bootloader on:
      [drop-down list]
      -Continue without a bootloader
      -Cancel the installation.
      =============

      Does your suggestion correspond to an item from the [drop-down list] (see my other answer the choices of this list)?

      Thanks a lot!

      0 Votes Thumb up 0 Votes Thumb down 0 Votes



  7. Trassos on Jun 11, 2012

    (this is not an answer – just a clarification to my question):
    Let me clarify that I’m getting the following error when I open my laptop:

    “Operating System Not Found”

    0 Votes Thumb up 0 Votes Thumb down 0 Votes



    • finid on Jun 13, 2012

      Try the above suggestion. Keep us posted about your progress.

      0 Votes Thumb up 0 Votes Thumb down 0 Votes