1

I used to dual boot windows 10(recently upgraded from windows7) and elementary os luna. Windows is installed on my C drive, and Luna was installed on a partitioned D drive (i splitted 100GB for elementary).

Tody i decided to install the new Elementary OS Freya,so what I did was, - first I created a bootable usb using Rufus (i didn't use this program when i installed the luna version but I'm unsure if that's the problem) - then, i went into bios to change the boot priorities to boot the usb. - I booted into the grub menu and chose 'install elementary os' - so everything seemed fine until i reached the 'installation type' point - i checked 'something else' - Oringally, Luna was installed on sda5, so I formatted sda5 and installed it there - after the installation, the laptop rebooted and i can no longer boot into windows or elementary os. I tried changing my boot priorities in bios but it still resulted in grub rescue.

Is there anyway that I can boot into windows through the grub rescue or do i need to create a gparted usb to fix it?

migrated from askubuntu.com Aug 24 '15 at 3:20

This question came from our site for Ubuntu users and developers.

1

Why this has happened

I am no expert but from what I understand I think this issue is caused by a mistakenly placed bootflag. Whenever you are installing a linux OS for dual booting you want to make sure the bootloader is installed on dev/sda (i installed it on dev/sda5 which is probably why i got the grub rescue error)

To fix this (it worked, at least for me)

in short answer:

  • completely remove your linux

  • change the bootflag back to windows bootloader

  • run boot-repair

------------------------- your should be able to boot back into windows at this point ---------------------------

  • change your no longer needed linux partition into free unallocated space

  • try to reinstall your linux again on that free unallocated space

in long answer:

  • first, try to install the boot repair on your usb. The disk image can be found on this link: https://help.ubuntu.com/community/Boot-Repair

  • change your bios settings so you can boot into your usb

  • use the uninstall OS tool to uninstall your unbootable linux (in my case is elementary os)

  • use gparted to set the bootflag back to your Windows OS (just set it to the partiton which literally says OS)

  • use the boot-repair tool which will further ensure everything is back to normal

  • you should then be able to successfully boot back into you windows the next time you restart your computer

  • use the windows disk management tool to delete the no longer needed linux partition so it becomes unallocated space

  • get the partition wizard: http://www.partitionwizard.com/free-partition-manager.html and use it to extend your D drive or C drive with that unallocated space.

  • Go back to windows disk management tool and shrink D drive or C drive by the amount of space you want to give your linux (they should ask you to enter a number). this step might not be needed if you can just change the unneeded linux space into freespace.

  • The previous three steps was done to reset the 'unbootable linux partition' back to freespace which can then allow you to freshly install on it again. However I think there might be a quicker way to skip the extending part and just changing the unbootable linux partition into freespace with a click

  • After fixing the bootloader and allocated the spaces required for your next attempt on installing linux, you can finally try to reinstall your linux again

  • reboot into your usb and install the OS on your freespace (e.g. dev/sda6) but this time make sure you choose the correct place of where the bootloader is placed. (i chose dev/sda on my successful attempt and it worked like a charm).

a possibly quicker fix

  • since this problem is probably caused by bootflag, the complete removal of linux might not be needed. Instead you can just change where the bootflag is suppose to be.
1

I found it easier to install Ubuntu alongside, after this grub is set up properly with all systems listed (Win, Elementary, Ubuntu) in the menu. (Then you can delete Ubuntu partitions since you no longer need it)

0

Once you have booted into your OS run this in terminal

  • connect to the Internet

  • open a new Terminal, then type the following commands (press Enter after each line):

    sudo add-apt-repository ppa:yannubuntu/boot-repair
    sudo apt-get update
    sudo apt-get install -y boot-repair && boot-repair
    

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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