(image name and target device may vary :P)
dd if=2022-09-22-raspios-bullseye-armhf-lite.img of=/dev/sdd bs=2M status=progress conv=fdatasync
if it is not mounted automatically it's something like
mount /dev/sdd1 /mnt
(assuming the fs is mounted to /mnt, if not change accordingly)
cd /mnt
needs an empty file called ssh
touch ssh
to configure wlan a file called wpa_supplicant.conf has to be created content like so:
country=US
ctrl_interface=DIR=/var/run/wpa_supplicant GROUP=netdev
update_config=1
network={
ssid="your_wifi_ssid"
psk="your_wifi_password"
}
change wlan properties + country to your values
for some time now there is no default user + password. this can be configured by creating a file containing user + password to set up
create a file called userconf
with just one line of content
<username>:<encryptedpassword>
username can be what ever you like, maybe "dave"
lets assume the password will be "banana", this has to be encoded with openssl
$ echo 'banana' | openssl passwd -6 -stdin
$6$hJWc4EBwpwBpCNKv$i6ixK2dwjTFnq7QOlXqzaW9RklZfja09/oyPXf3GjU1cut.DKKUkVL0VWMxQ26yVHhkEs/s.JeoY2F/kcHlWs/
now add this line to userconf
dave:$6$hJWc4EBwpwBpCNKv$i6ixK2dwjTFnq7QOlXqzaW9RklZfja09/oyPXf3GjU1cut.DKKUkVL0VWMxQ26yVHhkEs/s.JeoY2F/kcHlWs/
now unmount and put the card into the rpi ...
PI Zero can be get Power, provide Serial Console and Network (and more) via a single USB Cable attached to a PC.
modify config.txt add this at the end:
dtoverlay=dwc2
modify cmdline.txt after rootwait add modules-load=dwc2,g_serial
(other modules could be g_ether oder g_mass_storage, ...)
The line will look something like this when finished
console=serial0,115200 console=tty1 root=PARTUUID=4c4e106f-02 rootfstype=ext4 fsck.repair=yes rootwait modules-load=dwc2,g_serial,g_ether quiet init=/usr/lib/raspberrypi-sys-mods/firstboot
systemctl enable [email protected]