#104 Consider adding a --ssid argument
Opened 6 months ago by jwatt. Modified 2 months ago

This is a request to add a mechanism to specify a WiFi network to join.

Rational: parity with Raspberry Pi OS, which by supporting this allows a Pi to be set up without requiring a display and keyboard to be connected. If you only have a laptop (no external display or keyboard) this missing functionality is a problem.

I imagine if this is implemented, then arm-image-installer should prompt for the password using something like:

function prompt_for_passphrase {
  ( trap 'stty echo' INT &&
    stty -echo &&
    printf "$1: " >&2 &&
    read &&
    stty echo;
    echo "$REPLY"
  )
}

Currently I have a patch that implements an --ssid argument by adding a oneshot systemd service that runs on first run, but I imagine that there must be a better way. If someone can give me some pointers on that I could possibly create a pull request for a more appropriate implementation.


I'm not sure we're aiming for parity with RPi-OS and there are ways with things like nmcli to set this up once the device is running. The main reason for this tool is to get the device booting, there are other tools to do the rest. Contributions are welcome though.

and there are ways with things like nmcli to set this up once the device is running

You can only continue setup if you either have access to a wired network, or else you have an external display and keyboard. I'm proposing --ssid because I found myself without either recently, and I was unable to set up Fedora on some RPi's. (I ended up temporarily setting up RPi OS because its setup tool supports wifi configuration.)

Even if you're not in the situation I found myself in, it's nice not to have to mess around with connecting a keyboard and wiring up a display, or else locate the device where you have ethernet ports. Particularly if you find yourself having to do multiple reinstall-boot loops.

The main reason for this tool is to get the device booting, there are other tools to do the rest.

That makes sense. But presumably you implicitly mean "booting and accessible", in which case this proposal still falls within scope?

Contributions are welcome though.

Thank you. I can put up a patch using my oneshot systemd service approach, but I was assuming that's not the best way, and would welcome pointers to the "correct" way.

Maybe share your one-shot service for a starter so one can mount the card and put it in place manually before deploying.

Login to comment on this ticket.

Metadata