kenfallon / fix-ssh-on-pi

Safely enabling ssh in the default Raspberry Pi OS (previously called Raspbian) Image
MIT License
80 stars 36 forks source link

Firstboot service fails #20

Open lokomoti opened 4 months ago

lokomoti commented 4 months ago

On RPI5, with latest medium image. I managed to build the image in WSL2 in Ubuntu. In the Raspberry Pi 5, it boots with no issues. The SSH is configured, user is chaged and SSH certs are working. I noticed that firstboot.sh is not executed.

I verified that it is on the FAT32 partition of the SD card along with the other files.

The service failed, because it cannot find the firstboot.sh


pyropi@raspberrypi:~ $ sudo systemctl status firstboot.service ○ firstboot.service - FirstBoot Loaded: loaded (/lib/systemd/system/firstboot.service; enabled; preset: enabled) Active: inactive (dead) Condition: start condition failed at Fri 2024-03-15 15:31:16 GMT; 5min ago └─ ConditionFileNotEmpty=/boot/firstboot.sh was not met

Mar 15 15:31:16 raspberrypi systemd[1]: firstboot.service - FirstBoot was skipped because of an unmet condition check (ConditionFileNotEmpty=/boot/firstboot.sh).

If i cd to /boot, it is not there.

Would you please help? Jakub

lokomoti commented 4 months ago

It was caused by wrong location of the firstboot.sh in firstboot.service. The new Pi OS has it in /boot/firmware