Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

I had a dual boot with Ubuntu 13.04+ Windows 8, Windows 8 being the primary system. I decided I don't need Ubuntu at the moment, so I wanted to uninstall it. Here are the steps I took.

  • Used EasyBCD to write Windows into the MBR
  • Deleted the Linux partitions, and expanded my C:\ drive to take the free space

After doing these steps, my Windows HDD was back to normal, and I had more GB's as expected. When I tried to reboot, I get the error: no such partition, with a grub command prompt. I'm assuming this is because my computer had grub as the default bootloader set, and since I erased Ubuntu, it doesn't know what to do. How do I boot back into Windows? I don't have access to my Windows 8 disk, but I do have a USB key with Ubuntu 13.04 live on it.

share|improve this question
    
@qeezanansa yeah it might be more of a Windows question, but I posted here thinking someone might know how to set the boot order from an Ubuntu Live CD –  Carpetfizz Aug 11 '13 at 3:34
3  
IMHO, it's an Ubuntu question, because it's a problem created by Ubuntu -- namely, by the way Ubuntu configures GRUB to be reliant on an Ubuntu partition, which means that the system becomes unbootable if Ubuntu is removed. –  Rod Smith Aug 11 '13 at 3:46
add comment

2 Answers

The answer depends on whether the system was booting with BIOS or with EFI. vfbsilva's answer might work with BIOS-based computers. (It definitely works with old versions of Windows, but I'm not sure if the same procedure works with Windows 8.)

The vast majority of new computers that ship with Windows 8 are EFI-based. On such a computer, you need to restore the Windows boot loader to be the primary one and/or delete GRUB from the EFI System Partition (ESP). You can set the Windows boot loader to be the primary one in various ways, but unfortunately, they all take a lot of explaining and/or are tricky to do. Deleting GRUB from the ESP is relatively easy to explain, so I'll do that:

  1. Boot a Linux live CD.
  2. Identify your ESP by typing sudo parted /dev/sda print and locating the partition with the "boot flag" set.
  3. Mount the ESP by typing sudo mount /dev/sda1 /mnt (substituting the correct device identifier for /dev/sda).
  4. Type sudo rm -r /mnt/EFI/ubuntu to remove Ubuntu's version of GRUB. If you've manually installed GRUB somewhere else, remove it instead of or in addition to Ubuntu's GRUB.
  5. Reboot.

When you reboot with GRUB absent, the computer will bypass that no-longer-functional entry and use the next one in its list, which should be the Windows boot loader.

A caveat: If you've used Boot Repair, you may need to re-run it and use its advanced options to undo its renaming operations. If you fail to do this, you'll end up still running your non-functional GRUB.

share|improve this answer
1  
well placed commend about EFI, just a side note it does work with BIOS based PCs. –  vfbsilva Aug 11 '13 at 4:11
1  
Hi, thanks for the answer. I'm going to try it now. A quick question. I did remember using a Boot Repair utility because I wasn't able to select Windows 8 after installing Ubuntu, in the menu. However, I can't remember how to reinstall it. Can you please tell me where to download this from again? –  Carpetfizz Aug 11 '13 at 4:55
    
Never mind, it's just called Boot-Repair –  Carpetfizz Aug 11 '13 at 5:24
    
Ok, so I'm getting the same error when I try to boot the Live USB. Kinda freaking out right now... –  Carpetfizz Aug 11 '13 at 6:05
1  
Then chances are you're not actually booting the live USB. You may need to hit Esc or a function key soon after you power on to get to your firmware's boot manager in order to explicitly select the live USB. You may also need to disable Secure Boot to get into the live USB. –  Rod Smith Aug 11 '13 at 16:41
show 3 more comments

Go to the windows cd, repair and in a command shell do fdisk /mbr the grub is still there in mbr but no longer finds it files which were inside the ubuntu partition.

fdisk /mbr

Will fix the windows loader writting it to the mbr.

share|improve this answer
add comment

Your Answer

 
discard

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.