cmd/earlyinit: mount /dev/shm

Required by many programs.

Signed-off-by: Ophestra <cat@gensokyo.uk>
This commit is contained in:
2026-05-27 23:59:48 +09:00
parent 87c3b3663d
commit 75715f4590

View File

@@ -137,6 +137,14 @@ func main() {
MS_NOSUID|MS_NOEXEC, MS_NOSUID|MS_NOEXEC,
"mode=620,ptmxmode=666", "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, // The kernel might be unable to set up the console. When that happens,
// printk is called with "Warning: unable to open an initial console." // printk is called with "Warning: unable to open an initial console."