Is it somehow possible to seed some initial data and initialization scripts on a completely headless raspberry pi zero (without wifi) from Windows?

I was thinking there may be some way to add some files and a init shell script on the /boot partition, that could then be picked up on startup, similar to what's done with wpa_supplicants.conf, but couldn't find anything like it.

Is the only solution to do that to write directly to the main partition of the sd card (ext4)?

Or maybe is there a relatively easy way to alter the .img directly, before burning it to the SD card?



  • What you're asking for would need radical changes to the operating system (which I assume is Raspbian in your case). It's also a massive security exposure to run random stuff like that. So it's unlikely your wish will ever be fulfilled. Get any other Linux system and you can easily write to an ext4 filesystem. (That could be a live CD like raspberrypi.org/downloads/raspberry-pi-desktop/.)
    – Dougie
    Commented Mar 19, 2020 at 22:11
  • 1
    You may have a look at Use /boot/cmdline.txt for creating first-boot script.
    – Ingo
    Commented Mar 20, 2020 at 23:08


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Browse other questions tagged or ask your own question.