From 75715f4590621d86028ae3621582b415a7092b7f Mon Sep 17 00:00:00 2001 From: Ophestra Date: Wed, 27 May 2026 23:59:48 +0900 Subject: [PATCH] cmd/earlyinit: mount /dev/shm Required by many programs. Signed-off-by: Ophestra --- cmd/earlyinit/main.go | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/cmd/earlyinit/main.go b/cmd/earlyinit/main.go index 4578afbc..d1652e5f 100644 --- a/cmd/earlyinit/main.go +++ b/cmd/earlyinit/main.go @@ -137,6 +137,14 @@ func main() { MS_NOSUID|MS_NOEXEC, "mode=620,ptmxmode=666", )) + must(os.Mkdir("/dev/shm/", 0)) + mustSyscall("mount shm", Mount( + "shm", + "/dev/shm/", + "tmpfs", + MS_NOSUID|MS_NODEV, + "", + )) // The kernel might be unable to set up the console. When that happens, // printk is called with "Warning: unable to open an initial console."