I'm setting up a Raspberry Pi Zero as an ethernet gadget using the instructions here.
That generally works but until I can log in to the Pi and configure it to use a static IP address it uses for its IP address a random one picked from the link-local range (169.254.0.1-169.254.255.255). Since I can't guess what that random address is I can't log in to the Pi to configure its static address or anything else.
This Pi is headless, so I can't log in to it directly to get its IP address or configure it to use a static address.
The Chromebook I'm configuring the Pi from doesn't support ZeroConf so I can't use raspberrypi.local
instead of its IP address to reach the Pi.
Is there a way for me to set something up in the /boot
partition of the Pi's microSD card to give it a static IP address on its first boot? Something similar to how wpa_supplicant.conf is copied from the /boot partition to /etc/wpa_supplicant?
If so, I could configure the static IP address for the Pi when I'm setting up its SD card. Needless to say, I can't modify that card's /rootfs
from the Chromebook on which I'm doing this setup (Chrome OS can only mount ext4 partitions like /rootfs
read-only).
Setting a static IP address from /boot
would allow me to set up Pi Zeros using only Chromebooks, something which would be very useful when travelling and in classes.