Failed to boot : Must be superuser to use mount

Hello all -

I am trying to follow raspberrypi guide to setup mender in my Yocto image. However, after adding the meta-mender layers, including the raspberrypi one, my image stopped booting successfully.

During boot process, I noticed all systemd services that try to mount partitions are failing, including the following:

[0m] Failed to mount /data.
[FAILED] Failed to mount /var/volatile.
[FAILED] Failed to mount Temporary Directory (/tmp)

When I use the emergency shell to check the logs of those systemd services, I am seeing this error:

"must be superuser to use mount."

I even tried to manually mount partitions in the emergency shell using the mount command, and I got the same error, when I run whoami, I see that I am root user.

Furthermore, when I list the files in the rootfs, everything is owned by uid 1000, including /sbin/init, /bin/mount, /lib/systemd/sytemd… I was under the impression those should be owned by root user.

I would really appreciate any help, I cannot find anything online regarding this issue.

Please note my MACHINE is raspberrypi4-64.

Thanks!

Hi @amnj86,

You did not mention which Yocto version you are building.

For reference, you could try Raspberry Pi 4 Model B - #2.

Furthermore, when I list the files in the rootfs, everything is owned by uid 1000, including

This is very strange and could explain the problems you are having.

Do you post-process the rootfs image after the Yocto build in any way?

Hi @mirzak
Thanks for the reply. I wanted to circle back and give update in case it’s useful. The issue was completely solved by building again from a clean state. I’m not sure exactly what was happening, I didn’t have any postinst processes. Anyway, I’m glad I got mender to work ultimately, it was well worth it :slight_smile:

1 Like

Thanks for reporting back, and glad it worked out for you :smiley: