I'm running EC2 EBS images on instances with instance stores on /dev/xvdb and /dev/xvdc. I have managed to create a script to raid these two drives on first boot and mount them as /mnt. What I really want to do is raid them, copy over the EBS /var, and then mount them as /var. I'm assuming that I'll need to do this in the ram disk image during early boot. I'm quite out of touch with systemd and boot order - I last got dirty with building ram disks in 2009. What is the "proper" way to integrate a script that runs during the first boot and does the necessary setup?
Don't want to use cloud-init. Its slow and poorly documented. And certainly happens to late in the boot process.