2

I tried installing Ubuntu 18.04 and and it failed to install grub2 and I lost my former OS as I had used the (Ubuntu) iso file to install from the grub menu as my BIOS won't let me boot from a usb stick.

Now I was able to re-install Ubuntu Xenial ( which was previously there ), but my laptop says it can't see a bootable device and I should install an OS. I can boot using the boot from UEFI file option and I see this output from my efibootmgr:

$ sudo efibootmgr -v

BootCurrent: 003D
BootOrder: 0000,3000,2001,2002,2003
Boot0000* ubuntu    HD(1,GPT,8ccf22f4-daf3-4aa6-80af-1a7ed10b68dd,0x800,0x100000)/File(\EFI\ubuntu\shimx64.efi)
Boot2001* USB Drive (UEFI)  RC
Boot2002* Internal CD/DVD ROM Drive (UEFI)  RC
Boot3000* Internal Hard Disk or Solid State Disk    RC
Boot3001* Internal Hard Disk or Solid State Disk    RC
Boot3002* Internal Hard Disk or Solid State Disk    RC
Boot3003* Internal Hard Disk or Solid State Disk    RC

I noticed I have this: BootCurrent: 003D, I was expecting to see Boot**** so I am not sure what 003D means and how to get my system to boot normally.

I have tried several options as suggested:

https://ubuntuforums.org/showthread.php?t=2147295,

https://ubuntuforums.org/showthread.php?t=2238714

This is my /boot/efi folder structure after doing as instructed in the links above:

.
└── EFI
    ├── Boot
    │   └── bootmgfw.efi
    ├── Microsoft
    │   └── Boot
    │       └── bootmgfw.efi
    └── ubuntu
        ├── fw
        ├── fwupx64.efi
        ├── grub.cfg
        ├── grubx64.efi
        ├── mmx64.efi
        └── shimx64.efi

And I also noticed that I get this results when I try to run the following commands:

sudo efibootmgr -c -L "UEFI Hard Drive" -l "\EFI\Boot\bootx64.efi"

efibootmgr: Could not set variable Boot0001: No such file or directory
efibootmgr: Could not prepare boot variable: No such file or directory

Obviously I am missing a file or directoryneeded byefibootmgr`.

This is my partition scheme:

NAME   FSTYPE   LABEL UUID                                 MOUNTPOINT
sda                                                        
├─sda1 vfat           7086-1111                            /boot/efi
├─sda2 ext4           69a49ce7-993e-4fc3-8ad1-062041b7e411 /
└─sda3 swap           340dd345-6ac1-4772-b014-9e508124b371 [SWAP]

And from sudo gdisk /dev/sda:

Number  Start (sector)    End (sector)  Size       Code  Name
   1            2048         1050623   512.0 MiB   EF00  EFI System Partition
   2         1050624      1936889855   923.1 GiB   8300  
   3      1936889856      1953523711   7.9 GiB     8200  

Running sudo efibootmgr -c -L "Windows Boot Manager" -l "\EFI\Boot\shimx64.efi" gives the following errors:

efibootmgr: Could not set variable Boot0001: No such file or directory
efibootmgr: Could not prepare boot variable: No such file or directory

Update:

I am still trying to restore my normal boot behaviour and I used the command sudo bootctl --path /boot/efi status and I got this result:

Failed to read EFI variable LoaderDevicePartUUID: No such file or directory
System:
     Firmware: n/a (n/a)
  Secure Boot: disabled
   Setup Mode: user

Loader:
      Product: n/a
    Partition: n/a
         File: └─n/a

Boot Loader Binaries:
          ESP: /dev/disk/by-partuuid/570d26cf-ecca-489b-849b-e1a562b99226
systemd-boot not installed in ESP.
         File: └─/EFI/Boot/bootmgfw.efi

Boot Loader Entries in EFI Variables:
        Title: ubuntu
           ID: 0x0000
       Status: active, boot-order
    Partition: /dev/disk/by-partuuid/8ccf22f4-daf3-4aa6-80af-1a7ed10b68dd
         File: └─/EFI/ubuntu/shimx64.efi

Can someone help with interpretation?

I have added the tree layout of the /boot/efi folder, can some one tell me if anything is off:

.
├── EFI
│   ├── BOOT
│   │   ├── bootmgfw.efi
│   │   └── BOOTX64.EFI
│   ├── Microsoft
│   │   └── bootmgfw.efi
│   ├── systemd
│   │   └── systemd-bootx64.efi
│   └── ubuntu
│       ├── fw
│       ├── fwupx64.efi
│       ├── grub.cfg
│       ├── grubx64.efi
│       ├── mmx64.efi
│       └── shimx64.efi
└── loader
    ├── entries
    └── loader.conf
George Udosen
  • 36,677
  • 2
    HP violates UEFI spec. Only valid entry is "Windows Boot Manager" by description. Many HP users use the fallback or hard drive entry which is /EFI/Boot/bootx64.efi. But that file usually is just a copy of the Windows file. Boot-Repair now copies shimx64.efi to be that file or you can manually copy like they did before Boot-Repair. Or if just Ubuntu add entry saying Windows, but booting with shim. Sony, HP & others workarounds: http://askubuntu.com/questions/486752/dual-boot-win-8-ubuntu-loads-only-win/486789#486789 – oldfred May 05 '18 at 16:48
  • Do I have to reboot and mount that folder from liveCD to run the commad: sudo efibootmgr -c -L "Windows Boot Manager" -l "\EFI\ubuntu\shimx64.efi"? – George Udosen May 05 '18 at 17:01
  • If you can manually boot, you can run command from within your install. Some with newer HP say using efibootmgr to change boot order does not stick, but using HP's UEFI to change order does work. Let us know what does work and which model HP. – oldfred May 05 '18 at 17:40
  • It gives the error in my question @oldfed! – George Udosen May 05 '18 at 17:50
  • @oldfred both don't work as I have been trying! – George Udosen May 05 '18 at 20:06
  • Try adding -g -w as parameters with space after -c. See man efibootmgr. Have you tried with "Windows Boot Manager" and using "/EFI/ubuntu/shimx64.efi" as in IV. paragraph? – oldfred May 05 '18 at 20:21
  • Same error: efibootmgr: Could not set variable Boot0001: No such file or directory efibootmgr: Could not prepare boot variable: No such file or directory What does this BootCurrent: 003D mean? – George Udosen May 05 '18 at 20:29
  • Post this: sudo efibootmgr -v UEFI boot current will be the hex number of the UEFI entry you booted with. Probably just showing you booted from USB in UEFI mode? Post the link to the Create BootInfo summary report. Is part of Boot-Repair: https://help.ubuntu.com/community/Boot-Info – oldfred May 05 '18 at 21:09
  • @oldfred It's posted the result of sudo efibootmgr already and here is the link to the boot-info: http://paste.ubuntu.com/p/WdmpwckPXc/! – George Udosen May 06 '18 at 03:17
  • I would first try the Boot-Repair suggested fixes. But do not really see anything wrong. do you have latest UEFI from HP for your system. Many fixes lately, just about everyone needs new UEFI or BIOS. – oldfred May 06 '18 at 03:26
  • No I don't have the latest UEFI from hp please direct! – George Udosen May 06 '18 at 03:28
  • do not know details on HP, but generally every vendor has a drivers & updates page for every model system. Drivers are all Windows but UEFI/BIOS is for system. Compare your version with latest available. Quick search found this: https://support.hp.com/ca-en/document/c00042629 – oldfred May 06 '18 at 14:29
  • See last entries. UEFI update from vendor reset UEFI to make more space in UEFI. https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=845023 So first try new UEFI from HP as that resets many UEFI settings. If you have changed UEFI settings like Secure Boot off, then you have to redo them. With my UEFI, I have 5 or more settings that are required and several I also do, so I keep a list. – oldfred Jun 26 '18 at 23:01
  • Please can I have a link to that hp UEFI update and how to install it on ubuntu? – George Udosen Jun 26 '18 at 23:04
  • You have to know exact model as UEFI or BIOS is different by model. If you know that, you can go to the HP support site and and find updates. I do not have HP, nor your model, so Google is a choice, if you have not read your manual. https://www.google.com/search?client=ubuntu&channel=fs&q=hp+uefi+update&ie=utf-8&oe=utf-8 – oldfred Jun 26 '18 at 23:30

0 Answers0