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.

hiigaran
  • 6,843

1 Answers1

6

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
oldfred
  • 12,583