On 08/22/2012 06:55 AM, Thomas Bächler wrote:
Am 19.08.2012 21:15, schrieb Gerardo Exequiel Pozzi:
1) 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.
Solutions: a) If this happens suggest the to the user use copytoram=y b) Use copytoram=y in NBD/NFS by default (this is always done for HTTP), user can change this behaviour. c) Disable DHCP service from relevant hooks. None of these are good solutions.
2) Stopping network on shutdown, if network is stopped before reach shutdown-initramfs againt this does not look good. Solutions: a) See how to skip network on shutdown. b) Same point (1.b) We must not stop network on shutdown. We can quit dhcpcd without releasing the lease or shutting down the network. If this is not possible with systemd, then something is very wrong.
Anyway I always use copytoram on NBD and NFS like doing actually with HTTP now. They avoid other issues, for example with NBD uses /dev/nbd0 that, on shutdown-initramfs is present on /oldroot/dev/nbd0 (this one node is used) and /dev/nbd0 => we can not umount /oldroot/dev/ directly, we need mount --move /oldroot/dev over /dev and continue.... -- Gerardo Exequiel Pozzi \cos^2\alpha + \sin^2\alpha = 1