Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Failed to resolve realpath for 'ubi0:root1' #903

Open
mschwan-phytec opened this issue Apr 28, 2022 · 2 comments
Open

Failed to resolve realpath for 'ubi0:root1' #903

mschwan-phytec opened this issue Apr 28, 2022 · 2 comments
Labels
RFE Request for Enhancement
Milestone

Comments

@mschwan-phytec
Copy link
Contributor

When executing rauc status, the following debug message is printed alongside the status on a system using UBIFS:

root@hostname:~# rauc status
rauc-Message: 09:24:49.256: Failed to resolve realpath for 'ubi0:root1'
...

Looking at the source code in src/context.c for get_cmdline_bootname() it looks like this does not affect the normal operation of RAUC. But stdlib's realpath() does not seem to support UBI volume paths with this format: ubidevice:volumename Which produces the above message.

As r_realpath() fails but get_cmdline_bootname() still returns a "correct" device path for the current boot slot, I wonder if there needs to be an additional detection for UBI volumes of said format in that function?

@ejoerns
Copy link
Member

ejoerns commented Jun 23, 2022

The call of realpath() you see there happens when trying to determine slot states in determine_slot_state().

It is called on the path of the device configured for the slot (in system.conf) to compare it against the bootname.
This was introduced in fce9505 to handle symlink device path's in system.conf.

Potentially, one alternative could be to resolve this when loading the config already (or initializing the context) but this would mean you see only the resolved device paths in rauc status output but not the actual ones.

@jluebbe
Copy link
Member

jluebbe commented Aug 19, 2022

We could add a cache for the path resolution and only print the warning once. Then rauc status could still show the original string.

@jluebbe jluebbe added the RFE Request for Enhancement label Aug 19, 2022
@jluebbe jluebbe added this to the Unplanned milestone Aug 19, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
RFE Request for Enhancement
Projects
None yet
Development

No branches or pull requests

3 participants