# Ubuntu image failing to boot after mender-convert + potential solution?

**URL:** <https://hub.mender.io/t/ubuntu-image-failing-to-boot-after-mender-convert-potential-solution/3923>\
**Category:** Debian family\
**Created:** [July 27, 2021, 2:34am UTC](https://hub.mender.io/t/ubuntu-image-failing-to-boot-after-mender-convert-potential-solution/3923 "2021-07-27T02:34:44Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![lucastcox](https://yyz2.discourse-cdn.com/flex036/user_avatar/hub.mender.io/lucastcox/32/948_2.png) [@lucastcox](https://hub.mender.io/u/lucastcox)\
**Post date:** [July 27, 2021, 2:34am UTC](https://hub.mender.io/t/ubuntu-image-failing-to-boot-after-mender-convert-potential-solution/3923/1 "2021-07-27T02:34:44Z")

</div>

Hello, mender devs!

I’ve been using mender on several NUC8BEK SBCs without an issue. Recently, however, I cloned the same golden image that I’ve been using for all of the previous NUC8BEKs and noticed that after boot, it went directly to the GRUB 2.04 shell. I tried mender-convert on several nuc11s and my laptop and the same thing happened.

I noticed that a split second before dropping the shell, it flashed the following “error: no such device: {uuid-of-device-that-doesn’t-exist}”

I then tried to manually get it to boot by runing “set prefix=/efi/boot” followed by “configfile /efi/boot/grub.cfg”

It then, returned an error about being unable to find the ‘hashsum’ command twice, followed by “environment 2 still corrupt after attempted restore. Halting”

It was then that I realized that the wrong grub.efi must be getting called. I noticed that after mender-convert, there is still an /ubuntu entry under /efi that is supposed to not be called anymore, because of the /BOOT entry that contains the mender version of grubx64.efi.

I then removed all references to hashsum in the grub.cfg and was able to get it to boot by running the set prefix and configfile commands.

After doing some more digging, I realized that the grub efi inside of /ubuntu was being called instead of the efi inside /boot.

After yet more digging, I realized the reason was that the bios was looking for the BOOTX64.CSV that’s contained in /ubuntu. So, I added my own BOOTX64.CSV inside of /boot that pointed to mender’s BOOTX64.EFI, and suddenly it booted without any issues.

Is this a potential solution, or is this just a fallback band-aid over some other issue?

---

<div class="post-metadata">

**Author:** ![drewmoseley](https://yyz2.discourse-cdn.com/flex036/user_avatar/hub.mender.io/drewmoseley/32/47_2.png) [@drewmoseley](https://hub.mender.io/u/drewmoseley)\
**Post date:** [July 27, 2021, 1:01pm UTC](https://hub.mender.io/t/ubuntu-image-failing-to-boot-after-mender-convert-potential-solution/3923/2 "2021-07-27T13:01:10Z")

</div>

This sounds reasonable to me. Each hardware and OS combination can have its own quirks requiring changes like these. The best way to handle this would be to implement a [custom hook](https://docs.mender.io/system-updates-debian-family/convert-a-mender-debian-image/customization#hooks-overrides) in your mender-convert config files.

Drew

---

<div class="post-metadata">

**Author:** ![lucastcox](https://yyz2.discourse-cdn.com/flex036/user_avatar/hub.mender.io/lucastcox/32/948_2.png) [@lucastcox](https://hub.mender.io/u/lucastcox)\
**Post date:** [July 27, 2021, 8:49pm UTC](https://hub.mender.io/t/ubuntu-image-failing-to-boot-after-mender-convert-potential-solution/3923/3 "2021-07-27T20:49:52Z")

</div>

Thanks, Drew. It seems like this is really common across a lot of x64 efi installs (at least two different nuc models and a laptop and desktop that I tested on so far). I’m happy to add it as a hook, but it might not be a bad idea to also add it to the generic x86 config file in the official mender-convert repo, given that it won’t affect bios firmware that isn’t looking for a Bootx64.csv.

---

<div class="post-metadata">

**Author:** ![drewmoseley](https://yyz2.discourse-cdn.com/flex036/user_avatar/hub.mender.io/drewmoseley/32/47_2.png) [@drewmoseley](https://hub.mender.io/u/drewmoseley)\
**Post date:** [July 27, 2021, 9:59pm UTC](https://hub.mender.io/t/ubuntu-image-failing-to-boot-after-mender-convert-potential-solution/3923/4 "2021-07-27T21:59:21Z")

</div>

Yeah, if the code is generic then we will certainly be happy to pull it back into the main repo. I guess the question is how do we determine on which machine/OS combinations it would be needed? I think if you prototype it as a hardcoded hook in your case then we can review it and hopefully together we can figure out when it should be applied.

Drew

---

<div class="post-metadata">

**Author:** ![benpoulson](https://avatars.discourse-cdn.com/v4/letter/b/ba9def/32.png) [@benpoulson](https://hub.mender.io/u/benpoulson)\
**Post date:** [August 18, 2021, 1:19pm UTC](https://hub.mender.io/t/ubuntu-image-failing-to-boot-after-mender-convert-potential-solution/3923/5 "2021-08-18T13:19:08Z")

</div>

I’ve run into the exact same issue, took me days to track it down; thanks for your post.

Do you have any configs floating around which can help me automate this? I’m not the best at programming!
