Hello Everyone,
In the default version of Kickstart default
which is shipped with the
Foreman 1.3.1 RPM on CentOS, I see the following line:
(
cp -va /etc/resolv.conf /mnt/sysimage/etc/resolv.conf
/usr/bin/chvt 1
) 2>&1 | tee /mnt/sysimage/root/install.postnochroot.log
Where does the file /etc/resolv.conf
come from?
I ask because my servers are ending up with a resolv.conf which works
during the provisioning process, but not afterwards. I'm trying to figure
out what is the best way to fix /etc/resolv.conf.
Thanks,
-= Stefan
> In the default version of Kickstart default
which is shipped with the Foreman 1.3.1 RPM on CentOS, I see the following line:
>
> (
> cp -va /etc/resolv.conf /mnt/sysimage/etc/resolv.conf
> /usr/bin/chvt 1
> ) 2>&1 | tee /mnt/sysimage/root/install.postnochroot.log
>
> Where does the file /etc/resolv.conf
come from?
I'm not as familiar with RHEL based systems personally, but at a guess, I'd say the intent is to copy DNS settings that were written to resolv.conf by the DHCP daemon in the initrd/livecd environment into the chroot that the OS is installed into. So the version of /etc/resolv.conf it's copying was generated by DHCPd on the initrd.
> I ask because my servers are ending up with a resolv.conf which works during the provisioning process, but not afterwards. I'm trying to figure out what is the best way to fix /etc/resolv.conf.
Depends on whether you're using DHCP or static IP's. If DHCP (which seems likely given PXE boot for the installation), it should JustWork™, assuming your DHCP servers are providing DNS server entries in their response.
Is DHCP running on the host after install completes? Is there any indication in /etc/resolv.conf on the installed host (after reboot) that "this file is managed by DHCPd" or similar? Has anything changed /etc/nsswitch.conf such that DNS wouldn't be used? Not sure if RHEL tries to run a local caching resolver like recent Ubuntu tries to do, but if so, make sure that's running & responding to queries.
Best regards,
Zac Bedell
···
On Dec 16, 2013, at 9:10 PM, Stefan Lasiewski wrote:
Yes indeed! My guess is that NetworkManager generated a temporary version
of this file during the Kickstart process, and then Foreman copies this
file into the permanent location on the new system.
[root@node01 ~]# cat /etc/resolv.conf
Generated by NetworkManager
domain example.org
search example.org
nameserver 192.168.25.25
[root@node01 ~]#
···
On Tuesday, December 17, 2013 6:52:06 AM UTC-8, Zachary Bedell wrote:
>
> On Dec 16, 2013, at 9:10 PM, Stefan Lasiewski <ste...@stefanco.com> > wrote:
>
> >
> > Where does the file `/etc/resolv.conf` come from?
>
> I'm not as familiar with RHEL based systems personally, but at a guess,
> I'd say the intent is to copy DNS settings that were written to resolv.conf
> by the DHCP daemon in the initrd/livecd environment into the chroot that
> the OS is installed into. So the version of /etc/resolv.conf it's copying
> was generated by DHCPd on the initrd.
>