BUGS > 2012.1.1

DHCP dns update problem when booting in live mode


When booting in live mode, the DHCP client script never updates /etc/resolv.conf for both nameservers, or search domains. To do anything requiring DNS in live mode, I always have to edit /etc/resolv.conf manually. When installing to HD, the dhcp client does update /etc/resolv.conf automatically, so I'm not sure if this is truly a bug, or intended behaviour, but it is annoying to never have DNS working in live mode. This goes back to at least the last couple releases of aptosid as well, so it's not a new bug.

IMHO this is not a bug because this depends of recognizing the dhcp server configuration, esp. dhcp options. I dont know if is possible to modify the initram init script or siduction start scripts.

If you ever use your live cd in the same environment (pxe) you shoud modify your live cd filesystem (rc.local) otherwise you shoud use ceni.

typically this is handled by /sbin/dhclient-script so either it's missing in the live image, or has been modified or something. I'll look into it and see if it's there, and still in original condition. I've had to hack in this script before to get DHCP assigned hostnames to actually work (for a lab image that's used for numerous machines, and thus needs the DHCP server to tell each box what it's hostname needs to be)

So of course the normal dhcp client isn't used during boot in live, ipconfig is used instead, but ipconfig has the relevant DHCP options available (and even prints the first 2 DNS server addresses from DHCP during boot). See http://www.unix.com/man-page/all/8/ipconfig/ Couldn't these be stored in environment variables where ipconfig is being called in configure_networking() in /scripts/functions, then later stuffed into /etc/resolv.conf once the root has been pivoted and is in ram, by another script?

I don't have any time to look at this further tonight, but I'll try to implement my idea above within a couple days, and have some patches if it works!

Thanks a lot for your explanations. Please post your ideas here, Im sure our "kernel-image-master" towo have a look at this ...


[0] Message Index

Go to full version