resolver not working in a chroot

Matthew Seaman matthew at freebsd.org
Tue Jan 19 10:40:55 UTC 2016


On 01/19/16 09:45, Perry Hutchison wrote:
> The resolver is not working in a chroot (to the 10.2 memstick image,
> with its /tmp, /var/run, and /var/tmp made writable by mounting tmpfs
> on them):
>   # chroot -u 0 -g 0 -G 105,0,5,20,25 /mnt ping pkg.FreeBSD.org
>   ping: cannot resolve pkg.FreeBSD.org: Host name lookup failure
> 
> but it works when not in a chroot:
>   # ping pkg.FreeBSD.org
>   PING pkg.FreeBSD.org (96.47.72.71): 56 data bytes
>   64 bytes from 96.47.72.71: icmp_seq=0 ttl=51 time=97.329 ms
>   ...
> 
> What would cause this?
> 

You've mounted the 10.2 memstick image on /mnt?  Do you have a devfs
mounted inside the chroot?  Try running:

   # mount -t devfs devfs /mnt/dev

and then try your chroot'ed command again.  Interesting to see if that
helps.

	Cheers,

	Matthew


-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 801 bytes
Desc: OpenPGP digital signature
URL: <http://lists.freebsd.org/pipermail/freebsd-questions/attachments/20160119/8ab127f1/attachment.sig>


More information about the freebsd-questions mailing list