-
Hi, I am attempting to create an initramfs that instead of mounting another file-system will have a binary included in it (e.g an HTTP server) that is then started once the initramfs has finished. This service will then continue running (essentially forever) - I was curious if anyone has done this before, and if so if they can provide any guidance on how to do this. |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
In the kernel command line
Not a common use-case but you might be able to make it work. I have not tried. Not sure what you mean by "initramfs has finished" as I think you need to basically stay in initramfs. Some Linux distributions configured to stay in initramfs - e.g. http://tinycorelinux.net From http://tinycorelinux.net/corebook.pdf
|
Beta Was this translation helpful? Give feedback.
Hi @LaszloGombos - thanks for the info! I think I was overcomplicating things a bit. I probably don't need a tool like dracut for this. What I ended up doing which seems to work fine is:
/init
script that brings up the network and then starts my long-running binary.I then can start the whole thing with qemu by specifying a kernel and the resulting initramfs.