summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/shared/switch-root.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/shared/switch-root.c b/src/shared/switch-root.c
index 1a558b897b..3adb8463c5 100644
--- a/src/shared/switch-root.c
+++ b/src/shared/switch-root.c
@@ -102,6 +102,11 @@ int switch_root(const char *new_root, const char *oldroot, bool detach_oldroot,
}
}
+ /* Do not fail, if base_filesystem_create() fails. Not all
+ * switch roots are like base_filesystem_create() wants them
+ * to look like. They might even boot, if they are RO and
+ * don't have the FS layout. Just ignore the error and
+ * switch_root() nevertheless. */
(void) base_filesystem_create(new_root);
if (chdir(new_root) < 0) {