From a8891461aace35c52fc549a6c3be86f97d117e70 Mon Sep 17 00:00:00 2001 From: Daniel Barlow Date: Thu, 7 Dec 2023 20:03:03 +0000 Subject: [PATCH] use devtmpfs in initramfs static device nodes don't work with virtio --- modules/initramfs.nix | 6 ------ pkgs/preinit/preinit.c | 1 + 2 files changed, 1 insertion(+), 6 deletions(-) diff --git a/modules/initramfs.nix b/modules/initramfs.nix index 0861d7c..8c937df 100644 --- a/modules/initramfs.nix +++ b/modules/initramfs.nix @@ -47,12 +47,6 @@ in dir /proc 0755 0 0 dir /dev 0755 0 0 nod /dev/console 0600 0 0 c 5 1 - nod /dev/mtdblock0 0600 0 0 b 31 0 - nod /dev/mtdblock1 0600 0 0 b 31 1 - nod /dev/mtdblock2 0600 0 0 b 31 2 - nod /dev/mtdblock3 0600 0 0 b 31 3 - nod /dev/mtdblock4 0600 0 0 b 31 4 - nod /dev/mtdblock5 0600 0 0 b 31 5 dir /target 0755 0 0 dir /target/persist 0755 0 0 dir /target/nix 0755 0 0 diff --git a/pkgs/preinit/preinit.c b/pkgs/preinit/preinit.c index f6236ec..182edd1 100644 --- a/pkgs/preinit/preinit.c +++ b/pkgs/preinit/preinit.c @@ -55,6 +55,7 @@ int main(int argc, char *argv[], char *envp[]) write(1, banner, strlen(banner)); AVER(mount("none", "/proc", "proc", 0, NULL)); + AVER(mount("none", "/dev", "devtmpfs", 0, NULL)); int cmdline = open("/proc/cmdline", O_RDONLY, 0);