2

I had Linux Ubuntu and Windows dual booting from my computer. I used partition manager to remove the Linux Ubuntu partitions, now I can't get into Windows.

The machine loads in to a command prompt ( GRUB )

I think I may need to remove GRUB from the MBR and install windows Boot loader using the windows repair option

Could you please tell me how to do it ?

Furthermore, I have Windows7 Ultimate installed in the machine. Ihave lost the CD and now I have Windows7 Home Premium.

5

I think Google may have got you this answer quicker :)

Boot from the Windows 7 CD/DVD you have and choose the repair option when asked. No problems will be found, but when asked select 'command prompt' and then enter the following

bootrec /fixmbr
bootrec /fixboot

Give your machine a reboot and hey presto, you're back to booting straight into Windows without GRUB.

  • 2
    I believe you need a space before the /. However, I could be wrong. – dotVezz Nov 4 '13 at 13:47
  • Well spotted, that'll teach me - Thanks @dotVezz - I've edited the answer – sgtbeano Nov 4 '13 at 13:55
2

While @sgtbeano already answers the question, I'd like to provide some information on why this happens.

When you have a dual-boot for linux & windows, then it's linux bootloader, that's loaded when you start the computer.

Now when you un-install linux, that bootloader is gone and hence, you need to rebuilt/re-instantiate the windows bootloader.

But now, another question can be Can I ignore doing it and instead use windows 7 bootloader in the dual-boot

The answer is simply NO, you can't use windows bootloader because it doesn't recognize the linux system/os. It's also the major reason why we install linux after windows so that linux's bootloader can take-over and we can have a dual-boot with windows & linux.

0

sgtbeano's solution is likely to work; however, I want to provide another couple of options, which work only on EFI-based computers. (The vast majority of machines that shipped with Windows 8 or later are EFI-based.) These solutions are:

  • Re-order the boot list -- EFI-based computers store a list of boot entries in NVRAM, along with an order in which these entries are tried. You can change this boot order using tools like efibootmgr in Linux or EasyUEFI in Windows. If you delete the Linux entry (ubuntu for Ubuntu) or re-order the list so that Windows comes before Ubuntu, the system will begin booting normally. Part of the trick to this approach is likely to be to boot to an environment that permits making this change. The easiest solution is likely to be to do a one-time boot to Windows, which you can usually accomplish by hitting a special key at boot time to access a boot menu that will enable booting Windows. The trouble is that the key to do this varies from one computer to another. It's usually a high-numbered function key (F8 or above), but it can be Enter, Esc, or something else. Typing exit at the grub> prompt may also cause Windows to boot. Also, some EFI setup utilities enable changing the boot order, so entering the setup tool may enable you to re-order the boot list.
  • Delete the Linux boot loader -- On an EFI-based computer, boot loaders reside on the EFI System Partition (ESP), which is a FAT partition with a particular type code. You can boot an emergency system (like an Ubuntu installation disc in its "try before installing" mode), mount the ESP, and delete the EFI/{distname} directory, where {distname} is a name associated with the distribution -- for instance, Ananth would delete EFI/ubuntu, since the distribution is Ubuntu. Once this directory is gone, GRUB will be gone, so the computer should skip over the GRUB entry (which is no longer valid) and boot Windows.

These solutions don't really have equivalents on BIOS-based computers, but they're perfectly valid approaches on EFI-based computers that boot in EFI mode. (Most EFI-based computers can boot in BIOS mode, and if that's how your system is configured to boot, these options won't work on it.)

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.