-
Notifications
You must be signed in to change notification settings - Fork 17
Static ip #6
Comments
This has been open for nearly a year; any plans to make it a reality? I'm looking for a solution to recovery from a power outage where my dhcp server isn't up yet when the pi boots. |
to fix ip address
ctrl+x and tape y than ENTER |
Dear @tsouhaieb , your fix is working indeed but the dns-nameservers are not copied over to the After every reboot I need to add the nameservers to re-establish the network-connection with Is there a fix already present or perhaps another solution? best regards |
the workaround works but would be great to have a solution with config and without a need to log in to the pi and set this manually. This is useful when using a cluster (k8s) you dont want IP to change. thanks |
We no longer actively maintain device-init any longer. HypriotOS 1.7.0 switched to cloud-init. |
Yep and using that exact example file (with IP addresses edited to suit) and flash (2.7.0) to burn Hypriot 1.12.3 to SD does not result in a static IP being set when RPi booted with SD inserted. The RPi still is running on auto IP via DHCP. Any hacks to set a static IP have knock on problems. Command line that uses your suggestion @StefanScherer but does not result in static IP working:
Noting /etc/dhcpcd.conf is definitely set according to --userdata. Noting /etc/resolv.conf is auto populated with name servers, pull from gateway via DHCP server on gateway, and so name resolution is provided. However IP is provided DHCP and not static. Noting also that if static IP hack is used to "fix" the problem with --userdata method failing, /etc/resolv.conf will end up empty of references to nameservers and you therefore don't get name resolution. For example, using Hypriot 1.12.3 with static IP hacks and no name services means you cannot pull docker images since you cannot find the hub on the internet. The missing nameservers in /etc/resolv.conf is because all suggested hacks, for getting around --userdata method failing, involve disabling cloud-init. Understanding also that a warning is provided in /etc/resolv.conf to the effect manual entry of nameservers is verboten, because the contents of /etc/resolv.conf will be automatically replaced. Something clearly needs to be done to allow static IP being set that doesn't require hacks and takes account of the problems with setting of static IP, including disabling of cloud-init, and therefore of dropping access to nameservers. Copying junk into /etc/dhcpcd.conf does not appear to help nor does the other hacks on offer. |
Reopen of issue from flash-repo: Issue 25
Option for setting a static ip for eth0 would be a great addition. Thanks!
The text was updated successfully, but these errors were encountered: