FS#63174 - [mkinitcpio-archiso] please fall back to 8.8.8.8 for DNS server

Attached to Project: Release Engineering
Opened by Alexander E. Patrakov (patrakov) - Friday, 12 July 2019, 19:07 GMT
Last edited by David Runge (dvzrv) - Friday, 18 February 2022, 18:14 GMT
Task Type Bug Report
Category Hardware Issues
Status Closed
Assigned To David Runge (dvzrv)
Architecture All
Severity Low
Priority Normal
Reported Version
Due in Version Undecided
Due Date Undecided
Percent Complete 100%
Votes 0
Private No

Details

Description:

I am currently working on integration of static IP support for booting from https://netboot.xyz . That is, the user is supposed to boot their PC from their ISO which contains iPXE. This already works fine if they have DHCP, but not if they press "m" and configure a static IP. I was going to fix that, but stumbled upon an incomplete implementation of IP configuration in the archiso_pxe_common hook.

The problem is that there is no way to pass a DNS server when configuring a static IP via ip=... parameter (busybox ipconfig just doesn't support it), and as a result the resolv.conf file isn't created at all.

There is some code in the archiso_pxe_common hook to deal with ip=... parameters other than ip=dhcp, so I assume it is supposed to be useful. But it isn't, because there is no way to specify the DNS server together with the static IP.

Please provide a kernel command line option to set the DNS server for this case, or (better?) just unconditionally fall back to 8.8.8.8 if not doing DHCP.

Steps to reproduce in QEMU without netboot.xyz:

```
mirror=http://mirror.rackspace.com/archlinux
release=2019.07.01
wget ${mirror}/iso/${release}/arch/boot/x86_64/vmlinuz
wget ${mirror}/iso/${release}/arch/boot/x86_64/archiso.img

# The exercise here is to pretend that there is no DHCP server and still boot successfully.
# There is no possible value of ipparam that does it. Tried:
ipparam="10.0.2.42::10.0.2.2:255.255.255.0 BOOTIF=01-52:54:00:12:34:56" # nowhere to specify the DNS server
ipparam="10.0.2.42::10.0.2.2:255.255.255.0::eth0:none:8.8.8.8" # as documented in nfsroot.txt, but ipconfig chokes on the DNS server specification


qemu-system-x86_64 -m 2048 -enable-kvm -cpu host -kernel vmlinuz -initrd archiso.img \
-append "archiso_http_srv=${mirror}/iso/${release}/ archisobasedir=arch verify=y ip=${ipparam} net.ifnames=0 systemd.mask=dhcpcd@eth0.service"
```
This task depends upon

Closed by  David Runge (dvzrv)
Friday, 18 February 2022, 18:14 GMT
Reason for closing:  Deferred
Additional comments about closing:  Closing in favor of https://gitlab.archlinux.org/mkinitcpio/ mkinitcpio-archiso/-/issues/11
Comment by David Runge (dvzrv) - Tuesday, 25 August 2020, 16:10 GMT
@patrakov: Thanks for the report.

Note, that I'm about to split out mkinitcpio-archiso from archiso [1] and after that will add a ticket for this here issue to its issue tracker on our gitlab.

[1] https://gitlab.archlinux.org/archlinux/infrastructure/-/issues/103

Loading...