SmolBSD – build your own minimal BSD system
Rumpkernels then allow, for example, taking all file system drivers in the kernel and running them in userspace without having to rewrite all of the file system tricky logic. Think of "mtools" if you ever used them, but by reusing existing FAT code. Or making it trivial to create disk images from userspace without having to have special kernel primitives nor root access.
And also, they allow taking a userspace application and packaging it with the minimum set of drivers required to run "bare metal". Which is what the SSH example in the smol page brought to mind. See https://github.com/rumpkernel/wiki/wiki/Repo%3A-rumprun
What are the differences?
I tried out smolBSD - the build and boot speed were impressive - as was the hint at a patch that boot time will be reduced from 100ms to 10ms. That's neat - in my experience adding systemd to a modern Linux Kernel pushes Firecracker up to 1-2s.
This smolBSD idea reminds me of unikernels and also of LinuxKit.
The documentation for smolBSD is a great start and could be so much better - for instance - the SSH example shows no way to configure an authorized SSH key or how to log in. The port-map to the host for the open port is also not mentioned.
I'm sure the author knows how to do these things - but even reading around in the repo, it wasn't clear. So hoping he'll improve on this if he's listening.
If anyone's interested in the Linux equivalent of this - check out my blog post on building a Linux microVM from a container[1] and video talk on Firecracker/Linux with Richard Case that led much of the work on Weave Ignite/Flintlock[2]
[1] https://actuated.com/blog/firecracker-container-lab [2] https://www.youtube.com/watch?v=CYCsa5e2vqg
The documentation for smolBSD is a great start and could be so much better - for instance - the SSH example shows no way to configure an authorized SSH key or how to log in. The port-map to the host for the open port is also not mentioned.
For those who want to check it out now: there is documentation but for the nitrosshd documentation. The sshd service works the same, minus nitro of course.
What being a kernel+userland helps with is in implementing features end-to-end: if you have to change how a certain aspect of the network configuration happens, you can do the kernel changes and the userlevel changes in unison. Which explains why you have a unique set of network tools, great documentation, a simple build system that can upgrade the machine...
There's been errors and exceptions of course.
I think the real benefit is they don't have to worry about people trying to run new userland with old kernels; that's explicitly not supported and stuff in base usually doesn't worry too much about it. So if netstat needs a new kernel interface to be faster, the netstat binary in the new release may not work with old kernels, c'est la vie.
Edit: NetBSD is 7.3m LoC, FreeBSD is 9m.