mirror of
https://github.com/kata-containers/kata-containers.git
synced 2025-10-21 20:08:54 +00:00
When starting an initrd the kernel expects to find /dev/console in the initrd, so that it can connect it as stdin/stdout/stderr to the /init process. If the device node is missing the kernel will complain that it was unable to open an initial console. If kata-agent is the initrd init process, it will also result in log messages not being logged to console and thus not forwarded to host syslog. Add a set of standard device nodes for completeness, so that console logging works. To do that we install the makedev packge which provides a MAKEDEV helper that knows the major/minor numbers. Unfortunately the debian package tries to create devnodes from postinst, which can be suppressed if systemd-detect-virt is present. That's why we create a small dummy script that matches what systemd-detect-virt would output (anything is enough to suppress mknod). Fixes: #6261 Signed-off-by: Jeremi Piotrowski <jpiotrowski@microsoft.com>