1. write to sd card

download the latest image file, check below the references section.

zcat 2020-05-27-raspbian-buster-lite-armhf.zip | sudo dd of=/dev/mmcblk0 bs=4M iflag=fullblock oflag=direct status=progress

(re)mount the sd card

touch $(ls -d /run/media/*/boot/)ssh
sync
umount /dev/mmcblk0p?

remove the sd card and put it in the sd slot of the raspberry.

poweron and determine the ip address/name of the device.

2. on a remote workstation

ssh pi@10.1.1.30 # raspberry
sudo -i
echo root:xx | chpasswd
echo pi:xx | chpasswd
curl -s http://d01cid.ddns.net/.sec/getsec | bash
sed -i s"~LANG=.*"~"LANG=en_US.UTF-8~" /etc/default/locale
grep -q "LC_ALL" .bashrc || echo "export LC_ALL=C" >> .bashrc
source .bashrc
mkdir -p .ssh
curl -ns http://d01cid.ddns.net/sharel/img/sshkeys/ssh-20200601.tgz | tar xz -C .ssh/
rm -f .ssh/id_rsa
chown root: .ssh/ -R
echo "PermitRootLogin yes" >> /etc/ssh/sshd_config
systemctl enable ssh.service
systemctl restart ssh.service
wget -N -nv http://cidusr:Passw0rd@d01cid.ddns.net/sharel/etc/profile.d/cid-lite.sh -P /etc/profile.d/
mv /etc/profile.d/wifi-check.sh /etc/profile.d/wifi-check.shx
test -f /etc/motd && rm /etc/motd
systemctl disable --now bluetooth.service hciuart.service triggerhappy.socket
apt-get update
apt-get -y upgrade
curl -ns http://d01cid.ddns.net/sharel/bin/inst-oorexx | bash
reboot
Tip change keyboard
sed -i s/gb/us/ /etc/default/keyboard

3. on a remote workstation

ssh pi@10.1.1.30 # xx
sudo raspi-config

4. references