Hacker News new | ask | show | jobs
by zygology 836 days ago
It's also easy enough to just add a mount command to your initramfs init, or embed required device nodes in the CPIO.
1 comments

It is, unless you're just trying to use an off the shelf distro as your initramfs and that distro's default init choice makes the assumption that the kernel will mount devtmpfs for it.
My understanding is that pretty much every modern init system has a service for mounting the devtmpfs, even if it's not in the fstab, and depending on the switch_root binary being used, mounts made in the initramfs may or may not be re-mounted in the new root.

You don't even need a devtmpfs in the initramfs environment, and it may or may not even persist into the fully booted system. I believe Systemd has a tmpfs unit file, and OpenRC has a service for it which is enabled by default.

You don't even need a devtmpfs in the initramfs environment, and it may or may not even persist into the fully booted system.

In this case, my point is for a system where the "fully booted" state is still within an initramfs. There is no "new root" past the initramfs, it IS the rootfs which will run forever until the system is rebooted or shutdown.

You can just mount then exec the real init, no?