0

I have a HP computer and installed Ubuntu on it. I followed all the installation procedures as shown on the Ubuntu website. I installed it in order to dual boot into Windows 10. Now, my computer boots directly to Ubuntu. It does not even show the grub menu. I can get to see the grub menu only if I restart the computer while holding the "Windows" and shift key down. When I see the grub menu by using the shift key method, I see the following message when I choose Windows:

error:can't find the command 'drivemap'. error: invalid EFI file path Press any key to continue...

Due to some confusion in the installation instructions, I might have made a small error during the installation of Ubuntu and might have mistakenly created an extra EFI partition.

a) I looking to fix this dual boot issue. b) I am also fine if you can tell me how to delete Ubuntu and go back to using windows. ( I dont have any sort of windows installation CD or USB.

I did this for now: sudo gedit /etc/grub.d/40_custom Then added the following in 40_custom...

#!/bin/sh
exec tail -n +3 $0
# This file provides an easy way to add custom menu entries.  Simply type the
# menu entries you want to add after this comment.  Be careful not to change
# the 'exec tail' line above.
menuentry "WINDOWS10 (on /dev/sda5)" --class windows --class os {
   insmod part_msdos
   insmod ntfs
   set root='(/dev/sda,msdos1)'
   search --no-floppy --fs-uuid --set=root defca89a-1c4c-4e17-a2wf-  fdp6c15bd69q
   drivemap -s (hd0) ${root}
   chainloader +1
}

Thank you

Screenshot of my lsblk

3 Answers3

0

I also have dual boot Windows 10 and Ubuntu in my HP (UEFI / EFI) laptop. Are you sure your followed all the ways correctly? Just boot in to your ubuntu and check for disks application. It will show all partitions in your hard-disk. If you see no windows partition drives, then you have lost windows, else while ubuntu boots, press the boot key. In Hp ( f9) to choose where to boot ( like in Ubuntu or windows boot manager). Then select windows boot manager.

  • Yes, I followed the instructions. I got confused first and created an EFI partition manually instead of choosing it from the pull down menu. I later hit back and created EFI through the pull down menu. Can you look at my partition picture? It shows 2 EFIs. Is that okay? Ty – apatriot12 Nov 25 '20 at 05:10
  • Run the 'Disk' applications and see if windows partition and boot files exist. If windows boot files doesn't exist then u lost windows boot manager. Try pressing F9 twice or more when HP logo comes ( before both hp and ubuntu logo) – Ayush Sehrawat Nov 25 '20 at 16:08
0

Re-installing Ubuntu (from bootable USB) will resolve the issue. But, make sure this time you allow Ubuntu Disk Manager create disks automatically.

0

Since you chose to create EFI partition,it's likely that the existing Windows boot information is lost. The most easiest solution for you is to get Windows Recovery disk/installation medium and repair the installation. I know you've mentioned no OS medium but that's your best bet for worry free recovery. Also, looking at the screenshot, I don't think it lists any Windows partition but it could be partially true. Just go ahead and download Windows 10 ISO and try recovery.