I don't use imager much, but I believe that it possibly sets up wpa_supplicant in case the IMG is Buster or Bullseye and doesn't have the file usr/lib/raspberrypi-sys-mods/imager_custom. If you look at that file on a Bookworm system along with the firstrun.sh script you posted you'll see that it configures a Network Manager config file preconfigured.nmconnection in /etc/NetworkManager/system-connections for WiFi, doing exactly the right thing for Bookworm.I have just tried flashing an sd with a windows computer here at work (I can't test the sd now as I don't have the pi here).
I used rpi imager 1.8.5 and used the special ctrl shift x menu to configure wifi. Peeking at firstrun.sh it seems like it is still expecting wpa supplicant:I am asking you this as all the articles I found on the big net concerning whether or not you can still set up a headless pi with bookworm and a new version of rpi imager seem to contradict themselves.Code:
#!/bin/bashset +eFIRSTUSER=`getent passwd 1000 | cut -d: -f1`FIRSTUSERHOME=`getent passwd 1000 | cut -d: -f6`if [ -f /usr/lib/raspberrypi-sys-mods/imager_custom ]; then /usr/lib/raspberrypi-sys-mods/imager_custom enable_sshelse systemctl enable sshfiif [ -f /usr/lib/userconf-pi/userconf ]; then /usr/lib/userconf-pi/userconf 'pi' '$5$0WnP9jnyQK$XNXWj3RkQDrkMKN33tjFUVg7x0qpnfGKth48ImjseNB'else echo "$FIRSTUSER:"'$5$0WnP9jnyQK$XNXWj3RkQDrkMKN33tjFUVg7x0qpnfGKth48ImjseNB' | chpasswd -e if [ "$FIRSTUSER" != "pi" ]; then usermod -l "pi" "$FIRSTUSER" usermod -m -d "/home/pi" "pi" groupmod -n "pi" "$FIRSTUSER" if grep -q "^autologin-user=" /etc/lightdm/lightdm.conf ; then sed /etc/lightdm/lightdm.conf -i -e "s/^autologin-user=.*/autologin-user=pi/" fi if [ -f /etc/systemd/system/getty@tty1.service.d/autologin.conf ]; then sed /etc/systemd/system/getty@tty1.service.d/autologin.conf -i -e "s/$FIRSTUSER/pi/" fi if [ -f /etc/sudoers.d/010_pi-nopasswd ]; then sed -i "s/^$FIRSTUSER /pi /" /etc/sudoers.d/010_pi-nopasswd fi fifiif [ -f /usr/lib/raspberrypi-sys-mods/imager_custom ]; then /usr/lib/raspberrypi-sys-mods/imager_custom set_wlan 'mindyourownbusinesshoney' 'eed769f838361764728fadf5225f25cda6c007451eea4bfaea6794eefd5b0d94' 'IT'elsecat >/etc/wpa_supplicant/wpa_supplicant.conf <<'WPAEOF'country=ITctrl_interface=DIR=/var/run/wpa_supplicant GROUP=netdevap_scan=1update_config=1network={ssid="mindyourownbusiness"psk=eed769f838361764728fadf5225f25cda6c007451eea4bfaea6794eefd5b0d94}WPAEOF chmod 600 /etc/wpa_supplicant/wpa_supplicant.conf rfkill unblock wifi for filename in /var/lib/systemd/rfkill/*:wlan ; do echo 0 > $filename donefirm -f /boot/firstrun.shsed -i 's| systemd.run.*||g' /boot/cmdline.txtexit 0
I am also not entirely sure whether the serial console is actually enabled as there is no enable_uart=1 in config but there's this suspicious thing in cmdline.txt:Do I still need to put enable_uart=1 in config?Code:
console=serial0,115200
And hey, they really should have publicised the deprecation of wpa_supplicant more... People WILL go mad trying to figure out what went wrong...
At your service,
someone who is on the brink of collapse
If you want to enable the serial console best to get in the practice of using raspi-config, since the serial console on the Pi5 requires different enablement than other Pis. You can, of course, work out what you should do without using raspi-config. Sorry, too early in the morning for me to sort that for you.
Lastly, I'd encourage you to have a look at sdm, which makes pre-boot system customization super-simple, including WiFi, serial console, and literally everything else. See the getting started with sdm script and the README to see if it might be helpful for you.
Statistics: Posted by bls — Fri Jun 28, 2024 1:26 pm