I'm trying to learn how the initramfs works and how it may be configured. I would like curl to be added to the packages available in the initramfs, and run a script which uses curl during boot (which means the network has to be set up, before it).
How should I do it? (I need it to work when upgrading my kernel too.)