FS#40266 - Empty resolv.conf after PXE boot
Attached to Project:
Release Engineering
Opened by Maciej (loper) - Thursday, 08 May 2014, 09:28 GMT
Last edited by Gerardo Exequiel Pozzi (djgera) - Monday, 18 January 2016, 04:17 GMT
Opened by Maciej (loper) - Thursday, 08 May 2014, 09:28 GMT
Last edited by Gerardo Exequiel Pozzi (djgera) - Monday, 18 January 2016, 04:17 GMT
|
Details
Description:
I'm having problem with resolv.conf. After booting LiveCD (every version), sometimes it's empty. Problem occurs when using more than 1 interface and probably when one of them isn't connected. Mostly it takes place when I'm booting Arch under ESXi 5.5.0 (but I think it occures under VirtualBox too). After running 'dhcpcd' resolv.conf is filled and has correct data. Adding 'copy_resolvconf=y' to kernel params doesn't help. Also FYI: I'm using iPXE to boot this ISO. Steps to reproduce: 1. Boot ArchLinux ISO on any machine (ie. virtual) with 2 or more NIC's 2. Log in as root and cat /etc/resolv.conf - it will be empty or containing empty line 3. Try to ping any foreign domain, ie. google.com - it should fail 4. Run 'dhcpcd' and check if resolv.conf is filled correctly - fixed It should work automatically, not by explicite calling 'dhcpcd or systemctl start dhcpcd@'. Any ideas? |
This task depends upon
Closed by Gerardo Exequiel Pozzi (djgera)
Monday, 18 January 2016, 04:17 GMT
Reason for closing: No response
Monday, 18 January 2016, 04:17 GMT
Reason for closing: No response
what are the contents of /tmp/net-*.conf (in initramfs) in both cases? (use break=postmount cmdline)
In /tmp/net-eth1.conf are the same values as shown in the snapshot (IPV4DNS0, 1 and DNSDOMAIN are filled correctly).
Maybe this 'copy_resolvconf' parameter isn't working correctly. Where I can find any manual for IPCONFIG command used in the 'archiso_pxe_common' hook?
2) if /etc/resolv.conf on real-root is empty then also /etc/resolv.conf in initramfs is empty otherwise should be the default shipped with the package.
in code:
# setup DNS resolver
if [[ "${IPV4DNS0}" != "0.0.0.0" ]]; then
echo "nameserver ${IPV4DNS0}" > /etc/resolv.conf
fi
if [[ "${IPV4DNS1}" != "0.0.0.0" ]]; then
echo "nameserver ${IPV4DNS1}" >> /etc/resolv.conf
fi
and
if [[ "${copy_resolvconf}" != "n" && -f /etc/resolv.conf ]]; then
cp /etc/resolv.conf /new_root/etc/resolv.conf
fi
". /tmp/net-*.conf"
is causing problems? One file (ie. net-eth0.conf) has IPV4DNS0 and other (net-eth1.conf) has IPV4DNS0=0.0.0.0 and overrides this first?