# Extra Partitions Minimal Example

**URL:** <https://hub.mender.io/t/extra-partitions-minimal-example/4811>\
**Category:** Yocto Project\
**Tags:** jetson\
**Created:** [March 31, 2022, 9:03am UTC](https://hub.mender.io/t/extra-partitions-minimal-example/4811 "2022-03-31T09:03:45Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![teebr](https://yyz2.discourse-cdn.com/flex036/user_avatar/hub.mender.io/teebr/32/1576_2.png) [@teebr](https://hub.mender.io/u/teebr)\
**Post date:** [March 31, 2022, 9:03am UTC](https://hub.mender.io/t/extra-partitions-minimal-example/4811/1 "2022-03-31T09:03:45Z")

</div>

For context: I want a second mini `/data`-style partition which is empty on initial build, and can be flashed separately to the main image. This will contain files specific to each individual device, e.g. certificate/ keys. If you can think of a better way - but without a TPM - then please let me know.

I am developing for a Jetson Xavier NX (eMMC) using Yocto, on Dunfell v2021.10. As an experiment, I took my existing working build, and added this to local.conf:

```auto
MENDER_EXTRA_PARTS = "part1"
MENDER_EXTRA_PARTS[part1] = "--label=static --fstype=ext4"
MENDER_EXTRA_PARTS_SIZES_MB[part1] = "8"
MENDER_EXTRA_PARTS_FSTAB[part1] = "ext4 defaults 0 0"

```

After flashing the image, the device fails to boot, with the following dmesg output appearing a few times:  
`EXT4-fs (mmcblk0p4): VFS: Can’t find ext4 filesystem`

I have a couple of questions around this:

- Should that be code be enough to create a new, functional partition? If so, could someone offer some suggestions on how to resolve it? Otherwise, what is the minimum that’s required to achieve this?
- Assuming p4 is my new partition, does that mean it replaces the default `/data` partition, so I’d have to create two partitions using `MENDER_EXTRA_PARTS`?

I am familiar-ish with Yocto but haven’t had to dig into it that much until now.

Thanks in advance.

---

<div class="post-metadata">

**Author:** ![TheYoctoJester](https://yyz2.discourse-cdn.com/flex036/user_avatar/hub.mender.io/theyoctojester/32/1444_2.png) [@TheYoctoJester](https://hub.mender.io/u/TheYoctoJester)\
**Post date:** [March 31, 2022, 2:34pm UTC](https://hub.mender.io/t/extra-partitions-minimal-example/4811/2 "2022-03-31T14:34:52Z")

</div>

Hi @teebr,

Thanks for getting in touch. However, I can’t directly reproduce this. Tried on a `beaglebone-yocto` target, and this mounted `/dev/mmcblk0p6` right away. However the partition number 4 in your log is irritating. So I guess that there is actually something wrong with one of the other partitions. Did it work without the added `MENDER_EXTRA_PARTS`?

Greetz,  
Josef

---

<div class="post-metadata">

**Author:** ![teebr](https://yyz2.discourse-cdn.com/flex036/user_avatar/hub.mender.io/teebr/32/1576_2.png) [@teebr](https://hub.mender.io/u/teebr)\
**Post date:** [April 11, 2022, 2:03pm UTC](https://hub.mender.io/t/extra-partitions-minimal-example/4811/3 "2022-04-11T14:03:05Z")

</div>

Hello Josef,

Sorry for the slow reply, I wasn’t able to do any device testing last week. Yes I have a working main image, and all I did was add the above to `local.conf`. I will add it to a separate recipe and run it in a from-scratch CI build to be sure, but i suspect it might be quite specific to some of the Tegra stuff, e.g. the [flash layout](https://github.com/mendersoftware/meta-mender-community/blob/dunfell/meta-mender-tegra/recipes-bsp/tegra-binaries/mender-custom-flash-layout_1.0.bb). I will keep investigating for now.

Thanks,

Tom
