HAOS image not bootable, need help with EFIBootMgr settings

I’ve been having a lot of trouble doing a fresh installation of HAOS onto an SSD as my old install onto a bootable SD was giving me a lot of problems.

See here for original thread for what I had to do, and the background

I finally managed to get HAOS onto my SSD using this guide:

I now have an SSD with HAOS on it installed on it, but it won’t boot.

It just brings up a generic message saying that it can’t find the boot medium when I remove the Ubuntu SSD from the slot and reboot.

I’ve tired going into the bios and doing a forced boot to the SSD but it keeps coming up with the same error message. I’m lead to believe that this means that my SSD either doesn’t have a boot loader or has an error in it.

The installation instructions contain this section which is supposed to resolve the issue that I’m having:

If the machine complains about not being able to find a bootable medium, you might need to specify the EFI entry in your BIOS. This can be accomplished either by using a live operating system (e.g. Ubuntu) and running the following command (replace <drivename> with the appropriate drive name assigned by Linux, typically this will be sda or nvme0n1 on NVMe SSDs):

efibootmgr --create --disk /dev/<drivename> --part 1 --label "HAOS" \
   --loader '\EFI\BOOT\bootx64.efi'

The efibootmgr command will only work if you booted the live operating system in UEFI mode, so be sure to boot from your USB flash drive in this mode. Depending on your privileges on the prompt, you may need to run efibootmgr using sudo.

Or else, the BIOS might provide you with a tool to add boot options, there you can specify the path to the EFI file:

\EFI\BOOT\bootx64.efi

The problem is that I know pretty much nothing about Linux. I don’t really understand what it’s asking me to do or how I’m supposed to do it.

For example where it says

replace <drivename> with the appropriate drive name assigned by Linux

I don’t have the faintest idea of where I’m supposed to find it.

Are there some much simpler instructions that I can use, or some screen shots of what I need to do?

I’m using a Great Wall clone of 2016 American Megatrends bios, with EUFI 2.1. Secure boot doesn’t appear to exist on this MB so I can’t disable (or enable) it.

I’m on a budget of around zero so I can’t really go out and buy new hardware. I have confirmed that this platform will run HAOS as someone set me up a bootable SD card for it last year and it’s been running on this hardware OK, but I’ve had some problems with upgrades and the answer that I get back fro everyone is “you need to do a fresh install”.

The problem seems not related to Ubuntu, but that your BIOS is not set right to boot from the SSD, or set to boot the wrong way. Generic instructions are in the original guide, but BIOS is hardware dependent so you may need to pick up a manual for it.

The original instructions to flash the drive are all available from the GUI, so I didn’t need to specify a drive letter, the drive was pretty obvious for me in the gui.

It could be as simple as that the BIOS setting for what device to boot from does not list the disk that you installed HAOS on. It might be set to boot from USB or network only or something like that.

Ps.If you could boot the device using the Ubuntu USB, the UEFI setting is probably right, I do not think it would boot Ubuntu without it.

The problem seems not related to Ubuntu

Agreed, I’m booting to Ubuntu perfectly, but I think that I’m supposed to be using tools within Ubuntu to fix this, which I’m not sure how to use.

your BIOS is not set right to boot from the SSD, or set to boot the wrong way. Generic

I’m pretty sure that my BIOS is set up correctly, I can see the SSD in it and select it as a bootable option, but when it does try to boot to it it acts as if the SSD doesn’t have a bootable OS on it.

I keep seeing references to Grub boot loaders, but I’m not sure how to access it or modify it.

The original instructions to flash the drive are all available from the GUI, so I didn’t need to specify a drive letter, the drive was pretty obvious for me in the gui.

I’ve already gotten past that bit. The image is on the drive, but it’s not in a bootable state for some reason.

The instructions say to do this after the image has been installed:

efibootmgr --create --disk /dev/<drivename> --part 1 --label "HAOS" \
   --loader '\EFI\BOOT\bootx64.efi'

I don’t know how to do this or what to change “Drivename” to.

It could be as simple as that the BIOS setting for what device to boot from does not list the disk that you installed HAOS on. It might be set to boot from USB or network only or something like that.

I’ve already ruled this out as being the problem. If I take the SD card out then the SSD is the only boot option given in the BIOS. It selects it automatically and tried to boot from it.

I’ve also used the boot override option to manually select it and I have the same problem. It knows that the SSD is there and it tries to boot from it, but it fails.

I’m pretty sure that the problem is this section of the instructions:

If the machine complains about not being able to find a bootable medium, you might need to specify the EFI entry in your BIOS. This can be accomplished either by using a live operating system (e.g. Ubuntu) and running the following command (replace with the appropriate drive name assigned by Linux, typically this will be sda or nvme0n1 on NVMe SSDs):

efibootmgr --create --disk /dev/<drivename> --part 1 --label "HAOS" \
   --loader '\EFI\BOOT\bootx64.efi'

The efibootmgr command will only work if you booted the live operating system in UEFI mode, so be sure to boot from your USB flash drive in this mode. Depending on your privileges on the prompt, you may need to run efibootmgr using sudo.

Or else, the BIOS might provide you with a tool to add boot options, there you can specify the path to the EFI file:

\EFI\BOOT\bootx64.efi

The instructions specifically say to do this if you have the problem that I’m having, I’m pretty sure that I need to enter this into the console, but I need to change the drive name, but I don’t have the faintest idea how to find the correct one.

I’d expect the disk manager you use to flash it would show the device name for the disk that you need?

You also mentioned somewhere you could not find the UEFI (secure) boot option in the BIOS. I read somewhere some boards like ASUS might hide those options until you set a BIOS pincode. Might be worth a quick try?

I’d expect the disk manager you use to flash it would show the device name for the disk that you need?

This is an image from the instructions that I used to do the installation

Imagine that this is my PC. Could you please highlight the bit that I need?

I’m also not sure how to access or change this text:

efibootmgr --create --disk /dev/<drivename> --part 1 --label "HAOS" \
   --loader '\EFI\BOOT\bootx64.efi'

The instructions say that this will fix my problem, but I don’t know how to do it.

I have an SD card with HAOS on it that boots up without any problems, so I’m pretty sure that we can rule Secure Boot out.

The drivename is mentioned in the screenshot in several places, for the highlighted drive it is /dev/sda1

The 'text" is a command line you need to enter, you should teplace with sda1 if the highlighted one is the one you installed HAOS on. I have neder done this, do I am hesitant to instruct you on this.

I eventually managed to figure out where what to put where, but it came up with an error message. I can’t remember what it is, something to do with not supporting variables. I’m not sure if I did it wrong or if it failed for another reason.

I’ll need to go back and check what the message was.

Maybe EFI variables no available?

I think that it’s saying that I can’t use the command efibootmgr because I didn’t boot using an USB key, or I didn’t boot into efi mode maybe?

I’m not sure, I followed the instructions exactly for creating the Ubuntu bookable USB key and running it.

If you replace this with the drive that your HAOS is on then there are no variables in the commandline, so I do not understand why you got that error.

The message was “EFI variables are not supported on this system”.

Google suggests that this message means that my computer has booted in legacy BIOS mode rather than UEFI mode. So I can’t use EFIBootmgr at all as you can only use it when you boot in UEFI mode.

Which is confusing since when I boot from an SD card it explicitly gives me two options of how to boot. Legacy Bios and UEFI mode. I can pick which one I want.

That is explainable: if any of the hardware does not support it, it may fall back to legacy. So if there are drives connected you do not need, you might want to unplug those.

Brand new SD card and brand new SSD from a reputable brand.