I am experimenting with FreeBSD, primarily to ensure GNU projects I create can also be built on BSD. To that end, I'm using a RaspberryPi to easily make clean FreeBSD installs.
Setting up ssh and avahi-daemon (so I can find the device with hostname.local) are multi-step processes that have been hard to get right, so I wrote a setup script to automate preparation of the device for ssh access.
After copying the image to the SD card and unable to access the rootfs partition, I copied my setup script to the MSDOSBOOT partition. However, when I first booted with the fresh SD card, I found that the MSDOSBOOT partition had been pruned of several files, including my script.
So my question is of two parts:
1. Can I protect the script on MSDOSBOOT so it will not be deleted?
2. Is there a better way to copy a script that will survive the first boot?
Thanks,
Chuck Jungmann
Setting up ssh and avahi-daemon (so I can find the device with hostname.local) are multi-step processes that have been hard to get right, so I wrote a setup script to automate preparation of the device for ssh access.
After copying the image to the SD card and unable to access the rootfs partition, I copied my setup script to the MSDOSBOOT partition. However, when I first booted with the fresh SD card, I found that the MSDOSBOOT partition had been pruned of several files, including my script.
So my question is of two parts:
1. Can I protect the script on MSDOSBOOT so it will not be deleted?
2. Is there a better way to copy a script that will survive the first boot?
Thanks,
Chuck Jungmann