[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#362029: Installer doesn't create /etc/resolv.conf -- reproduction recipe



I can still reproduce this with the latest mini.iso I can find on
ftp.debian.org (20101127).  To be absolutely clear, this is what I'm doing
to show the problem:

1) Setup a DHCP server that provides an address and default route, but does
not provide any DNS servers or domain name.

2) Boot the ISO, answer the usual language/keymap questions

3) After the hardware is detected and the network is configured using DHCP,
the first question that is asked is "Name server addresses:"
(netcfg/get_nameservers), then "Hostname:" (netcfg/get_hostname), and then
"Domain name:" (netcfg/get_domain).  Answer each appropriately.

4) When the "Debian archive mirror country:" question appears, Alt+F3, enter
the console, and then cat /etc/resolv.conf, and note that lo! there is
nothing there.  On a full-DHCP configuration (or an all-static endeavour)
you get a file with sensible-looking contents instead.

Grovelling through the code suggests that the problem is that if we're using
DHCP, we *absolutely* rely on udhcpc to write resolv.conf for us, which of
course doesn't write anything if it didn't get anything relevant.  At no
point in the "ask questions manually" mechanism do we actually *write* any
of the requested data out.  What makes it really tricky is that we could get
one of the two items via DHCP and ask the other manually, and we can't just
bulldoze an existing (but incomplete) resolv.conf and rewrite it with
*other* incomplete information...

I'm working on understanding the code properly, and covering all the corner
cases, and should have a patch Real Soon Now.

- Matt



Reply to: