Initial OS configuration on Pi with dead HDMI

How can I install an OS on a pi with no HDMI?
The HDMI is dead, won’t work, has been that way for ages.
It’s been Ok that way, but the SD card has crashed and needs a fresh one, and fresh OS.
Once an OS were to be installed, it could be operated over VNC/SSH, but until then, how can it be configured?
How can the initial set-up be completed?

I don’t have access to a monitor with video-in on the 3.5mm jack either.

I think that Pi is only any use as a doorstop now.

If you burn a new image of Raspbian on a new card, then before you remove it from your PC open the boot partition and create an empty file called “ssh” in that partition.

That will enable SSH when the Pi first boots with it, and you should then be able to access it via that way remotely to use it headless (to complete the rest of the set-up or whatever).

Do you own another Raspberry Pi? If yes, do your setup on it, then when its all done swap it to the Pi with no HDMI. It doesn’t have to be the same model either. If its the latest image its bootable on any model Pi.

I wasn’t sure if an image configured on, say, a Pi Zero, would then boot OK on a Pi3 or whatever.
I’ll give that a go when I get time.

Thank you.

The only time it doesn’t work is when a new Pi gets released and your still running an older kernel.
Doing a sudo apt-get update and sudo apt-get upgrade usually fixes that and you can swap the card into any Pi you want.