diff --git a/src/core/namespace.c b/src/core/namespace.c index c549dcc96b..ecbd23833c 100644 --- a/src/core/namespace.c +++ b/src/core/namespace.c @@ -1151,6 +1151,8 @@ static int mount_image(const MountEntry *m, const char *root_directory) { NULL); if (r < 0) return log_debug_errno(r, "Failed to acquire 'os-release' data of OS tree '%s': %m", empty_to_root(root_directory)); + if (isempty(host_os_release_id)) + return log_debug_errno(SYNTHETIC_ERRNO(EINVAL), "'ID' field not found or empty in 'os-release' data of OS tree '%s': %m", empty_to_root(root_directory)); } r = verity_dissect_and_mount(