On Wed, Aug 22, 2012 at 09:04:14PM +0200, Thomas Bächler wrote:
Am 22.08.2012 11:55, schrieb Thomas Bächler:
Am 19.08.2012 21:15, schrieb Gerardo Exequiel Pozzi:
- DHCP is requested again on real-root. I guess, is most cases, there
is no issues since is re-assigned the same IP address. (this bug introduced recently since rc.conf enabled "network")
This is actually necessary. If you don't start a real DHCP daemon on boot, then you won't renew your lease and the DHCP server may give the IP to someone else.
Your lease should still be valid when you re-launch DHCP, so you can rely on getting the same IP. You could probably even configure dhcpcd to specifically request the correct IP.
Okay, there is more, and I think we need to change things up a little:
Originally, Florian found that by using IPAPPEND 1 (or 3), you don't get a DNS server in the initramfs. I just had a short talk with hpa in #syslinux. He gave a few recommendations which lead me to the following findings:
- Using ipconfig is bad because you don't run a real dhcp client that
renews your lease as it should. 'ipconfig' is a compatibility layer that supports the same syntax as the old kernel-level auto-configuration, which is something that made sense in the last century. Nowadays, you can use initramfs and a real dhcp client.
- Instead, we should
- run a real dhcp client in initramfs
- kill it at the end (make it not give away the lease), copy over the
lease to the real system (or even leave dhcpcd running)
Does any of this mean we should think about revamping our NFS support in mkinitcpio? I'm not really happy with stealing bits from the klibc tree, as its a real pain in the butt to maintain (and bump/bugfix).
This would force us to ask for DHCP more often, but would guarantee that we have a consistent IP in initramfs and after. It doesn't matter if the IP during PXE and during initramfs differ (which is still unlikely to happen).