You are not logged in.
Pages: 1
Hey Folks,
I've an problem setting DNS server(s) during PXE boot.
The domain-name-servers option is set in the isc config.
option domain-name-servers 1.2.3.4
I can see the options in the DHCP lease (values changed)
host eee.stinga.local {
dynamic;
hardware ethernet 00:11:22:33:44:55;
fixed-address 192.168.178.15;
supersede domain-name-servers = concat (c0:a8:b1:1a, c0:a8:b1:11);
supersede server.filename = "pxelinux.0";
supersede server.next-server = c0:a8:b1:1a;
supersede host-name = "eee.stinga.local";
}
But at the arch PXE Boot I got the following output
...
IP-Config: eth0 complete (from 1.2.3.4):
adress: 1.2.3.5 broadcast: ...
gateway: 1.2.3.6 dns0: 0.0.0.0 dns1: 0.0.0.0
...
Can anyone give me a hint whats wrong?
thanks in advance
Last edited by stingA0815 (2016-06-01 11:16:44)
Offline
Sorry, I think thats the wrong thread, is it possible to move this post to "System Administration". Isn't realy an install Problem.
my fault
Offline
Are you using ArchISO and dnsmasq? Looks like this is not a permanent installation.
In stateless DHCP mode, you don't really need to be that specific unless you've a need for that.
Just use the normal DHCP configuration and it'll work fine.
Other distributions such as FreeBSD, or OpenBSD don't use stateless mode.
Last edited by nomorewindows (2016-05-25 17:17:52)
I may have to CONSOLE you about your usage of ridiculously easy graphical interfaces...
Look ma, no mouse.
Offline
Ok, sorry some more info.
I'm using foreman to provision unattended archlinux installations. I've got nearly all up and running. The only thing ist, that the dns resolution didn't work on PXE boot. The problem is that I give the image an script parameter that can't be resolved.
LABEL arch_http
TEXT HELP
Boot the Arch Linux (Using HTTP)
ENDTEXT
MENU LABEL Boot Arch Linux (HTTP)
LINUX boot/Archlinux-1.0-i386-linux
INITRD boot/Archlinux-1.0-i386-initrd
APPEND archisobasedir=arch archiso_http_srv=http://192.168.178.11/archlinux/iso/latest/ script=http://foreman.stinga.local:80/unattended/provision?token=ae5a0e0c-007a-4cdb-ad42-d323eb206afe net.ifnames=0
IPAPPEND 3
In this case the archiso_http_srv will not be resolved if it is an fqdn.
I'm using the official Kernel and Initramfs from http://ftp-stud.fht-esslingen.de/pub/Mi … ot/x86_64/. The DNS Server is isc-dhcp-server 4.3.1-6+deb8u2.
thx
Last edited by stingA0815 (2016-05-25 17:21:57)
Offline
Ok, sorry some more info.
I'm using foreman to provision unattended archlinux installations. I've got nearly all up and running. The only thing ist, that the dns resolution didn't work on PXE boot. The problem is that I give the image an script parameter that can't be resolved.
LABEL arch_http TEXT HELP Boot the Arch Linux (Using HTTP) ENDTEXT MENU LABEL Boot Arch Linux (HTTP) LINUX boot/Archlinux-1.0-i386-linux INITRD boot/Archlinux-1.0-i386-initrd APPEND archisobasedir=arch archiso_http_srv=http://192.168.178.11/archlinux/iso/latest/ script=http://foreman.stinga.local:80/unattended/provision?token=ae5a0e0c-007a-4cdb-ad42-d323eb206afe net.ifnames=0 IPAPPEND 3
In this case the archiso_http_srv will not be resolved if it is an fqdn.
I'm using the official Kernel and Initramfs from http://ftp-stud.fht-esslingen.de/pub/Mi … ot/x86_64/. The DNS Server is isc-dhcp-server 4.3.1-6+deb8u2.
thx
Even though dns shoud be passed at PXE boot time, You have IP for archiso_http_srv, but then using hostname resolution for the script. Maybe the script server should have a permanent IP as most servers do. :80 is probably not needed. Are you using puppet? If your machine is x86_64, you may want to use that instead of i386, although that won't have any factor on dns servers received from dhcp. If you are doing unattended installs, you might be using specifics in dhcp. However, you can just run Arch from PXE without the need to install it, but not sure your application, you might be trying to infect the computer world with Arch fever instead of something else!
Last edited by nomorewindows (2016-05-25 17:40:12)
I may have to CONSOLE you about your usage of ridiculously easy graphical interfaces...
Look ma, no mouse.
Offline
Thats just a "lab setup". The DNS resolution would be the perfection. This is meant to be used in a *production* infrastructure and need to be *very* flexible.
e.g. an template would look like
DEFAULT menu
PROMPT 0
MENU TITLE Archlinux Installer
TIMEOUT 50
TOTALTIMEOUT 6000
ONTIMEOUT arch_http
LABEL arch_http
TEXT HELP
Boot the Arch Linux (Using HTTP)
ENDTEXT
MENU LABEL Boot Arch Linux (HTTP)
LINUX <%= @kernel %>
INITRD <%= @initrd %>
APPEND archisobasedir=arch archiso_http_srv=<%= @host.os.medium_uri(@host) %>/iso/latest/ script=<%= foreman_url('provision')%> net.ifnames=0
IPAPPEND 3
If the host.os.medium_uri(@host) is an static IP the setup is *very static* and I need a Template for each network.. can't use Templates:-(
Last edited by stingA0815 (2016-05-26 10:21:47)
Offline
In the fallback console /tmp/net-eth0.conf hasn't set all the options. If I ran ipconfig eth0 all is set correctly.
Offline
But regardless of which machine you are PXE booting, you are still attempting to run the same process? Unless foreman does something different to it, that it requires the state mode. If you are using (g)pxelinux.0, there is a way to script it to provoke the architecture correct kernel for your setup. This may mean that you need a PXE install for each architecture available.
Why don't you just try a "simple" dhcpd.conf taking advantage of Arch's stateless dhcp for PXE and tell me what happens? (Ofc extracted from package default).
subnet xxx.xxx.xxx.xxx netmask yyy.yyy.yyy.yyy {
range xxx.xxx.xxx.xxx xxx.xxx.xxx.xxx;
option routers xxx.xxx.xxx.xxx;
option domain-name-servers xxx.xxx.xxx.xxx;
next-server xxx.xxx.xxx.xxx;
filename "/pxelinux.0";
}
This may or may not work with arch-iso:
/srv/tftp/pxelinux.cfg/default
prompt 5
label arch32
kernel arch32/boot/vmlinuz-linux
append initrd=arch32/boot/initramfs-linux.img rootfstype=nfs root=/dev/nfs nfsroot=xxx.xxx.xxx.xxx:/srv/tftp/arch32 ip=::::::dhcp
I may have to CONSOLE you about your usage of ridiculously easy graphical interfaces...
Look ma, no mouse.
Offline
Ok, my configs
dhcpd.conf
# dhcpd.conf
omapi-port 7911;
default-lease-time 43200;
max-lease-time 86400;
ddns-update-style none;
option domain-name "stinga.local";
option domain-name-servers 192.168.178.10, 192.168.178.1;
option ntp-servers none;
allow booting;
allow bootp;
option fqdn.no-client-update on; # set the "O" and "S" flag bits
option fqdn.rcode2 255;
option pxegrub code 150 = text ;
# PXE Handoff.
next-server 192.168.178.10;
filename "pxelinux.0";
log-facility local7;
include "/etc/dhcp/dhcpd.hosts";
#################################
# stinga.local
#################################
subnet 192.168.178.0 netmask 255.255.255.0 {
pool
{
range 192.168.178.100 192.168.178.250;
}
option subnet-mask 255.255.255.0;
option broadcast-address 192.168.178.255;
option routers 192.168.178.1;
option domain-name "stinga.local";
option domain-name-servers 192.168.178.10, 192.168.178.1;
}
DEFAULT menu
PROMPT 0
MENU TITLE Archlinux Installer
TIMEOUT 50
TOTALTIMEOUT 6000
ONTIMEOUT arch_http
LABEL arch_http
TEXT HELP
Boot the Arch Linux (Using HTTP)
ENDTEXT
MENU LABEL Boot Arch Linux (HTTP)
LINUX boot/Archlinux-1.0-x86_64-linux
INITRD boot/Archlinux-1.0-x86_64-initrd
APPEND copy_resolvconf=n archisobasedir=arch archiso_http_srv=http://ftp-stud.fht-esslingen.de/pub/Mirrors/archlinux/iso/latest/ script=http://foreman.stinga.local:80/unattended/provision?token=7c45ca94-1c93-42af-a624-4077e06382ee net.ifnames=0
IPAPPEND 3
boot output
Loading boot/Archlinux-1.0-x86_64-linux
Loading boot/Archlinux-1.0-x86_64-initrd
Probing EDD (edd=off to disable)... ok
:: running hook [udev]
:: Triggering uevents...
:: running hook [memdisk]
:: running hook [archiso]
:: running hook [archiso_loop_mnt]
:: running hook [archiso_pxe_common]
IP-Config: eth0 hardware address 00:00:00:00:00:00 mtu 1500
IP-Config: eth0 guessed broadcast address 192.168.178.255
IP-Config: eth0 complete (from 192.168.178.10):
address: 192.168.178.15 broadcast: 192.168.178.255 netmask: 255.255.255.0
gateway: 192.168.178.1 dns0 : 0.0.0.0 dns1 : 0.0.0.0
rootserver: 192.168.178.10 rootpath:
filename :
:: running hook [archiso_pxe_nbd]
:: running hook [archiso_pxe_http]
:: running hook [archiso_pxe_nfs]
:: Mounting /run/archiso/httpspace (tmpfs) filesystem, size='75%'
:: Downloading 'http://ftp....'
curl: (6) Could not resolve host: ftp...
ERROR: Downloading 'http://ftp...'
Falling back to interactive prompt
If I ran the IP-Config cmd in the "interactive prompt"
ipconfig eth0
P-Config: eth0 hardware address 00:00:00:00:00:00 mtu 1500 DHCP RARP
IP-Config: eth0 complete (from 192.168.178.10):
address: 192.168.178.15 broadcast: 192.168.178.255 netmask: 255.255.255.0
gateway: 192.168.178.1 dns0 : 192.168.178.10 dns1 : 192.168.178.1
host : dnstest.stinga.local
domain : stinga.local
rootserver: 192.168.178.10 rootpath:
filename : pxelinux.0
Don't know which protocol ist used during boot (might be the problem).
The ip kernel param is overwritten/set twice if it's set manual.
The Archlinux-1.0-x86_64-initrd Archlinux-1.0-x86_64-linux arte the official ones from the archlinux-2016.05.01-dual.iso.
Last edited by stingA0815 (2016-05-26 15:01:20)
Offline
You might be able to take advantage of copy_resolvconf=y
Archiso acts a little different than a permant PXE install.
No MAC address, maybe check dmesg.
It is guessing about the broadcast address which makes me think your parameters aren't being passed to the kernel. Broadcast address could be determined from subnet.
You might have to trace the packets out with a packet sniffer.
Put something in for option rootpath in dhcpd.conf and see if it picks it up. Try it in global and then try it in your subnet section. Don't forget systemctl restart dhcpd4 each time.
You can practically download the pxe image over the network using https://releng.archlinux.org/pxeboot/, but unless you use a proxy server to catch it, you'll be redownloading it everytime. Not sure about setting a proxy server with the pxe image.
I may have to CONSOLE you about your usage of ridiculously easy graphical interfaces...
Look ma, no mouse.
Offline
Even though you can pull the kernel and initramfs out and boot it that way, you might also try memdisk to boot the image using the kernel that is probably embedded in the image file itself.
I may have to CONSOLE you about your usage of ridiculously easy graphical interfaces...
Look ma, no mouse.
Offline
What is the output of
cat /proc/cmdline
in interactive prompt?
ArchLinux - make it simple & lightweight
Offline
BOOT_IMAGE=boot/Archlinux-1.0-x86_64-linux copy_resolvconf=n archisobasedir=arch archiso_http_srv=http://ftp-stud.fht-esslingen.de/pub/Mirrors/archlinux/iso/latest/ script=http://foreman.stinga.local:80/unattended/provision?token=7c45ca94-1c93-42af-a624-4077e06382ee net.ifnames=0 initrd=boot/Archlinux-1.0-x86_64-initrd ip=192.168.178.100:192.168.178.10:192.168.178.1:255.255.255.0 BOOTIF=01-52-54-00-cd-84-38
I've tried setting the ip manually in the pxe.cfg, then it's set twice. thought I read that the ip settings are passed from pxe?
Offline
BOOT_IMAGE=boot/Archlinux-1.0-x86_64-linux copy_resolvconf=n archisobasedir=arch archiso_http_srv=http://ftp-stud.fht-esslingen.de/pub/Mirrors/archlinux/iso/latest/ script=http://foreman.stinga.local:80/unattended/provision?token=7c45ca94-1c93-42af-a624-4077e06382ee net.ifnames=0 initrd=boot/Archlinux-1.0-x86_64-initrd ip=192.168.178.100:192.168.178.10:192.168.178.1:255.255.255.0 BOOTIF=01-52-54-00-cd-84-38
I've tried setting the ip manually in the pxe.cfg, then it's set twice. thought I read that the ip settings are passed from pxe?
Damn, my browser discarded my detailed reply... So in short for now:
Replace the IPAPPEND line with
IPAPPEND 2
and try again.
ArchLinux - make it simple & lightweight
Offline
Ok, the IP settings are not passed now \o/.
tried adding them like
ip=:::::eth0:dhcp
then I'm getting
:: running hook [udev]
:: Triggering uevents...
:: running hook [memdisk]
:: running hook [archiso]
:: running hook [archiso_loop_mnt]
:: running hook [archiso_pxe_common]
ipconfig: too many options for eth0
fallback...
checked the README, that should work?
edit:
an manual ipconfig :::::eth0:dhcp in the fallback promt works
Last edited by stingA0815 (2016-06-01 10:47:23)
Offline
Ok, the IP settings are not passed now \o/.
tried adding them like
ip=:::::eth0:dhcp
then I'm getting
:: running hook [udev] :: Triggering uevents... :: running hook [memdisk] :: running hook [archiso] :: running hook [archiso_loop_mnt] :: running hook [archiso_pxe_common] ipconfig: too many options for eth0 fallback...
checked the README, that should work?
edit:
an manual ipconfig :::::eth0:dhcp in the fallback promt works
When booting with
IPAPPEND 2
what do do the boot parameters look like? Show the output of
cat /proc/cmdline
pxelinux should append something like this:
ip=::: BOOTIF=01-52-54-00-cd-84-38
If the ip parameter is missing try to add it, with tree colons.
ArchLinux - make it simple & lightweight
Offline
if
IPAPPEND 2
is set, only
BOOTIF=01-52-54-00-cd-84-38
is appended :-/
I checked the archiso_pxe_common hook
if [[ -n "${BOOTIF}" ]]; then
bootif_mac=${BOOTIF#01-}
bootif_mac=${bootif_mac//-/:}
for i in /sys/class/net/*/address; do
read net_mac < ${i}
if [[ "${bootif_mac}" == "${net_mac}" ]]; then
bootif_dev=${i#/sys/class/net/}
bootif_dev=${bootif_dev%/address}
break
fi
done
ip="${ip}::${bootif_dev}"
fi
so if I set
ip=:::
everything works!
can't find any doku for the
IPAPPEND
ist there anything?
Thank you very much!
Offline
Great!
So have fun with your pxe boot service.
Here's some documentation:
Doc/syslinux - Syslinux Wiki
archiso.git - The official archiso scripts repo (see hooks/archiso_pxe_common)
ArchLinux - make it simple & lightweight
Offline
if
so if I set
ip=:::
everything works!
Can't undestand how did you solve it. Could you please paste your complete config? Thanks.
Offline
Sure
cmdline: "archisobasedir=arch archiso_http_srv=http://ftp-stud.hs-esslingen.de/Mirrors/archlinux/iso/latest/ script={{ BaseURL }}/template/preseed/{{ Hostname }}/{{ Token }} net.ifnames=0 copy_resolvconf=n ip=:::"
If you have any further questions, you are welcome.
Offline
Sure
cmdline: "archisobasedir=arch archiso_http_srv=http://ftp-stud.hs-esslingen.de/Mirrors/archlinux/iso/latest/ script={{ BaseURL }}/template/preseed/{{ Hostname }}/{{ Token }} net.ifnames=0 copy_resolvconf=n ip=:::"
If you have any further questions, you are welcome.
Sorry but do i have to place that on append right? on pxelinux.cfg/default?
This is my current config
LABEL archlinux-test2
MENU LABEL Arch Linux TEST2 x86_64
LINUX /archlinux/arch/boot/x86_64/vmlinuz-linux
IPAPPEND 2
APPEND archisobasedir=arch archiso_http_srv=http://pxe.mysite.com/archlinux/ initrd=http://pxe.mysite.com/archlinux/arch/boot/x86_64/initramfs-linux.img,http://pxe.mysite.com/archlinux/arch/boot/intel-ucode.img,http://pxe.mysite.com/archlinux/arch/boot/amd-ucode.img
SYSAPPEND 3
TEXT HELP
Arch Linux 2020.10.01 x86_64
ENDTEXT
Thanks a lot for helping, i'm starting to go crazy with pxe.
Last edited by Keltere (2021-07-19 22:19:02)
Offline
Yes, you are absolutely right in the pxe Linux config context.
>Thanks a lot for helping, i'm starting to go crazy with pxe.
Ha! You are not alone in this, I have been doing this professionally for years and I still reach my limits.
Last edited by stingA0815 (2021-07-19 21:46:31)
Offline
Yes, you are absolutely right in the pxe Linux config context.
Tried but still can't get those dns
This is my config
LABEL archlinux-test3
MENU LABEL Arch Linux TEST3 x86_64
LINUX /archlinux/arch/boot/x86_64/vmlinuz-linux
IPAPPEND 2
APPEND archisobasedir=arch archiso_http_srv=http://pxe.mysite.com/archlinux/ initrd=http://pxe.mysite.com/archlinux/arch/boot/x86_64/initramfs-linux.img,http://pxe.mysite.com/archlinux/arch/boot/intel-ucode.img,http://pxe.mysite.com/archlinux/arch/boot/amd-ucode.img script={{ BaseURL }}/template/preseed/{{ Hostname }}/{{ Token }} net.ifnames=0 copy_resolvconf=n ip=:::
SYSAPPEND 3
TEXT HELP
Arch Linux 2020.10.01 x86_64
ENDTEXT
Do i need to replace BaseURL, Hostname and Token? Doubt but if yes, what are they refering to?
Last edited by Keltere (2021-07-19 22:17:38)
Offline
Ok, sorry for the quick and dirty copy paste, let me explain a bit of the config.
script={{ BaseURL }}/template/preseed/{{ Hostname }}/{{ Token }}
This is the script which will be executed once the live OS is up and running. I use this for unattended installations, if you are interested, I can provide them. In this case this is rendered by waitron. https://github.com/ns1/waitron
net.ifnames=0 copy_resolvconf=n
This is random stuff which I never removed after it worked
ifnames -> https://www.freedesktop.org/wiki/Softwa … faceNames/
copy_resolvconf -> afaik I picked it up in the common hook
ip=:::
This is the magical one, which lets the kernel live os do a additional dhcp request which leads into an proper dns setup, If this doesn't work for you, there might be another issue, but I will try to reproduce this tomorrow.
Last edited by stingA0815 (2021-07-19 22:11:41)
Offline
ip=:::
This is the magical one, which lets the
kernellive os do a additional dhcp request which leads into an proper dns setup, If this doesn't work for you, there might be another issue, but I will try to reproduce this tomorrow.
I've removed everything useless and even if i tried ip=::: before it didn't work but now it works just fine, maybe IPAPPEND 2 was causing some conflict.
For future users this is my current pxelinux config
LABEL archlinux
MENU LABEL Arch Linux x86_64
LINUX /archlinux/arch/boot/x86_64/vmlinuz-linux
APPEND archisobasedir=arch archiso_http_srv=http://pxe.mysite.com/archlinux/ initrd=http://pxe.mysite.com/archlinux/arch/boot/x86_64/initramfs-linux.img,http://pxe.mysite.com/archlinux/arch/boot/intel-ucode.img,http://pxe.mysite.com/archlinux/arch/boot/amd-ucode.img ip=:::
TEXT HELP
Arch Linux 2020.10.01 x86_64
ENDTEXT
Danke StingA0815
Last edited by Keltere (2021-07-19 22:20:18)
Offline
Pages: 1