# Partition names in sdimg

**URL:** <https://hub.mender.io/t/partition-names-in-sdimg/2753>\
**Category:** General Discussions\
**Tags:** yocto, sumo, partitioning, zeus\
**Created:** [October 29, 2020, 5:14am UTC](https://hub.mender.io/t/partition-names-in-sdimg/2753 "2020-10-29T05:14:35Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![danie](https://yyz2.discourse-cdn.com/flex036/user_avatar/hub.mender.io/danie/32/620_2.png) [@danie](https://hub.mender.io/u/danie)\
**Post date:** [October 29, 2020, 5:14am UTC](https://hub.mender.io/t/partition-names-in-sdimg/2753/1 "2020-10-29T05:14:35Z")

</div>

Hi,

I’m creating SD Card images `.sdimg` and the partitions in `sumo` have clear naming as follows,

```shell
# sumo
ls /media/ux/
primary secondary data

```

Now, I switched to `zeus` and the partition names are no longer exist,

```shell
# zeus
ls /media/ux/
01be7a09-37e9-48fa-972d-5c5282992a6a 01be7a09-37e9-48fa-972d-5c5282992a6a1 data

```

I would like to add the names as before so,

1. Kindly update your `zeus` repo to create `sdimg` with partition names or
2. Instruct me to add partition names in my build.

Thanks in advance.

---

<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:** [October 29, 2020, 3:44pm UTC](https://hub.mender.io/t/partition-names-in-sdimg/2753/2 "2020-10-29T15:44:47Z")

</div>

Hi @danie I don’t know why this change was made but it seems to be something fundamental to the underlying WIC support. @kacf is this something that can be done?

---

<div class="post-metadata">

**Author:** ![kacf](https://yyz2.discourse-cdn.com/flex036/user_avatar/hub.mender.io/kacf/32/146_2.png) [@kacf](https://hub.mender.io/u/kacf)\
**Post date:** [October 30, 2020, 6:40am UTC](https://hub.mender.io/t/partition-names-in-sdimg/2753/3 "2020-10-30T06:40:08Z")

</div>

I don’t think this is intentional, and I cannot explain off the top of my head why it happens. If we look at the zeus branch, we can see that [the data label is there](https://github.com/mendersoftware/meta-mender/blob/zeus/meta-mender-core/classes/mender-dataimg.bbclass#L18). I suppose it’s possible a `--label` option is also necessary when the [wic entry is made](https://github.com/mendersoftware/meta-mender/blob/zeus/meta-mender-core/classes/mender-part-images.bbclass#L140), but I don’t think it has any effect when using the `rawcopy` plugin. This would need to be investigated.

---

<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:** [October 30, 2020, 2:41pm UTC](https://hub.mender.io/t/partition-names-in-sdimg/2753/4 "2020-10-30T14:41:53Z")

</div>

I tried that and if failed with an error about mkdoslabel blah. So I guess the rawcopy option does not support it.

---

<div class="post-metadata">

**Author:** ![danie](https://yyz2.discourse-cdn.com/flex036/user_avatar/hub.mender.io/danie/32/620_2.png) [@danie](https://hub.mender.io/u/danie)\
**Post date:** [October 30, 2020, 3:58pm UTC](https://hub.mender.io/t/partition-names-in-sdimg/2753/5 "2020-10-30T15:58:01Z")

</div>

I’ve tried this patch (basically adding ` --fstype=ext4 --label primary`) in `zeus` branch and it add the volume labels. I’ve tested in `imx8mmevk` `core-image-base` build and it’s working without any known hiccups.

```auto
diff --git a/meta-mender-core/classes/mender-part-images.bbclass b/meta-mender-core/classes/mender-part-images.bbclass
index 6bc272b1..986fc33b 100644
--- a/meta-mender-core/classes/mender-part-images.bbclass
+++ b/meta-mender-core/classes/mender-part-images.bbclass
@@ -126,8 +126,8 @@ EOF
     fi
 
     cat >> "$wks" <<EOF
-part --source rawcopy --sourceparams="file=${IMGDEPLOYDIR}/${IMAGE_LINK_NAME}.${ARTIFACTIMG_FSTYPE}" --ondisk "$ondisk_dev" --align $alignment_kb --fixed-size ${MENDER_CALC_ROOTFS_SIZE}k $part_type_params
-part --source rawcopy --sourceparams="file=${IMGDEPLOYDIR}/${IMAGE_LINK_NAME}.${ARTIFACTIMG_FSTYPE}" --ondisk "$ondisk_dev" --align $alignment_kb --fixed-size ${MENDER_CALC_ROOTFS_SIZE}k $part_type_params
+part --source rawcopy --sourceparams="file=${IMGDEPLOYDIR}/${IMAGE_LINK_NAME}.${ARTIFACTIMG_FSTYPE}" --ondisk "$ondisk_dev" --fstype=ext4 --label primary --align $alignment_kb --fixed-size ${MENDER_CALC_ROOTFS_SIZE}k $part_type_params
+part --source rawcopy --sourceparams="file=${IMGDEPLOYDIR}/${IMAGE_LINK_NAME}.${ARTIFACTIMG_FSTYPE}" --ondisk "$ondisk_dev" --fstype=ext4 --label secondary --align $alignment_kb --fixed-size ${MENDER_CALC_ROOTFS_SIZE}k $part_type_params
 EOF
 
     if ["${MENDER_SWAP_PART_SIZE_MB}" -ne "0"]; then

```

@kacf If you guys can test it more extensively, I’ll be more than happy in providing a helping hand.

Thanks.

---

<div class="post-metadata">

**Author:** ![danie](https://yyz2.discourse-cdn.com/flex036/user_avatar/hub.mender.io/danie/32/620_2.png) [@danie](https://hub.mender.io/u/danie)\
**Post date:** [October 30, 2020, 4:00pm UTC](https://hub.mender.io/t/partition-names-in-sdimg/2753/6 "2020-10-30T16:00:09Z")

</div>

Hey,

I too faced this issue earlier! I think you’ve added `--label primary`, if so try adding `--fstype=ext4` along with `--label primary`.

I hope it should do the trick.

Cheers!
