Solved resolv.conf

How does resolv.conf get populated?

I'm trying to create such a file but find it is linked to /tmp/bsdinstall_etc/resolv.conf
 
When in doubt use the manual pages. So in this case man resolv.conf which will showcase resolver(5) (the resolv.conf is an alias).

But that also brings us to yet another way to populate this file: resolvconf(8). Leading up the (IMO funny) manual page resolvconf.conf(5).

So yeah... this file can be managed by several processes, where dhclient is simply the most obvious one.
 
My situation is that I'm installing FreeBSD from an ISO

Code:
mount /dev/gpt/rootfs /mnt/ufs
tar zxf /mnt/repo/iso/BSD/FreeBSD-11.1-RELEASE-amd64-bootonly.iso -C /mnt/ufs
then doing a little customisation by creating an /etc/fstab and /etc/rc.conf

The /etc/rc.conf includes
Code:
ifconfig_em0="DHCP"
so dhclient is started during boot, but /etc/resolv.conf does not get populated, so when logging on ping 8.8.8.8 works, but ping google.com doesn't.
 
Try ifconfig_em0="SYNCDHCP" instead of ifconfig_em0="DHCP".

Just tried but it didn't make any difference.

For some reason /etc/resolv.conf is linked to /tmp/bsdinstall_etc/resolv.conf...

Maybe I should try to break that link...
 
It worked after ran unlink!

Thanks to all that helped.

I've managed the get firstboot working now
 
Back
Top