Background / Setup:
- OS - Raspbian Stretch lite
- Board - Raspberry Pi Zero (no WiFi / no Ethernet)
- Ethernet Adapter - USB to Ethernet adapter
The way I have got it working:
- After writing the Raspbian image to a SD card, I create an empty file "ssh" in \boot (from windows) in order to enable sshd at boot
- Startup the Raspberry Pi using the new SD card and Ethernet adapter plugged in
- I run nmap from another Linux box to scan open ssh ports on devices on my network and find IP of the new system
- log into new system
- edit /etc/network/interfaces file (below)
source-directory /etc/network/interfaces.d allow-hotplug eth0 auto eth0 iface eth0 inet static address 192.168.25.27 netmask 255.255.255.0 gateway 192.168.25.4 dns-nameservers 22.214.171.124 hwaddress 00:e0:4c:53:44:27
- Reboot and ssh into the specified IP
Using the setup above, all works fine. I don't want to use DHCP.
I would like to know if there is some way to configure my USB Ethernet adapter from /boot (FAT partition) --> before booting <-- and logging into the system. I have tried to use ip=xx.xx.xx.xx in cmdline.txt but it doesn't work for me. I also have to setup a MAC address for my Ethernet adapter.