On 08/22/2012 04:04 PM, 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.
I guess the same applies for nfsmount command.
- 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)
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).
If leave it running should notify to systemd that there dhcpcd service is already running.
PS: Anyway for now, I leave copytoram=y for NBD/NFS (remember that copytoram only copies needed *.sfs, in other works booting in x86_64 does not copies "i686.sfs")