1

I had dual booted my Dell Inspiron 7560 with Windows 10 and Ubuntu 18.04 . During a recent service from Dell the Windows 10 was reinstalled. The windows installation is in a 128 GB SSD. The same partition contained boot files of Ubuntu. Linux root, swap and home are in a HDD. The re-install of Windows lead to loss of Ubuntu boot files. So I Live booted Into Ubuntu using another bootable medium. Initially I ran some root user commands from the terminal in an attempt to repair the boot and eventually I launched boot repair. The pastebin log of the same repair is here.

Now one-time boot menu gives two booting options: Ubuntu and Windows Boot Manager. When I choose EITHER OF THEM, only GRUB opens. The GRUB list is somewhat similar to this:

  • Ubuntu
  • Advanced Options for Ubuntu
  • Windows UEFI bootmgfw.efi
  • Windows Boot UEFI loader
  • EFI/ubuntu/MokManager.efi
  • Windows Boot Manager (on /dev/sda1)
  • System setup

Selecting Windows Boot Manager alone starts Windows 10. Selecting Ubuntu opens Ubuntu.

I do not want to run GRUB unless I want to boot Ubuntu. But now, although I am able to run windows from grub, I am unable to directly boot into windows at startup. I am afraid that some of my attempts to repair Ubuntu have overwritten Windows boot files. Please provide a fix.

3

You show this and the Windows entry is booting grub.:

efibootmgr -v

BootCurrent: 0001 Timeout: 0 seconds

BootOrder: 0000,0001 Boot0000* Windows Boot Manager HD(2,GPT,8edc3baf-c97b-4fcd-bf3e-fdbb7f142f71,0xfa000,0x32000)/File(EFIubuntugrubx64.efi)WINDOWS.........x...B.C.D.O.B.J.E.C.T.=.{.9.d.e.a.8.6.2.c.-.5.c.d.d.-.4.e.7.0.-.a.c.c.1.-.f.3.2.b.3.4.4.d.4.7.9.5.}...,................ Boot0001* UEFI: USB DISK 2.0 DL07, Partition 1 PciRoot(0x0)/Pci(0x14,0x0)/USB(2,0)/HD(1,MBR,0x0,0x800,0x3ba800)..BO

You need both a Windows entry & an ubuntu entry that are correct. To see entries:

sudo efibootmgr -v

Add Windows entry:

sudo efibootmgr -c  -L "Windows Boot Manager" -l "\EFI\Microsoft\Boot\bootmgfw.efi" -d /dev/sdb -p 2

Add Ubuntu entry:

sudo efibootmgr -c -l "\EFI\ubuntu\shimx64.EFI" -L ubuntu -d /dev/sdb -p 2

see also: Changed the UEFI motherboard on a dell laptop, now it says no OS detected

If you have duplicate Windows Boot Manager entries, one grub and one really Windows delete the grub version.

sudo efibootmgr -v The "-v" option displays all the entries so you can confirm you're deleting the right one, and then you use the combination of "-b ####" (to specify the entry) and "-B" (to delete it). Examples #5 is delete:, with Ubuntu you need sudo, others must be at root. some need all 4 hex chars, others only need significant digits

sudo efibootmgr -b XXXX -B
man efibootmgr
  • After working for a while, I'm seeing that, even if I remove all boot options from Ubuntu and then add the two Operating systems using the two commands in answer, Windows automatically add a third one by the name Windows Boot Manager that opens up GRUB. I believe there's a little more stuff to clean up. Help! – shreyase99 Aug 28 '18 at 11:02
  • Windows will not create a boot entry that says Windows but boots grub. Do you have an extra folder in your ESP - efi system partition. You should have /EFI/ubuntu & /EFI/Microsoft & /EFI/Boot. The /EFI/Boot/bootx64.efi is normally a hard drive or fallback entry, and is a copy of Windows boot file, but Boot-Repair often make it a copy of shimx64.efi. But it would not normally have a Windows description. Rerun Boot-Repair and post new link. – oldfred Aug 28 '18 at 14:39
  • I figured the problem out using visual bcdedit in windows. Apparently during my intial appempts to repair ubuntu boot, I had mistakenly changed the location parameter of {bootmgr} to GRUB, which is always suppored to be bootmgrfw.efi – shreyase99 Aug 29 '18 at 20:51

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.