You may have only killed to operating system on the card due to files not being closed at power down.
I have never actually lost a card / damaged a card by pulling out the power (a regular habit of mine).
By default, any Raspberry Pi OS will run on the Zero currently (this will change due to the move to 64bit announced today) but none of them come with WiFi defined partially due to them not knowing your WiFi details and partially due to legal requirements of some frequencies not being available in some countries.
I assume your Pi is not connected to a monitor / keyboard so you need to set the machine up in headless mode by creating the SD card using Etcher etc from the 32 bit images downloadable from here.
Once you have made the SD card, DO NOT eject it but add two files to the 'boot' drive you will have on your machine:
a) Create a file called ssh
or ssh.txt
with no contents. This will allow you to use Putty or terminal to ssh in to the Pi
b) Create a file called wpa_supplicant.conf
to define your WiFi details. The bare minimum this file should have is dependant on your WiFi network but I find that this works well for most home networks:
ctrl_interface=DIR=/var/run/wpa_supplicant GROUP=netdev
update_config=1
country=GB
network={
ssid="Networkname"
psk="Password"
}
You will need to change the GB to match your country code from the two letter codes documented in ISO 3166 and on Wikipedia.
If you are not using any security then change the psk line to read:
key_mgmt=NONE
or better add security to the network.
If you are using a hidden SSID then add a line after the ssid
that reads
scan_ssid=1
(Note the Pi is not very good at finding hidden networks and they are a waste of time security wise).
This should then allow your Pi to connect to the network and let you ssh in to enable VNC if needed.
Full documentation on this is available on the RPF site.
/etc/wpa_supplicant/wpa_supplicant.conf
- you can create a file calledwpa_supplicant.conf
on the boot partition, with the correct settings, and wifi will come up on first boot of the pi – Jaromanda X May 29 '20 at 2:14