aboutsummaryrefslogtreecommitdiffhomepage
path: root/cmd
diff options
context:
space:
mode:
authorOphestra <cat@gensokyo.uk>2026-05-27 23:59:48 +0900
committerOphestra <cat@gensokyo.uk>2026-05-27 23:59:48 +0900
commit75715f4590621d86028ae3621582b415a7092b7f (patch)
treeb18ec7a8777f61212b80c91e1e1368b4a35f72bc /cmd
parent87c3b3663df8eb77f70afa47d0ed928e81584dbc (diff)
cmd/earlyinit: mount /dev/shm
Required by many programs. Signed-off-by: Ophestra <cat@gensokyo.uk>
Diffstat (limited to 'cmd')
-rw-r--r--cmd/earlyinit/main.go8
1 files changed, 8 insertions, 0 deletions
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."