[FEATURE]: Add optional Support for wpa_supplicant.conf
Is your feature request related to a problem? Please describe.
Feature request is related to previously discontinued functionality.
Describe the solution you would like to see implemented
Greetings, I am the developer of a non-Linux raspberry Pi project which uses Circle (currently step 50) as the framework base. This framework doesn't have NetworkManager since it is not a Linux based OS.
Is it possible to add optional support for the ability to write wpa_supplicant.conf to save my users some steps in configuring their wifi during imaging? I'm using raspberry pi imager since it works great and handles all of the partitioning correctly.
I understand if this might be an advanced option and could instruct users of my application on how to enable this feature.
Describe alternatives you've considered
Editing the wpa_supplicant.conf file on the bootfs volume manually (this is the current solution)
Additional context
N/A
Version
1.9.6 (Default)
I'd never encountered Circle before (https://github.com/rsta2/circle for the curious), but it looks pretty fun to me.
Unfortunately we can't really expose something like this without some major changes:
- In order to be offered any customisation, you'd need to be in a repository JSON file - either one you host, or in our official list
- We'd need to add a new customisation type (currently, we support cloud-init and a very straightforward shell script, which can render wpa_supplicant.conf files). We could probably re-use some existing code here, but it would be a schema change
- We'd need to agree how to seed the configuration files into your project - we assume we're going to use the VFAT partition at the start of each image, but if your requirements are different we'll need to work through them.
So, Feature Accepted, conditional on some progress around how we're going to tag your OS!
Thanks for the quick response, this kind of made my day actually!
-
Where can I find more information regarding the repository JSON file? I'm hoping to keep the project living all inside of github but understand if that won't be possible
-
Thanks for the brief technical overview about how rpi-imager currently works. I believe the version of wpa_supplicant being used in circle step 50 is v2.11 hope that helps as well.
-
USBODE-circle reads all of the configuration files from the VFAT partition, we are building the images with a 200mb FAT partition and could exclude the wpa_supplicant.conf file from the build process once we solidify this solution.
Please let me know if I need to clarify anything else.
That's great, thanks for the detail @danifunker
Our fully-assembled-and-linted JSON is here: https://downloads.raspberrypi.com/os_list_imagingutility_v4.json and we also keep a sample of the subitems file we need to list you officially in the repository: https://github.com/raspberrypi/rpi-imager/blob/qml/doc/os-sublist-example.json
That version should be basically in line with our current generator - though, as mentioned, we're going to need to perform some fairly interesting changes to get a new customisation scheme created.
Excellent news on the VFAT choice. It'll greatly simplify the next stages.
Beyond wpa_supplicant, are there any other pre-seeded configuration files your project would find useful? Imager today offers a range of customisation, but I'm not sure how much would apply to Circle today.
I took the example and updated it for my project here - https://github.com/danifunker/usbode-circle/blob/main/os-sublist.json . The build I selected isn't ready for prime-time but it should work for everyone's development. Are we able to keep this file within our repo going forward?
Regarding other pre-seeded files, we haven't worked this out yet, but we might take the hostname and place it somewhere. Currently we are using a custom section under config.txt for all of our configuration settings. Would the imager be able to alter any settings within that file or should we look at moving our app config outside of config.txt into it's own file?
I'm not entirely sure if this is the right place. I am having a hard time configuring headless Wi-Fi now that the wpa_supplicant.conf reading in Raspberry Pi OS on the bootfs partition functionality was removed.
Raspberry Pi Imager does not work for ChromeOS users because their only option is to write RPi images using Chromebook Recovery Utility, which needs a .bin file. You cannot write directly to SD cards from within the Linux environment on ChromeOS, so rpi-imager cannot see raw storage devices that would be the target device for rpi-imager
rpi-imager --cli can write to files using --enable-writing-system-drives but then there are no flags to set options such as Wi-Fi, hostname, users, etc.
Can we please restore wpa_supplicant.conf in bootfs partition functionality?
ref: https://forums.raspberrypi.com/viewtopic.php?t=377937
I'm not entirely sure if this is the right place. I am having a hard time configuring headless Wi-Fi now that the
wpa_supplicant.confin bootfs partition functionality was removed.Raspberry Pi Imager does not work for ChromeOS users because their only option is to write RPi images using Chromebook Recovery Utility, which needs a .bin file. You cannot write directly to SD cards from within the Linux environment on ChromeOS.
rpi-imager --clican write to files using--enable-writing-system-drivesbut there is no way to set options such as Wi-Fi, hostname, users, etc.Can we please restore
wpa_supplicant.confin bootfs partition functionality?ref: https://forums.raspberrypi.com/viewtopic.php?t=377937
I don't think this is the right place for this, also- your comment is extremely confusing but I think I understand what you're talking about.
If you're using rpi-imager (on chrome OS, Linux, Windows or Mac) and trying to flash a recent version of Linux such as Debian Bullseye or Debian Bookwork, the file wpa_supplicant.conf in bootfs is no longer being read. This is something from the Linux side, not something from the rpi-imager side.
That said, different configuration files are created by the rpi-imager and placed on the bootfs volume which more recent versions of Linux work with.
Also, I don't believe the Raspberry Pi imager supports ChromeOS due to some system level restrictions, you might want to open up a feature request to support ChromeOS altogether.
Yes, wrong place since this FR is about a non-Linux OS on Raspberry Pi, not Raspberry Pi OS which is what I'm trying to configure and used to be easy by dropping a wpa_supplicant.conf onto the FAT32 bootfs partition root.
ChromeOS is supported in as much as rpi-imager runs in the Linux env on ChromeOS. It's just that VM does not expose the actual block devices plugged into a ChromeOS machine, thus my attempt to write it out to a .bin file rather than a block device.
The key for me seems to be:
rpi-imager --cli --debug --first-run-script ./firstrun.sh --enable-writing-system-drives 2025-05-13-raspios-bookworm-arm64-lite.img.xz ./rpi.bin
With my own firstrun.sh.