Mender, GRUB and disk by-uuid

168 views
Skip to first unread message

Arnstein

unread,
Jan 14, 2019, 8:16:21 AM1/14/19
to Mender List mender.io
Greetings,

I am currently creating a Yocto build with Mender for an Intel Atom 3900 processor. So far I have been able to get everything working.
However, when I connect an external hard drive, the system boots up in GRUB command line. I am able to manually load the correct kernel and boot, but as this is an embedded system I want this to happen automatically.
I asked Kristian about this (thanks Kristian!) and he told me to enable mender-partuuid in MENDER_FEATURES_ENABLE.

However when I get several complaints that mender-partuuid is not a valid Mender feature:
ERROR: /mnt/hdd1/yocto/meta-intel-middleware/recipes-support/uriparser/uriparser_0.8.4.bb: mender-partuuid from MENDER_FEATURES_ENABLE or DISTRO_FEATURES is not a valid Mender feature.

I can't seem to find much documentation how to do this.


Kristian Amlie

unread,
Jan 14, 2019, 8:44:14 AM1/14/19
to men...@lists.mender.io, Arnstein
You will need to use the thud branch from meta-mender. I *think* you
should be able to use it even if you are using sumo or older from poky.
Not 100% sure though.

--
Kristian

signature.asc

Arnstein Kleven

unread,
Jan 14, 2019, 8:48:31 AM1/14/19
to Kristian Amlie, men...@lists.mender.io
This gives me:
ERROR: Layer mender is not compatible with the core layer which only supports these series: sumo (layer is compatible with thud)

Would it be easy for me to merge this feature into sumo?

Kristian Amlie

unread,
Jan 14, 2019, 9:01:09 AM1/14/19
to Arnstein Kleven, men...@lists.mender.io
On 14/01/2019 14:48, Arnstein Kleven wrote:
> This gives me:
> ERROR: Layer mender is not compatible with the core layer which only
> supports these series: sumo (layer is compatible with thud)

Right, just add it manually here:
https://github.com/mendersoftware/meta-mender/blob/thud/meta-mender-core/conf/layer.conf#L20

> Would it be easy for me to merge this feature into sumo?

Not rocket science, but still more difficult than using thud, most
likely, since the features involved several patches.

--
Kristian

signature.asc

Arnstein Kleven

unread,
Jan 15, 2019, 8:48:14 AM1/15/19
to Kristian Amlie, men...@lists.mender.io
What exactly should I then put as MENDER_STORAGE_DEVICE? 
I let it be at /dev/sda and then I get these errors (obviously, I guess).

ERROR: /mnt/hdd1/yocto/meta-mender/meta-mender-core/recipes-bsp/grub-mender-grubenv/grub-mender-grubenv_1.2.1.bb: /dev/sda2 Does not contain a valid PARTUUID path
WARNING: /mnt/hdd1/yocto/meta-mender/meta-mender-core/recipes-bsp/grub-mender-grubenv/grub-mender-grubenv_1.2.1.bb: Exception during build_dependencies for do_configure
WARNING: /mnt/hdd1/yocto/meta-mender/meta-mender-core/recipes-bsp/grub-mender-grubenv/grub-mender-grubenv_1.2.1.bb: Error during finalise of /mnt/hdd1/upsquared_yocto/meta-mender/meta-mender-core/recipes-bsp/grub-mender-grubenv/grub-mender-grubenv_1.2.1.bb
ERROR: /mnt/hdd1/yocto/meta-mender/meta-mender-core/recipes-bsp/grub-mender-grubenv/grub-mender-grubenv_1.2.0.bb: /dev/sda2 Does not contain a valid PARTUUID path

Davis, Michael

unread,
Jan 15, 2019, 9:40:17 AM1/15/19
to men...@lists.mender.io, Kristian Amlie

It looks like you didn’t set the part-uuids.  You need to have something like the following in your machine or local conf.

 

#Set Partition UUID

MENDER_BOOT_PART="/dev/disk/by-partuuid/#########-####-####-####-############"

MENDER_ROOTFS_PART_A="/dev/disk/by-partuuid/#########-####-####-####-############"

MENDER_ROOTFS_PART_B="/dev/disk/by-partuuid/#########-####-####-####-############"

MENDER_DATA_PART="/dev/disk/by-partuuid/#########-####-####-####-############"

Where each #########-####-####-####-############ block is an unique uuid. 

 

Mike

--
You received this message because you are subscribed to the Google Groups "Mender List mender.io" group.
To unsubscribe from this group and stop receiving emails from it, send an email to mender+un...@lists.mender.io.
To post to this group, send email to men...@lists.mender.io.
Visit this group at https://groups.google.com/a/lists.mender.io/group/mender/.

Dell Green

unread,
Jan 15, 2019, 10:28:47 AM1/15/19
to men...@lists.mender.io

Hi guys,

If i wanted to delete something from the .mender artifact file only, how would one do this with

a) mender-artifact tool

b) append to  yocto mender image creation lifecycle to do it after the mender file is created?

Kristian Amlie

unread,
Jan 16, 2019, 1:14:53 AM1/16/19
to men...@lists.mender.io
Please start a new thread for new topics.
mender-artifact doesn't support deleting files, although you can cp in a
zero length file.

For the second option, you can try adding the file to
IMAGE_ROOTFS_EXCLUDE_PATH, as a path relative to the rootfs root. It
usually deals with directories, so I'm not sure if it will work with
plain files, but worth a shot.

--
Kristian

signature.asc

Dell Green

unread,
Jan 16, 2019, 2:33:08 AM1/16/19
to men...@lists.mender.io
Thank you

From: Kristian Amlie <kristia...@northern.tech>
Sent: Wednesday, January 16, 2019 6:14:22 AM
To: men...@lists.mender.io
Subject: Re: [mender] delete form .mender file
 

Kristian Amlie

unread,
Jan 16, 2019, 6:05:08 AM1/16/19
to Dell Green, mender
On 16/01/2019 11:11, Dell Green wrote:
> will this exclude it only from the .mender file or will it also be excluded from the .sdimg file?
> as i only wish to exclude it from the .mender file.
> When i use the variable i can see that the mender wks file now contains excludes

Yeah, it will be excluded from both. Generally we do everything we can
in meta-mender to make sure the rootfs images in .sdimg and .mender are
the same, so if you need them to be different you should probably be
using different builds. Perhaps you should look into defining a
different build target, like 'bitbake image-include-extra-bits' and
'bitbake image-exclude-extra-bits', each with a different set of
dependencies.

--
Kristian
signature.asc
Reply all
Reply to author
Forward
0 new messages