Is there a safe way to do a headless install of Raspbian with a WiFi-only network? I have a laptop with an SD slot to preconfigure the SD card as necessary. By "safe" I mean that at no point do I need to uncleanly power off the Pi.
The closest I have gotten is this:
- Use my laptop to prepare the SD card with NOOBS, and configure it to do a silent install. (https://github.com/raspberrypi/noobs/blob/master/README.md)
- Boot the Pi with the SD card and let it do the install of Raspbian. (essentially just wait for an hour or so)
- Uncleanly power off the Pi. I have no alternative at this point because I am headless, and the Pi is not yet on the wifi network.
- Insert the SD card back into the laptop and configure wifi settings found in
/etc/networking/interfaces
and/etc/wpa_supplicant/
as necessary. - Boot the Pi again, and see it connect to wifi.
This worked, for me, but I'm very wary of step 3. Uncleanly powering off the Pi even just once or twice seems to be a big no-no (to the point that the question of how to do this as safely as possible isn't viewed as a legitimate question by the community: Safest way to switch off uncleanly (edit: At time of writing the linked question had been closed as a dupe. This has since been reverted.)).
I am hoping there is some additional tweaking of the SD card I can do in step 1, in order to pre-configure the Raspbian image with my WiFi settings. Does anyone know if this is possible and documented somewhere?
ssh
into it an do the remaining configuration.