# Dunfell hddimg support

**URL:** <https://hub.mender.io/t/dunfell-hddimg-support/3393>\
**Category:** General Discussions\
**Tags:** yocto\
**Created:** [March 18, 2021, 5:20pm UTC](https://hub.mender.io/t/dunfell-hddimg-support/3393 "2021-03-18T17:20:24Z")\
**Posts on this page:** 17\
**Page:** 1

<div class="post-metadata">

**Author:** ![skrawn](https://yyz2.discourse-cdn.com/flex036/user_avatar/hub.mender.io/skrawn/32/1101_2.png) [@skrawn](https://hub.mender.io/u/skrawn)\
**Post date:** [March 18, 2021, 5:20pm UTC](https://hub.mender.io/t/dunfell-hddimg-support/3393/1 "2021-03-18T17:20:24Z")

</div>

What happened to hddimg support in Dunfell? I used this image to boot off a USB drive and install onto my target’s SSD - grub would show an “install” option that will then write to MENDER\_STORAGE\_DEVICE (/dev/sda in my system). In Zeus, it was built along with uefiimg. [This post](https://hub.mender.io/t/boot-device-not-found-after-integration-mender-into-yocto/967/6) seems to imply it was rolled into uefiimg and so I should write the uefiimg to my USB drive. But when I boot from USB, I don’t get a grub select screen, just “Welcome to GRUB! lock: OK lock: OK” and it tries to boot from the USB. Boot of course fails because doesn’t work because MENDER\_STORAGE\_DEVICE is pointing to /dev/sda and the USB drive is /dev/sdb. And if I do build with `MENDER_STORAGE_DEVICE = "/dev/sdb"` boot fails because the USB drive is read-only for some reason?

So, maybe I can just add `IMAGE_FSTYPES_append = " hddimg"` to local.conf? Nope, I get this error:

```auto
$ bitbake core-image-full-cmdline
ERROR: <>/poky_trunk/meta/recipes-core/images/core-image-minimal-initramfs.bb: INITRD_IMAGE_LIVE core-image-minimal-initramfs cannot use image live, hddimg or iso.
ERROR: <>/poky_trunk/meta/recipes-core/images/core-image-minimal-initramfs.bb: Check IMAGE_FSTYPES and INITRAMFS_FSTYPES settings.
ERROR: Failed to parse recipe: <>/poky_trunk/meta/recipes-core/images/core-image-minimal-initramfs.bb

```

My local.conf and bblayers.conf:

```auto
INHERIT += "mender-full"
MACHINE ?= "genericx86-64"
...
DISTRO_FEATURES_append = " systemd"
VIRTUAL-RUNTIME_init_manager = "systemd"
DISTRO_FEATURES_BACKFILL_CONSIDERED = "sysvinit"
VIRTUAL-RUNTIME_initscripts = ""

ARTIFACTIMG_FSTYPE = "ext4"
#IMAGE_FSTYPES_append = " hddimg"

MENDER_ARTIFACT_NAME = "demo-1"

MENDER_SERVER_URL = "https://hosted.mender.io"
MENDER_TENANT_TOKEN = "<token>"

MENDER_STORAGE_DEVICE = "/dev/sdb"
MENDER_STORAGE_TOTAL_SIZE_MB = "2048"

```

```auto
# POKY_BBLAYERS_CONF_VERSION is increased each time build/conf/bblayers.conf
# changes incompatibly
POKY_BBLAYERS_CONF_VERSION = "2"

BBPATH = "${TOPDIR}"
BBFILES ?= ""

BBLAYERS ?= " \
  ${TOPDIR}/../meta \
  ${TOPDIR}/../meta-poky \
  ${TOPDIR}/../meta-yocto-bsp \
  ${TOPDIR}/../meta-mender/meta-mender-core \
  ${TOPDIR}/../meta-mender/meta-mender-demo \
  "

```

---

<div class="post-metadata">

**Author:** ![dellgreen](https://yyz2.discourse-cdn.com/flex036/user_avatar/hub.mender.io/dellgreen/32/85_2.png) [@dellgreen](https://hub.mender.io/u/dellgreen)\
**Post date:** [March 18, 2021, 5:43pm UTC](https://hub.mender.io/t/dunfell-hddimg-support/3393/2 "2021-03-18T17:43:12Z")

</div>

If your jumping between USB and internal drives, you may want to take a look at using PARTUUIDS as your partition references to make life easier.

[https://docs.mender.io/system-updates-yocto-project/image-customization/features](https://docs.mender.io/system-updates-yocto-project/image-customization/features)

---

<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:** [March 18, 2021, 6:04pm UTC](https://hub.mender.io/t/dunfell-hddimg-support/3393/3 "2021-03-18T18:04:15Z")

</div>

Hi @skrawn that other post was misleading. When I said that HDDIMG included the UEFIIMG, what I meant was that the UEFIIMG file was stored inside the HDDIMG and the the installer from the HDDIMG would write the UEFIIMG to the hard drive. If you are trying to do that you still need the hddimg. I guess you’ll need to troubleshoot that error you posted. Evidently something changed, likely in poky, that we will need to address. Please let us know if you find anything.

---

<div class="post-metadata">

**Author:** ![skrawn](https://yyz2.discourse-cdn.com/flex036/user_avatar/hub.mender.io/skrawn/32/1101_2.png) [@skrawn](https://hub.mender.io/u/skrawn)\
**Post date:** [March 18, 2021, 6:57pm UTC](https://hub.mender.io/t/dunfell-hddimg-support/3393/4 "2021-03-18T18:57:00Z")

</div>

Ok, thanks. I’ll give PARTUUIDs a try quickly and if that doesn’t work for me, I’ll investigate the problem with hddimg and let you know what I find.

---

<div class="post-metadata">

**Author:** ![skrawn](https://yyz2.discourse-cdn.com/flex036/user_avatar/hub.mender.io/skrawn/32/1101_2.png) [@skrawn](https://hub.mender.io/u/skrawn)\
**Post date:** [March 18, 2021, 9:52pm UTC](https://hub.mender.io/t/dunfell-hddimg-support/3393/5 "2021-03-18T21:52:11Z")

</div>

@drewmoseley you’re right, it was in poky. This is it: [poky - Poky Build Tool and Metadata](http://git.yoctoproject.org/cgit/cgit.cgi/poky/commit/meta/conf/machine/include/x86-base.inc?id=6d738f4a6eb0cfc604d24657277a9b280604915b)

Thoughts about the least invasive way to fix this?

---

<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:** [March 19, 2021, 1:53pm UTC](https://hub.mender.io/t/dunfell-hddimg-support/3393/6 "2021-03-19T13:53:57Z")

</div>

But you already tried manually adding hddimg to IMAGE\_FSTYPES right? There must be more to it.

I don’t see any _obvious_ changes in poky that would cause this.

What does `bitbake -e core-image-minimal | grep -B100 '^(IMAGE_BASENAME|INITRD_IMAGE_LIVE)='` show in your older branch where you don’t see this issue?

Drew

---

<div class="post-metadata">

**Author:** ![skrawn](https://yyz2.discourse-cdn.com/flex036/user_avatar/hub.mender.io/skrawn/32/1101_2.png) [@skrawn](https://hub.mender.io/u/skrawn)\
**Post date:** [March 19, 2021, 2:29pm UTC](https://hub.mender.io/t/dunfell-hddimg-support/3393/7 "2021-03-19T14:29:46Z")

</div>

> But you already tried manually adding hddimg to IMAGE\_FSTYPES right? There must be more to it.

Right, but the change in Poky is setting that way down in the x86-base.inc. I don’t pretend to know all the in-and-outs of how Bitbake establishes dependencies, but it is doing _something_ that makes core-image-minimal-initramfs happy.

This change does have an impact to IMAGE\_FSTYPES though:  
Before (current poky):

```auto
IMAGE_FSTYPES="wic wic wic.bmap mender mender.bmap uefiimg uefiimg.bmap uefiimg.bz2 "

```

After (undo-ing that patch):

```auto
IMAGE_FSTYPES="hddimg wic wic.bmap mender mender.bmap uefiimg uefiimg.bmap uefiimg.bz2 "

```

> What does `bitbake -e core-image-minimal | grep -B100 '^(IMAGE_BASENAME|INITRD_IMAGE_LIVE)='` show in your older branch where you don’t see this issue?

I don’t know why that regex isn’t working…

```auto
$ bitbake -e core-image-minimal | grep '^INITRD_IMAGE_LIVE' 
INITRD_IMAGE_LIVE="core-image-minimal-initramfs"
$ bitbake -e core-image-minimal | grep '^IMAGE_BASENAME' 
IMAGE_BASENAME="core-image-minimal"

```

Also my “older” branch is just the mender-community meta-mender-intel project: [https://github.com/mendersoftware/meta-mender-community/tree/zeus/meta-mender-intel](https://github.com/mendersoftware/meta-mender-community/tree/zeus/meta-mender-intel)

---

<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:** [March 19, 2021, 9:07pm UTC](https://hub.mender.io/t/dunfell-hddimg-support/3393/8 "2021-03-19T21:07:21Z")

</div>

I can’t say I understand why but I was able to build an hddimg file using:

```auto
IMAGE_INSTALL += " hddimg "

```

rather than

```auto
IMAGE_INSTALL_append = " hddimg "

```

Give that a shot and let us know if it builds and if the integrated install stuff still functions.

Drew

---

<div class="post-metadata">

**Author:** ![skrawn](https://yyz2.discourse-cdn.com/flex036/user_avatar/hub.mender.io/skrawn/32/1101_2.png) [@skrawn](https://hub.mender.io/u/skrawn)\
**Post date:** [March 22, 2021, 3:01am UTC](https://hub.mender.io/t/dunfell-hddimg-support/3393/9 "2021-03-22T03:01:05Z")

</div>

Yup, sure enough `IMAGE_INSTALL += " hddimg"` works.

---

<div class="post-metadata">

**Author:** ![skrawn](https://yyz2.discourse-cdn.com/flex036/user_avatar/hub.mender.io/skrawn/32/1101_2.png) [@skrawn](https://hub.mender.io/u/skrawn)\
**Post date:** [March 22, 2021, 4:51pm UTC](https://hub.mender.io/t/dunfell-hddimg-support/3393/10 "2021-03-22T16:51:20Z")

</div>

I’m sorry, I spoke too soon. While the error does go away, the hddimg isn’t actually being created. I thought it was but that was from a previous build.

---

<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:** [March 22, 2021, 4:54pm UTC](https://hub.mender.io/t/dunfell-hddimg-support/3393/11 "2021-03-22T16:54:47Z")

</div>

That’s strange. In my case it definitely did get created. What happens if you `rm -rf build/tmp` and let it all get recreated?

Drew

---

<div class="post-metadata">

**Author:** ![skrawn](https://yyz2.discourse-cdn.com/flex036/user_avatar/hub.mender.io/skrawn/32/1101_2.png) [@skrawn](https://hub.mender.io/u/skrawn)\
**Post date:** [March 24, 2021, 3:21pm UTC](https://hub.mender.io/t/dunfell-hddimg-support/3393/12 "2021-03-24T15:21:13Z")

</div>

Same effect; missing the hddimg still.

---

<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:** [March 24, 2021, 5:40pm UTC](https://hub.mender.io/t/dunfell-hddimg-support/3393/13 "2021-03-24T17:40:00Z")

</div>

Strange. I just built both intel-corei7-64 and qemux86-64 and have HDDIMG files in both cases. What MACHINE are you building?

What does `bitbake -e core-image-full-cmdline | grep 'IMAGE_FSTYPES='` show?

---

<div class="post-metadata">

**Author:** ![skrawn](https://yyz2.discourse-cdn.com/flex036/user_avatar/hub.mender.io/skrawn/32/1101_2.png) [@skrawn](https://hub.mender.io/u/skrawn)\
**Post date:** [March 24, 2021, 6:41pm UTC](https://hub.mender.io/t/dunfell-hddimg-support/3393/14 "2021-03-24T18:41:57Z")

</div>

genericx86-64

```auto
$ bitbake -e core-image-full-cmdline | grep 'IMAGE_FSTYPES='
IMAGE_FSTYPES="wic wic wic.bmap mender mender.bmap uefiimg uefiimg.bmap uefiimg.bz2 "

```

---

<div class="post-metadata">

**Author:** ![skrawn](https://yyz2.discourse-cdn.com/flex036/user_avatar/hub.mender.io/skrawn/32/1101_2.png) [@skrawn](https://hub.mender.io/u/skrawn)\
**Post date:** [March 24, 2021, 7:31pm UTC](https://hub.mender.io/t/dunfell-hddimg-support/3393/15 "2021-03-24T19:31:10Z")

</div>

@drewmoseley I blindly followed your post the other day about `IMAGE_INSTALL += " hddimg"` when I think you meant to type `IMAGE_FSTYPES += " hddimg"` because that _does_ work!

---

<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:** [March 24, 2021, 7:38pm UTC](https://hub.mender.io/t/dunfell-hddimg-support/3393/16 "2021-03-24T19:38:12Z")

</div>

Dang. Sorry about that. Clearly, that was a mistake in my previous post. Glad you have it building. Let me know if it is functional.

---

<div class="post-metadata">

**Author:** ![skrawn](https://yyz2.discourse-cdn.com/flex036/user_avatar/hub.mender.io/skrawn/32/1101_2.png) [@skrawn](https://hub.mender.io/u/skrawn)\
**Post date:** [March 24, 2021, 7:49pm UTC](https://hub.mender.io/t/dunfell-hddimg-support/3393/17 "2021-03-24T19:49:38Z")

</div>

It is; just booted off the USB drive and installed my image. Thank you!
