2 ms·
Yeah. (Though, I mean, if you're writing a kernel driver, you're probably brave enough to go in and yank out the code that tries to exec the initramfs /init.)
by derefr 7y ago
Yeah. (Though, I mean, if you're writing a kernel driver, you're probably brave enough to go in and yank out the code that tries to exec the initramfs /init.)
But, you can always write a five-line "trivial init" in C that just starts and then goes to sleep forever. If you didn't know, init processes don't have any special kernel-imposed requirements. You can run /bin/bash as init; this is what many distros' single-user rescue modes do!
Or, if you're even lazier than that, I believe Busybox has a configuration wizard that allows you to just deselect all the features. That'd probably spit out a "trivial init" binary.