Sorry, its still not clear.There are at least two solutions:
- nmcli in Bookworm supports the --offline switch, enabling you to do configuration prior to first boot
- Configure it up online as static and with everything else you want, then save away the .nmconnection file. Only two things to fix: 1) The static IP address, and 2) the UUID, but there appears to be no issue in using the same .nmconnection file across multiple systems. So, only one thing to fix
Code:
--offline Work without a daemon. Makes connection add and connection modify commands accept and produce connection data via standard input/output. Ordinarily, nmcli would communicate with the NetworkManager service.
For example, I have just written Raspberry Pi OS to an SD card (say) on another computer (enabling ssh by creating the file "ssh" in /boot).
I then want to place the SD card in a Pi, and for that Pi to boot and be immediately accessible using existing entries in the local /etc/hosts file.
I do not want to spend ages messing with nmap trying to find the address DHCP has given it.
The local machine, by the way, might be running any reasonable OS.
Statistics: Posted by jahboater — Wed May 29, 2024 1:05 am