ipxe chainload zu opsi tftp

Antworten
monokuai
Beiträge: 3
Registriert: 08 Aug 2019, 16:39

ipxe chainload zu opsi tftp

Beitrag von monokuai »

Hallo,

es besteht ein Problem mit unserer IPXE/OPSI tftp-infrastruktur, die ich derzeit nicht gelöst bekomme.

Was ist das Problem:
Vorab: Es handelt sich um eine Windows 10 x64 UEFI Boot (Uefi-Modul ist eingekauft und vorhanden) installation.

Nun die Schritte in Reihenfolge, damit nicht nur ihr, sondern ich auch einen besseren Überblick habe:
- Im OPSI-Configed wird ein neuer Client inkl. UEFI-Boot angelegt
- Client wird gestartet
- erhält IP vom DHCP-Server (Windows Server 2019) sowie Optionen 66/67
- Client bootet vom ipxe-Server und ipxe-menu wird angezeigt
- Nutzer wählt "OPSI-Prod" aus um sich mit OPSI-PXE zu verbinden
- Client verbindet sich mit OPSI-PXE und lädt die 01-${MAC} Datei aus dem /tftpboot/linux/pxelinux.cfg/ Verzeichnis
- Mehr passiert nichts. Nach einigen Sekunden steht auf dem Bildschirm der normale "ELILO-BOOT:" und es folgenden tausende punkte, und irgendwann startet der Client neu.

/var/log/syslog

Code: Alles auswählen

Aug  8 16:33:09 opsi in.tftpd[26310]: RRQ from 192.168.100.20 filename /linux/pxelinux.cfg/01-ab-cd-ef-gh-ij-kl
Aug  8 16:33:09 opsi in.tftpd[26311]: RRQ from 192.168.100.20 filename /linux/pxelinux.cfg/elilo-x86_64.conf
Aug  8 16:33:09 opsi in.tftpd[26312]: RRQ from 192.168.100.20 filename /linux/pxelinux.cfg/elilo.conf
ipxe-config für den Chainload

Code: Alles auswählen

:opsi-prod
set net0/next-server 192.168.100.2
set net0/filename /linux/pxelinux.cfg/elilo.efi
set 210:string tftp://${net0/next-server}${net0/filename}
chain ${210:string}
Kennt jemand ein solches Problem und weiß, wie es zu lösen ist? Über vernünftige Hinweise bin ich immer dankbar!
Benutzeravatar
m.radtke
uib-Team
Beiträge: 1517
Registriert: 10 Jun 2015, 12:19

Re: ipxe chainload zu opsi tftp

Beitrag von m.radtke »

Hi

ist denn ein Produkt auf Setup gesetzt?
elilo verhält sich anders als pxelinux.
Wenn im uefi Modus nichts auf Setup steht wird eine Default config an den Client geschickt die dann von /dev/sda booten soll. Wenn es /dev/sda nicht gibt, weil es ein NVME Gerät ist, greift das natürlich nicht.
elilo ist im Default so kompiliert, das es im Fehlerfall unendlich lange die Punkte zeichnet.

Hier gibt es eine elilo.efi die im Fehlerfall nach zwei Sekunden in den nächsten Booteintrag springt.

Gruß
Mathias
Kein Support per DM!
_________________________
opsi support - http://www.uib.de/
For productive opsi installations we recommend support contracts.
monokuai
Beiträge: 3
Registriert: 08 Aug 2019, 16:39

Re: ipxe chainload zu opsi tftp

Beitrag von monokuai »

Hallo m.radtke,

im Verzeichnis /tftpboot/linux/pxelinux.cfg/ wird ja eine Datei mit dem Namen 01-{mac-adresse-des-clients} erstellt. Diese wird nur erstellt, wenn Win10 auf Setup gestellt ist. Entsprechend ja, es ist etwas auf Setup gesetzt.

Zusätzlich zu erwähnen ist, dass der OPSE-PXE-UEFI Boot vorher funktioniert hat, wenn auf dem DHCP-Server die Optionen 66 und 67 direkt für den OPSI-PXE eingestellt waren:

Code: Alles auswählen

Option 66: opsi.example.de
Option 67: linux/pxelinux.cfg/elilo.efi
Daher zweifle ich, dass der Grund bei elilo.efi liegt. Aber werde es dennoch morgen testen und berichten.

Ich überlege ob es vielleicht am ipxe.efi liegt, daher weitere Informationen zu IPXE:
- auf https://rom-o-matic.eu/ (standard)

Code: Alles auswählen

EFI x86_x64 snponly (.efi)
ausgewählt
- als script folgendes hinzugefügt, um die start.ipxe zu laden:

Code: Alles auswählen

#!ipxe
dhcp
chain http://pxe.example.de/start.ipxe
Überlegung kommt daher, dass bei ipxe sehr viele Optionen gibt, die beim selber kompilieren einstellen kann, und ich bin da relativ neu auf dem ipxe Gebiet.

Wenn es ggf. am ipxe.efi liegt, probiere ich es selbst zu kompilieren. Beim letzten Test gab es aber probleme BZI einzubinden, daher nicht weiter verfolgt und den standard vom rom-o-mantic verwendet.

edit:

Code: Alles auswählen

chain tftp://pxe.example.de/start.ipxe
geändert zu

Code: Alles auswählen

chain http://pxe.example.de/start.ipxe
Zuletzt geändert von monokuai am 08 Aug 2019, 22:46, insgesamt 2-mal geändert.
Benutzeravatar
SisterOfMercy
Beiträge: 1522
Registriert: 22 Jun 2012, 19:18

Re: ipxe chainload zu opsi tftp

Beitrag von SisterOfMercy »

I have the exact issue with a self-compiled iPXE.

FreeBSD with bhyve as VM host. Bhyve does not support legacy booting windows, uefi only. Bhyve currently does not support network booting, so my workaround is to start iPXE, just like stuff like ReFind does.

My elilo.conf has been changed slightly, so it does not matter in my setup what action is chosen, uefi network boot means ending up in the bootimage.

I think iPXE can be configured to just skip elilo and boot the necessary kernel stuff. I have not gotten around to this yet.
Bitte schreiben Sie Deutsch, when I'm responding in the German-speaking part of the forum!
monokuai
Beiträge: 3
Registriert: 08 Aug 2019, 16:39

Re: ipxe chainload zu opsi tftp

Beitrag von monokuai »

Hallo,

kaum Gesund schon geht's wieder an die Arbeit :)

Ich habe die elilo.efi vom Server geladen und ausprobiert, leider ohne Erfolg.
Bei dieser elilo.efi meldet der, dass der Kernel vmlinuz nicht gefunden werden kann.

Es handelt sich dabei um _keine_ NVME Festplatte, es ist eine Standard Samsung SSD 850 EVO.

Hatte zusätzlich probiert, den Kernel und initrd direkt zu laden, was soweit auch funktioniert, aber dann mit einem Kernel Panic quittiert.
Hier gehe ich davon aus, dass OPSI sowieso nicht für solch einen Zweck gedacht ist (kernel und initrd direkt zu laden), evtl. gibt es noch eine weitere Methode?

Ich teste derzeit verschiedene Optionen für ipxe -> uefi tftp aus, vllt. habt ihr ja noch ein Tipp für ipxe, ggf. fehlt ein Schalter.
Derzeitige ipxe-opsi config:

Code: Alles auswählen

:opsi-prod
set url tftp://192.168.20.1
set netX/next-server 192.168.20.1
set netX/filename linux/pxelinux.cfg/elilo.efi
chain tftp://${netX/next-server}/${netX/filename}
#chain tftp://192.168.20.1/linux/pxelinux.cfg/elilo.efi
#chain ${url}/linux/pxelinux.cfg/elilo.efi
Wie man sehen kann, liegt es dennoch weiterhin daran, dass die 01-{MAC} Datei geladen wird, nur passiert danach nichts mehr.
Auch die Netzwerkauslastung zeigt keine Informationen an, da nichts Gesendet/Empfangen wird.

Code: Alles auswählen

Aug 19 17:03:34 opsi in.tftpd[13091]: RRQ from 192.168.20.20 filename linux/install-x64
Aug 19 17:03:36 opsi in.tftpd[13094]: RRQ from 192.168.20.20 filename linux/miniroot-x64.bz2
Aug 19 17:15:14 opsi in.tftpd[13747]: RRQ from 192.168.20.20 filename linux/install-x64
Aug 19 17:15:17 opsi in.tftpd[13756]: RRQ from 192.168.20.20 filename linux/miniroot-x64.bz2
Aug 19 17:20:11 opsi in.tftpd[14008]: RRQ from 192.168.20.20 filename linux/install-x64
Aug 19 17:20:19 opsi in.tftpd[14035]: RRQ from 192.168.20.20 filename linux/miniroot-x64.bz2
Aug 19 17:28:56 opsi in.tftpd[14481]: RRQ from 192.168.20.20 filename linux/pxelinux.cfg/elilo.efi
Aug 19 17:28:56 opsi in.tftpd[14489]: RRQ from 192.168.20.20 filename linux/pxelinux.cfg/01-90-1b-0e-bf-03-51
Aug 19 17:28:57 opsi in.tftpd[14490]: RRQ from 192.168.20.20 filename linux/pxelinux.cfg/01-90-1b-0e-bf-03-51
Aug 19 17:29:24 opsi in.tftpd[14525]: RRQ from 192.168.20.20 filename linux/pxelinux.cfg/elilo.conf
Aug 19 17:39:10 opsi in.tftpd[15091]: RRQ from 192.168.20.20 filename linux/pxelinux.cfg/elilo.efi
Aug 19 17:39:10 opsi in.tftpd[15099]: RRQ from 192.168.20.20 filename linux/pxelinux.cfg/01-90-1b-0e-bf-03-51
Aug 19 17:39:11 opsi in.tftpd[15100]: RRQ from 192.168.20.20 filename linux/pxelinux.cfg/01-90-1b-0e-bf-03-51
Aug 19 17:39:38 opsi in.tftpd[15142]: RRQ from 192.168.20.20 filename linux/pxelinux.cfg/elilo.conf
Aug 19 17:43:50 opsi systemd[1]: Stopping Opsi TFTPD HPA Configuration Service...
Aug 19 17:43:50 opsi systemd[1]: Stopped Opsi TFTPD HPA Configuration Service.
Aug 19 17:43:50 opsi systemd[1]: Starting Opsi TFTPD HPA Configuration Service...
Aug 19 17:43:50 opsi systemd[1]: Started Opsi TFTPD HPA Configuration Service.
Aug 19 17:44:02 opsi systemd[1]: Stopping Opsi TFTPD HPA Configuration Service...
Aug 19 17:44:02 opsi systemd[1]: Stopped Opsi TFTPD HPA Configuration Service.
Aug 19 17:44:02 opsi systemd[1]: Starting Opsi TFTPD HPA Configuration Service...
Aug 19 17:44:02 opsi systemd[1]: Started Opsi TFTPD HPA Configuration Service.
Aug 19 17:45:22 opsi in.tftpd[15567]: RRQ from 192.168.20.20 filename linux/pxelinux.cfg/elilo.efi
Aug 19 17:45:22 opsi in.tftpd[15577]: RRQ from 192.168.20.20 filename linux/pxelinux.cfg/elilo.conf
Interessant beim Syslog ist, dass er anscheinend die 01-{MAC} überspringt, aber dennoch beim testen immer wieder verschwindet, nach dem sich der Client mit dem OPSI-Server verbunden hat.

/var/log/syslog

Code: Alles auswählen

Aug 19 17:43:50 opsi systemd[1]: Stopping Opsi TFTPD HPA Configuration Service...
Aug 19 17:43:50 opsi systemd[1]: Stopped Opsi TFTPD HPA Configuration Service.
Aug 19 17:43:50 opsi systemd[1]: Starting Opsi TFTPD HPA Configuration Service...
Aug 19 17:43:50 opsi systemd[1]: Started Opsi TFTPD HPA Configuration Service.
Aug 19 17:43:59 opsi systemd[1]: Reloading.
Aug 19 17:44:02 opsi systemd[1]: Stopping Opsi TFTPD HPA Configuration Service...
Aug 19 17:44:02 opsi systemd[1]: Stopped Opsi TFTPD HPA Configuration Service.
Aug 19 17:44:02 opsi systemd[1]: Starting Opsi TFTPD HPA Configuration Service...
Aug 19 17:44:02 opsi systemd[1]: Started Opsi TFTPD HPA Configuration Service.
Aug 19 17:45:22 opsi in.tftpd[15567]: RRQ from 192.168.20.20 filename linux/pxelinux.cfg/elilo.efi
Aug 19 17:45:22 opsi in.tftpd[15568]: RRQ from 192.168.20.20 filename linux/pxelinux.cfg/C25F9AAE.conf
Aug 19 17:45:22 opsi in.tftpd[15569]: RRQ from 192.168.20.20 filename linux/pxelinux.cfg/C25F9A-x86_64.conf
Aug 19 17:45:22 opsi in.tftpd[15570]: RRQ from 192.168.20.20 filename linux/pxelinux.cfg/C25F9A.conf
Aug 19 17:45:22 opsi in.tftpd[15571]: RRQ from 192.168.20.20 filename linux/pxelinux.cfg/C25F-x86_64.conf
Aug 19 17:45:22 opsi in.tftpd[15572]: RRQ from 192.168.20.20 filename linux/pxelinux.cfg/C25F.conf
Aug 19 17:45:22 opsi in.tftpd[15573]: RRQ from 192.168.20.20 filename linux/pxelinux.cfg/C2-x86_64.conf
Aug 19 17:45:22 opsi in.tftpd[15574]: RRQ from 192.168.20.20 filename linux/pxelinux.cfg/C2.conf
Aug 19 17:45:22 opsi in.tftpd[15575]: RRQ from 192.168.20.20 filename linux/pxelinux.cfg/01-90-1b-0e-bf-03-51
Aug 19 17:45:22 opsi in.tftpd[15576]: RRQ from 192.168.20.20 filename linux/pxelinux.cfg/elilo-x86_64.conf
Aug 19 17:45:22 opsi in.tftpd[15577]: RRQ from 192.168.20.20 filename linux/pxelinux.cfg/elilo.conf
Benutzeravatar
ueluekmen
uib-Team
Beiträge: 1939
Registriert: 28 Mai 2008, 10:53

Re: ipxe chainload zu opsi tftp

Beitrag von ueluekmen »

Hi,

ich kenne mich mit ipxe nicht aus, aber unser Standard TFTP arbeitet mit einem Basisverzeichnis, meistens /tftpboot oder /var/lib/tftpboot in der Pipe stehen die Steueranweisungen die immer relativ zu den Files wie miniroot und vmlinuz gehen. Ich weiß nicht wie dein Konstrukt läuft, aber ich denke an der Ecke würde ich Anfangen zu suchen.
opsi support - uib gmbh
For productive opsi installations we recommend support contracts.
http://www.uib.de
Benutzeravatar
SisterOfMercy
Beiträge: 1522
Registriert: 22 Jun 2012, 19:18

Re: ipxe chainload zu opsi tftp

Beitrag von SisterOfMercy »

monokuai hat geschrieben:Kennt jemand ein solches Problem und weiß, wie es zu lösen ist? Über vernünftige Hinweise bin ich immer dankbar!
How does the rest of the environment look? Is iPXE used with other UEFI boot scenarios?
I've read this: https://forums.virtualbox.org/viewtopic ... 36#p314036 (which is old, so iPXE may have changed, with the common UEFI computer nowadays)

If you try a non-UEFI boot with iPXE to OPSI, does that work?
Bitte schreiben Sie Deutsch, when I'm responding in the German-speaking part of the forum!
Antworten