1

I have no idea how Linux works, but my friend has dual booted his laptop with Ubuntu and Windows 8 and he has formatted his Linux partition (I don't know why) and he gets into Grub Rescue every time he boots his laptop.

I have booted from my bootable windows installation pendrive, and I have tried Startup Repair with luck, but his laptop can not boot without my bootable pendrive. I have tried some commands mentioned in this site: How to remove Ubuntu and put Windows back on? , but commands like bootrec.exe /fixboot does not work.

I would be happy here answers from you guys!

**As mentioned, I am a Windows User not a Linux User. So I would prefer cmd commands instead of grub commands.

  • More info here: http://askubuntu.com/questions/63610/how-do-i-remove-ubuntu-in-the-bios-boot-menu If UEFI you should just be able to change boot order in UEFI/BIOS. – oldfred Mar 07 '16 at 17:53

2 Answers2

1

If the computer came with Windows 8, it's almost certainly booting in EFI mode, which means that older recovery instructions intended for Windows simply will not work. Instead, you should use a tool designed to edit the EFI boot order. In your situation, the easiest solution is likely to be to use the firmware itself; many EFIs provide an options page on which the boot order is listed. You'll probably see ubuntu as the first entry, with Windows Boot Manager somewhere below that. Use the firmware's tool to change the order, then save the changes and reboot. Unfortunately, not all computers provide this functionality, and even those that do vary greatly in their user interfaces, so you'll have to poke around until you find the right option -- and it's not guaranteed that you will find it!

If the option isn't present, you can:

  1. Boot into an Ubuntu live disk.
  2. Launch a Terminal window.
  3. Type sudo efibootmgr to see the list of boot entries. Note the BootOrder line and locate the entries for ubuntu and Windows Boot Manager.
  4. Type sudo efibootmgr -o ####, where #### is the number associated with the Windows boot manager. (You can add other options, perhaps just cutting out the ubuntu item and leaving the rest intact.)
  5. Reboot.

It's possible to do something similar in Windows using EasyUEFI or the Windows bcdedit command, but as Windows is not currently booting, you'd need to use a Windows emergency disk, and I'm not sure of the exact procedures.

Another option is to mount the EFI System Partition and delete the EFI/ubuntu directory from it. With it gone, the computer will skip the Ubuntu entry and move on to the next one, which is probably Windows.

All of this assumes an EFI-mode boot. If the computer is booting in BIOS/CSM/legacy mode (because Windows was upgraded from an earlier BIOS-mode Windows 7 install, because it was self-installed in BIOS mode, because it came from a "mom & pop" computer shop that installed in BIOS mode, etc.), another recovery procedure will be required. In brief, you must re-install the Windows boot loader to the MBR of the disk. IIRC, the Windows command bootrec /fixmbr should do this; however, I'm far from an expert on this task and I may be wrong or missing some critical step.

Rod Smith
  • 44,284
  • 7
  • 63
  • 105
0

If you can boot into your Windows partition in any way (via UEFI menu for example) you could install a program called 'dualboot repair' and run the automatic repair. It helped me when I messed up GRUB multiple times.