From 4d88d83924429effef87518e4627df6fb683a879 Mon Sep 17 00:00:00 2001 From: Lennart Poettering Date: Mon, 15 May 2023 21:20:36 +0200 Subject: [PATCH 1/2] base-filesystem: also set up /run/ mount point if missing We don't support images without, hence create this one too, like we create all other relevant mount points we definitely require for booting. --- src/shared/base-filesystem.c | 1 + 1 file changed, 1 insertion(+) diff --git a/src/shared/base-filesystem.c b/src/shared/base-filesystem.c index 8a50cc6ebb..2d91e80ad6 100644 --- a/src/shared/base-filesystem.c +++ b/src/shared/base-filesystem.c @@ -40,6 +40,7 @@ static const BaseFilesystem table[] = { { "proc", 0555, NULL, NULL, true }, { "sys", 0555, NULL, NULL, true }, { "dev", 0555, NULL, NULL, true }, + { "run", 0555, NULL, NULL, true }, /* Various architecture ABIs define the path to the dynamic loader via the /lib64/ subdirectory of * the root directory. When booting from an otherwise empty root file system (where only /usr/ has From 84c61aea0fa067ddd5d7f2ef09c249964e41fda4 Mon Sep 17 00:00:00 2001 From: Lennart Poettering Date: Tue, 16 May 2023 11:44:27 +0200 Subject: [PATCH 2/2] base-filesystem: mention why we don't carry an entry for /tmp/ for now --- src/shared/base-filesystem.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/shared/base-filesystem.c b/src/shared/base-filesystem.c index 2d91e80ad6..0244c92c79 100644 --- a/src/shared/base-filesystem.c +++ b/src/shared/base-filesystem.c @@ -41,6 +41,10 @@ static const BaseFilesystem table[] = { { "sys", 0555, NULL, NULL, true }, { "dev", 0555, NULL, NULL, true }, { "run", 0555, NULL, NULL, true }, + /* We don't add /tmp/ here for now (even though it's necessary for regular operation), because we + * want to support both cases where /tmp/ is a mount of its own (in which case we probably should set + * the mode to 1555, to indicate that noone should write to it, not even root) and when it's part of + * the rootfs (in which case we should set mode 1777), and we simply don't know what's right. */ /* Various architecture ABIs define the path to the dynamic loader via the /lib64/ subdirectory of * the root directory. When booting from an otherwise empty root file system (where only /usr/ has