[Gelöst] Nach Update auf 4.3 kein PXE-Bootmenü mehr (dnsmasq DHCPProxy)

MyKey0815
Beiträge: 94
Registriert: 01 Jul 2008, 17:15

Re: Nach Update auf 4.3 kein PXE-Bootmenü mehr

Beitrag von MyKey0815 »

Ich möchte hier nur eines nochmal ausdrücklich erwähnen:

Es geht hierbei um das Standard-PXE-Menü - also das, wo man zwischen "booten von HD" und "Booten mit Opsi" wählen kann. Also das, was prüft, ob ein Netzwerk-Boot aktiviert wurde.

Der Client ist also noch nicht in OPSI in der Datenbank und soll nun per Hardware-Invent die erstmalige Datenübetragung machen (als nächster Schritt folgt dann die Konfiguration der Pakete. Dann nochmal neustart und dann wird win11 installiert - so unser Plan)

An sich scheint es kein Problem mit dnsmasq zu sein, weil ja die Option "next server" laut log gesetzt wird:
2025-01-24 16_08_40-forum.opsi.org - Antwort erstellen – Mozilla Firefox.png
2025-01-24 16_08_40-forum.opsi.org - Antwort erstellen – Mozilla Firefox.png (23.07 KiB) 615 mal betrachtet
Trotzdem hier meine dnsmasq.conf

Code: Alles auswählen

interface=ens18

# Don't function as a DNS server:
port=0

# Log lots of extra information about DHCP transactions.
log-dhcp

# This range(s) is for the public interface, where dnsmasq functions
# as a proxy DHCP server providing boot information but no IP leases.
# Any ip in the subnet will do, so you may just put your server NIC ip here.
dhcp-range=192.168.2.251,proxy

# next server option
dhcp-option=66,192.168.2.251

# The boot filename.
#dhcp-boot=pxelinux.0,bpc002252,192.168.2.0
#dhcp-boot=pxelinux.cfg/elilo.efi,192.168.2.251

# kill multicast
#dhcp-option=vendor:PXEClient,6,2b

# Disable re-use of the DHCP servername and filename fields as extra
# option space. That's to avoid confusing some old or broken DHCP clients.
dhcp-no-override

# inspect the vendor class string and match the text to set the tag
dhcp-vendorclass=BIOS,PXEClient:Arch:00000
dhcp-vendorclass=UEFI32,PXEClient:Arch:00006
dhcp-vendorclass=UEFI,PXEClient:Arch:00007
dhcp-vendorclass=UEFI64,PXEClient:Arch:0000

# Set the boot file name based on the matching tag from the vendor class (above)
dhcp-boot=net:UEFI32,opsi/opsi-linux-bootimage/loader/shimx64.efi.signed,,192.168.2.251
dhcp-boot=net:UEFI,opsi/opsi-linux-bootimage/loader/shimx64.efi.signed,,192.168.2.251
dhcp-boot=net:UEFI64,opsi/opsi-linux-bootimage/loader/shimx64.efi.signed,,192.168.2.251
dhcp-boot=net:BIOS,opsi/opsi-linux-bootimage/loader/opsi-netboot.bios,,192.168.2.251


# PXE menu
#pxe-prompt="Press F8 for boot menu", 10

# The known types are x86PC, PC98, IA64_EFI, Alpha, Arc_x86,
# Intel_Lean_Client, IA32_EFI, BC_EFI, Xscale_EFI and X86-64_EFI
# 4.2
#pxe-service=X86PC, "Boot from network for BIOS", pxelinux
#pxe-service=X86-64_EFI, "Boot from network for UEFI64", pxelinux.cfg/elilo.efi
#pxe-service=BC_EFI, "Boot from network for UEFI", pxelinux.cfg/elilo.efi

# 4.3
pxe-service=X86PC, "Boot from network for BIOS", opsi/opsi-linux-bootimage/loader/opsi-netboot.bios
pxe-service=X86-64_EFI, "Boot from network for UEFI64", opsi/opsi-linux-bootimage/loader/shimx64.efi.signed
pxe-service=BC_EFI, "Boot from network for UEFI", opsi/opsi-linux-bootimage/loader/shimx64.efi.signed


# Set the root directory for files available via FTP and enable-tftp
#tftp-root=/tftpboot/linux

MyKey0815
Beiträge: 94
Registriert: 01 Jul 2008, 17:15

Re: Nach Update auf 4.3 kein PXE-Bootmenü mehr

Beitrag von MyKey0815 »

Ich habe heute nochmal an meiner dnsmasq herum gemacht. Leider aber ohne Erfolg.

Ein Tipp war, dass ich die Option 66 direkt setze:

Code: Alles auswählen

# next server option
dhcp-option=66,"192.168.2.251"
Leider aber auch nichts.

Wo könnte ich jetzt weiter suchen, warum die bootip nicht korrekt gesetzt wird (ist nämlich die Gateway-Adresse)
MyKey0815
Beiträge: 94
Registriert: 01 Jul 2008, 17:15

Re: Nach Update auf 4.3 kein PXE-Bootmenü mehr

Beitrag von MyKey0815 »

Leider bin ich immer noch nicht weiter gekommen, was das Problem betrifft.

Frage: hab ich überhaupt die aktuellen Pakete? Oder gibt es mittlerweile schon neuere (experimentelle) die ich verwenden sollte?

Code: Alles auswählen

root@cv002251:/home/administrator# dpkg -l | grep opsi
ii  opsi-linux-bootimage                  20240715-3                                 all          opsi bootimage for netboot tasks.
ii  opsi-server-full                      4.3.5.1-1                                  all          opsi server
ii  opsi-tftpd-hpa                        5.2.8-80                                   amd64        HPA's tftp server
ii  opsi-utils                            4.3.11.2-1                                 amd64        Utilities for working with opsi
ii  opsi-webgui                           4.3.43-1                                   all          opsi webgui
ii  opsiconfd                             4.3.26.24-1                                amd64        opsi configuration service
ii  opsipxeconfd                          4.3.6.0-1                                  amd64        opsi pxe configuration service
Ich bin mir schon sicher, das das Problem bei mir liegen muss (Proxmox, dnsmaq, VM-Client), denn bei so vielen anderen läuft es ja. Aber trotzdem würde ich gern der Ursache auf den Grund gehen wollen.

Was mich wundert ist ja, dass es wohl nicht TFTP und PXE generell sein muss, da ja a) es in 4.2 stabil gelaufen ist und b) die Boot-Datei ja übertragen wird. Und dann, wenn ich im GRUB-Fenster den Befehl

Code: Alles auswählen

configfile (tftp,192.168.2.251)opsi/opsi-linux-bootimag/cfg/grub.cfg
eingebe, dann kommt das OPSI Hintergrundbild - aber leider nicht mehr.

Gibt es noch einen Tipp wie ich herausfinden kann, was die Ursache ist, da wir das Projekt gerne vorwärts bringen möchten.
Benutzeravatar
m.radtke
uib-Team
Beiträge: 1721
Registriert: 10 Jun 2015, 12:19

Re: Nach Update auf 4.3 kein PXE-Bootmenü mehr

Beitrag von m.radtke »

Hi

Wieso am grub eine falsche Adresse ankommt, kann ich leider nicht sagen, der nimmt ja das was ihm gegeben wird.
mit DNSMasq habe ich persönlich keine Erfahrung. Da es aber mit Windows DHCP Server und mit ISC bzw Kea funktioniert, gehe ich erstmal von einem DNSMasq Problem aus.

Um was für ein Gerät handelt es sich auf dem du nach Eingabe des letztens Befehls keine weitere Interaktion kommt.

Siehst du ob TFTP Anfragen danach kommen?

Gruß
Mathias
Kein Support per DM!
_________________________
opsi support - http://www.uib.de/
For productive opsi installations we recommend support contracts.
MyKey0815
Beiträge: 94
Registriert: 01 Jul 2008, 17:15

Re: Nach Update auf 4.3 kein PXE-Bootmenü mehr

Beitrag von MyKey0815 »

Ich würde im ersten Moment auch auf dnsmasq tippen, was die Ursache angeht - wenn es nicht mit 4.2 perfekt geklappt hätte. Wenn ich den Snapshot mit 4.2 zurücknehme, kann die VM die PXE Informationen erhalten und kommt zum bekannten Boot-Auswahlmenü

Der VM-Client sieht wie folgt aus:
2025-01-28 12_00_06-pve002080 - Proxmox Virtual Environment – Mozilla Firefox.png
2025-01-28 12_00_06-pve002080 - Proxmox Virtual Environment – Mozilla Firefox.png (20.88 KiB) 475 mal betrachtet
2025-01-28 12_00_23-pve002080 - Proxmox Virtual Environment – Mozilla Firefox.png
2025-01-28 12_00_23-pve002080 - Proxmox Virtual Environment – Mozilla Firefox.png (25.46 KiB) 475 mal betrachtet
HIer der syslog

Code: Alles auswählen

Jan 28 12:06:09 cv002251 dnsmasq-dhcp[689]: 594398744 available DHCP subnet: 192.168.2.251/255.255.255.0
Jan 28 12:06:09 cv002251 dnsmasq-dhcp[689]: 594398744 vendor class: PXEClient:Arch:00000:UNDI:002001
Jan 28 12:06:09 cv002251 dnsmasq-dhcp[689]: 594398744 user class: iPXE
Jan 28 12:06:09 cv002251 dnsmasq-dhcp[689]: 594398744 PXE(ens18) bc:24:11:13:34:b2 proxy
Jan 28 12:06:09 cv002251 dnsmasq-dhcp[689]: 594398744 tags: BIOS, UEFI64, ens18
Jan 28 12:06:09 cv002251 dnsmasq-dhcp[689]: 594398744 bootfile name: opsi/opsi-linux-bootimage/loader/opsi-netboot.bios
Jan 28 12:06:09 cv002251 dnsmasq-dhcp[689]: 594398744 next server: 192.168.2.251
Jan 28 12:06:09 cv002251 dnsmasq-dhcp[689]: 594398744 broadcast response
Jan 28 12:06:09 cv002251 dnsmasq-dhcp[689]: 594398744 sent size:  1 option: 53 message-type  2
Jan 28 12:06:09 cv002251 dnsmasq-dhcp[689]: 594398744 sent size:  4 option: 54 server-identifier  192.168.2.251
Jan 28 12:06:09 cv002251 dnsmasq-dhcp[689]: 594398744 sent size:  9 option: 60 vendor-class  50:58:45:43:6c:69:65:6e:74
Jan 28 12:06:09 cv002251 dnsmasq-dhcp[689]: 594398744 sent size: 17 option: 97 client-machine-id  00:13:f9:ed:69:04:75:1e:45:a7:c6:bc:91:0a...
Jan 28 12:06:09 cv002251 dnsmasq-dhcp[689]: 594398744 sent size: 50 option: 43 vendor-encap  06:01:03:0a:04:00:50:58:45:08:07:80:00:01...
Jan 28 12:06:09 cv002251 dnsmasq-dhcp[689]: 594398744 available DHCP subnet: 192.168.2.251/255.255.255.0
Jan 28 12:06:09 cv002251 dnsmasq-dhcp[689]: 594398744 vendor class: PXEClient:Arch:00000:UNDI:002001
Jan 28 12:06:09 cv002251 dnsmasq-dhcp[689]: 594398744 user class: iPXE
Jan 28 12:06:09 cv002251 dnsmasq-dhcp[689]: 0 available DHCP subnet: 192.168.2.251/255.255.255.0
Jan 28 12:06:09 cv002251 dnsmasq-dhcp[689]: 0 vendor class: PXEClient
Jan 28 12:06:09 cv002251 dnsmasq-dhcp[689]: 0 user class: iPXE
Jan 28 12:06:09 cv002251 dnsmasq-dhcp[689]: 0 PXE(ens18) 192.168.2.190 bc:24:11:13:34:b2 opsi/opsi-linux-bootimage/loader/opsi-netboot.bios
Jan 28 12:06:09 cv002251 dnsmasq-dhcp[689]: 0 tags: ens18
Jan 28 12:06:09 cv002251 dnsmasq-dhcp[689]: 0 bootfile name: opsi/opsi-linux-bootimage/loader/opsi-netboot.bios
Jan 28 12:06:09 cv002251 dnsmasq-dhcp[689]: 0 next server: 192.168.2.251
Jan 28 12:06:09 cv002251 dnsmasq-dhcp[689]: 0 broadcast response
Jan 28 12:06:09 cv002251 dnsmasq-dhcp[689]: 0 sent size:  1 option: 53 message-type  5
Jan 28 12:06:09 cv002251 dnsmasq-dhcp[689]: 0 sent size:  4 option: 54 server-identifier  192.168.2.251
Jan 28 12:06:09 cv002251 dnsmasq-dhcp[689]: 0 sent size:  9 option: 60 vendor-class  50:58:45:43:6c:69:65:6e:74
Jan 28 12:06:09 cv002251 dnsmasq-dhcp[689]: 0 sent size: 17 option: 97 client-machine-id  00:13:f9:ed:69:04:75:1e:45:a7:c6:bc:91:0a...
Jan 28 12:06:09 cv002251 dnsmasq-dhcp[689]: 0 sent size:  7 option: 43 vendor-encap  47:04:80:00:00:00:ff
Jan 28 12:06:09 cv002251 in.tftpd[3595]: RRQ from 192.168.2.190 filename opsi/opsi-linux-bootimage/loader/opsi-netboot.bios
Jan 28 12:12:07 cv002251 in.tftpd[4228]: RRQ from 192.168.2.190 filename /opsi/opsi-linux-bootimage/cfg/grub.cfg
Mehr kommt leider nicht im syslog
Benutzeravatar
m.radtke
uib-Team
Beiträge: 1721
Registriert: 10 Jun 2015, 12:19

Re: Nach Update auf 4.3 kein PXE-Bootmenü mehr

Beitrag von m.radtke »

Mit opsi 4.2 wurde PXELinux statt grub2 verwendet.

Da wir ja auch Proxmox in großem Ausmaß intern verwendet, schliesse ich erstmal aus das es ein grundsätzliches Problem ist.

Setz dochh mal die VM in der Option Machine auf i440fx 8.1 oder 7.2 und probiere es dann. Zusätzlich kannst du die FIrewall der Netzwerkkarte mal deaktivieren, vielleicht funkt die dazwischen.

Gruß
Mathias
Kein Support per DM!
_________________________
opsi support - http://www.uib.de/
For productive opsi installations we recommend support contracts.
MyKey0815
Beiträge: 94
Registriert: 01 Jul 2008, 17:15

Re: Nach Update auf 4.3 kein PXE-Bootmenü mehr

Beitrag von MyKey0815 »

Dies Thema können wir hier jetzt schließen - Danke für die Geduld und den Input (zwar sind viele Punkte hier nicht die Lösung gewesen, aber ich hab verdammt viel gelernt, was Debugging von OPSI angeht)

Ursache: die Firewall am OPSI-Server(!) nicht am Client, war das Problem. Die hab ich grad deaktiviert und danach kam das Bootmenü

Wie bin ich drauf gekommen? Ich hab einen richtigen PC gestartet (also Hardware) und da war das selbe Problem. Darum konnte die Ursache folglich nur am Server sein, denn das Beide Clients das dasselbe Problem haben (Virtuell und Hardware) ist ja unwahrscheinlich.

Ich werde das Thema mit GELÖST markieren - und als Referenz für Troubleshooting mir merken
MyKey0815
Beiträge: 94
Registriert: 01 Jul 2008, 17:15

Re: Nach Update auf 4.3 kein PXE-Bootmenü mehr

Beitrag von MyKey0815 »

Leider muss ich nochmal auf das Thema kommen, denn gestern ging es genau 1x - danach nicht mehr.

Ich hab jetzt mal eine Wireshark laufen lassen und an sich sieht alles gut aus:

DHCP/DHCPProxy übergeben die Adresse "NEXT SERVER" korrekt
2025-01-29 10_19_02-2999.pcap.png
2025-01-29 10_19_02-2999.pcap.png (43.6 KiB) 371 mal betrachtet
Dann beginnt ganz normal die Übertragung der Daten per TFTP
2025-01-29 10_21_12-2999.pcap.png
2025-01-29 10_21_12-2999.pcap.png (31.52 KiB) 371 mal betrachtet
Erst dann, wenn dann wieder eine weitere Datei geladen werden soll, dann fragt er zunächst nach der falschen IP (.2.10 statt .2.251) und findet dann nicht die Datei
2025-01-29 10_22_06-2999.pcap.png
2025-01-29 10_22_06-2999.pcap.png (36.44 KiB) 371 mal betrachtet
Das gleiche Verhalten auch mit richtiger Hardware als Client

Das PCAP-File wurde über

Code: Alles auswählen

tcpdump -envi tap2999i0 -w 2999.pcap
erstellt (2999 = id der VM), d.h das liegt zwischen Firewall von PVE und der VM (Quelle: https://www.apalrd.net/posts/2023/tip_pcap/)
MyKey0815
Beiträge: 94
Registriert: 01 Jul 2008, 17:15

Re: Nach Update auf 4.3 kein PXE-Bootmenü mehr

Beitrag von MyKey0815 »

Ich nähere mich jetzt Stück für Stück.

Hab meine dnsmasq.conf komplett umgebaut

Code: Alles auswählen

interface=ens18

# Don't function as a DNS server:
port=0

# Log lots of extra information about DHCP transactions.
log-dhcp
log-queries

# This range(s) is for the public interface, where dnsmasq functions
# as a proxy DHCP server providing boot information but no IP leases.
# Any ip in the subnet will do, so you may just put your server NIC ip here.
dhcp-range=192.168.2.0,proxy

# BIOS
dhcp-match=set:bios,60,PXEClient:Arch:00000
dhcp-boot=tag:bios,opsi/opsi-linux-bootimage/loader/opsi-netboot.bios,,192.168.2.251
# UEFI x86
dhcp-match=set:efi32,60,PXEClient:Arch:00002
dhcp-boot=tag:efi32,opsi/opsi-linux-bootimage/loader/shimx64.efi.signed,,192.168.2.251
# UEFI x86 (Alternate)
dhcp-match=set:efi32-1,60,PXEClient:Arch:00006
dhcp-boot=tag:efi32-1,opsi/opsi-linux-bootimage/loader/shimx64.efi.signed,,192.168.2.251
# UEFI x64
dhcp-match=set:efi64,60,PXEClient:Arch:00007
dhcp-boot=tag:efi64,opsi/opsi-linux-bootimage/loader/shimx64.efi.signed,,192.168.2.251
# UEFI x64 (Alternate 1)
dhcp-match=set:efi64-1,60,PXEClient:Arch:00008
dhcp-boot=tag:efi64-1,opsi/opsi-linux-bootimage/loader/shimx64.efi.signed,,192.168.2.251
# UEFI x64 (Alternate 2)
dhcp-match=set:efi64-2,60,PXEClient:Arch:00009
dhcp-boot=tag:efi64-2,opsi/opsi-linux-bootimage/loader/shimx64.efi.signed,,192.168.2.251
# HTTP(s) Booting
#dhcp-match=set:http,60,HTTPClient*
#dhcp-boot=tag:http,http://192.168.50.83:4433/netboot.xyz.efi
#dhcp-option=tag:http,60,HTTPClient
Ergebnis:
BIOS in VMs geht - sogar zuverlässig und nach mehrmaligen Neustarts von PVE und/oder Client
BIOS mit Hardware geht nicht - es kommt zwar die Anfrage an, aber so wie es aussieht, bekommt der Client keine Antwort. Hab auf dem PVE Host den Dienst pve-firewall gestoppt - aber trotzdem kommt nichts an - ich werde dass noch prüfen mit wireshark

UEFI geht weder als VM noch als Hardware
MyKey0815
Beiträge: 94
Registriert: 01 Jul 2008, 17:15

Re: [Gelöst] Nach Update auf 4.3 kein PXE-Bootmenü mehr

Beitrag von MyKey0815 »

Hier folgendes als Ergebinis meiner Nachforschungen:

dnsmasq als DHCP-Proxy mit der Verwendung von Grub GEHT NICHT (aktuell). Das Problem ist seit 2019 bekannt und wurde bisher in keiner Version von Grub "gefixt"

Zitat:
In the rescue shell, I see that $net_efinet0_dhcp_server_name has the correct proxyDHCP=TFTP server IP, but grub is using $net_default_server instead, which has the real DHCP server IP, which is not a TFTP server.
https://savannah.gnu.org/bugs/index.php?55636

D.h.: Mit OPSI 4.3 ist dnsmasq als DHCPProxy nicht mehr nutzbar. Vielleicht hilft dem einem oder anderen dieser Hinweis bei der Fehlersuche.

@ALLE: Danke für die Geduld und den Input. Ich hab einiges gelernt dabei - auch was wireshark/proxmox & Co angeht.
Antworten