Welcome, Guest. Please login or register.
Did you miss your activation email?

Author Topic:  DHCP dns update problem when booting in live mode  (Read 12586 times)

hwgasdfasdf

  • Guest
DHCP dns update problem when booting in live mode
« on: 2012/11/13, 09:44:43 »
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.

Offline ralfi

  • User
  • Posts: 390
DHCP dns update problem when booting in live mode
« Reply #1 on: 2012/11/14, 09:40:30 »
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.
Gruss, ralfi

Niveau sieht von unten oft wie Arroganz aus ...

hwgasdfasdf

  • Guest
RE: DHCP dns update problem when booting in live mode
« Reply #2 on: 2012/11/15, 01:32:58 »
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)

hwgasdfasdf

  • Guest
RE: DHCP dns update problem when booting in live mode
« Reply #3 on: 2012/11/15, 05:41:02 »
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!

Offline ralfi

  • User
  • Posts: 390
DHCP dns update problem when booting in live mode
« Reply #4 on: 2012/11/15, 09:05:48 »
Thanks a lot for your explanations. Please post your ideas here, Im sure our "kernel-image-master" towo have a look at this ...
Gruss, ralfi

Niveau sieht von unten oft wie Arroganz aus ...