2

I have what I believe to be a very simple question.

Context

I have a Raspberry Pi Zero W running Raspbian Lite (2020-02-13-raspbian-buster-lite.img).

Question

How do I change just one file on the SD Card, e.g. in the host partition, to auto-configure the raspberrypi as a wifi hostpot, and call it raspberrypi.

Also, I would like to be able to set the hotspot to be open, or with a password raspberry (just like the ssh password :) ).

What I tried already

I found lots of instructions on installing software packages, but unless I'm connecting via ssh already, then I can't run commands unless I'm already networked to the pi.

Why do I want this?

I want to be able to do this, for much greater ease of connecting to a raspberrypi in the first instance, for example, along with enabling ssh, this would allow very simple ease of access for incoming connections.

Only an idea

Finally, what does anyone think of the idea of enabling this by default in Raspbian. It can be disabled is required, but would substantially ease the process of connecting to a Pi with a Raspbian image out of the box - allowing a use to see so-called "proof-of-pi" immediately after first boot.

  • Stack Overflow is *only* for specific, narrow questions about *writing code*; UNIX system administration is outside that scope, and a "can I accomplish this larger goal?" question (as opposed to a "how do I fix this one problem I encountered while working towards this larger goal?" one) is generally too broad to be topical regardless. Consider [raspberrypi.se]. – Charles Duffy Mar 06 '20 at 17:36

1 Answers1

1

As far as I've seen, configuring the Pi before-first-boot by editing the boot partition files is limited. However there are some custom tools out there where you can look at creating a custom image or design some provisioning steps for your Pi.

PiBakery is a tool for creating custom images of Raspbian. Setting up a WiFi hotspot will most certainly require a custom script for tool installation and configuration.

I know that you can configure a SD card to auto-connect to WiFi (for normal network connections) by creating a wpa_supplicant.conf file and setting some values in boot's config.txt, you may want to check some of the documentation from the Raspbian project regarding config.txt. Keep in mind that the default raspberrypi.org image is slightly different than the Raspbian Project's image, so your mileage may vary.

Finally, depending on your use case for this/deployment strategy, you can also look into changing the Pi's boot mode so that it boots from a network host, kind of like "PXE Boot" for Windows machines. You'd have to host a provisioning server that the Pi can get information from and sync up with, which may be out of the bounds of what you're trying to accomplish, but I figured I'd bring it up!

Glorfindel
  • 21,988
  • 13
  • 81
  • 109
Chris
  • 183
  • 1
  • 9