Recent versions of the Raspberry Pi Imager Tool allow customization using cloud-init config and netplan files that are seeded on the boot partition of the sd card as part of writing the image. These files can be edited before booting the pi for the first time, with customizations that will run automatically at first boot.
To automatically pre-configure the pi SD card image for use with the ConnectedIO CM4NA modem, and tailscale do the following:
- Generate an auth key from the Tailscale Admin Console (Settings -> Keys -> Generate auth key) copy and save for later
- Plug in the CM4NA Modem (both data and power) to the Pi. Mode should be AT#USBCFG=0 (default from factory)