@startuml

actor admin 
participant "BIOS Node\n(legacy boot)" as bootnode
participant "QIP DHCP" as dhcp
participant "pxeserv01.psi.ch" as pxeserver
participant "boot00.psi.ch" as sysdb
participant "repo00.psi.ch" as reposerver

admin -> bootnode : boots up

hnote over bootnode
    BIOS
endhnote
bootnode -> dhcp : DHCP request
dhcp -> bootnode : IP + PXE boot location
bootnode -> pxeserver : load PXE kernel tftp:/tftpboot/pxelinux.0

hnote over bootnode
    PXE
endhnote
bootnode -> pxeserver : load PXE config tftp:/tftpboot/pxelinux.cfg/01-$MAC
note right
    By manually setting a MAC or IP config the
    boot menu can be customised or shortcut.
    Most is managed by symlinks. There is the
    undocumented "link-to-lxprod.py" script for
    manually linking MAC to hostname and hostname
    to "lxprod". At some places this is done the
    opposite by linking hostname to MAC to "lxprod".
    Having the **link to "lxprod" loads directly**
    **the iPXE kernel "boot00.lkrn"**, shortcutting
    the manual selection below.
end note
bootnode -> pxeserver : load PXE config tftp:/tftpboot/pxelinux.cfg/$HEX-IP
bootnode -> pxeserver : load PXE config tftp:/tftpboot/pxelinux.cfg/default
note right
    **Default selection is local boot**,
    but also visible and manually selectable are
    - Red Hat 7 Network Install
    - Windows Network install
    and many more which are hidden, but can 
    be selected from the prompt, some with
    comments from 2013.
end note
admin -> bootnode :  selects "Red Hat 7 Network Install"
bootnode -> pxeserver : load iPXE kernel tftp:/tftpboot/boot00.lkrn
note right
    https://git.psi.ch/linux-infra/ipxe-build
    The following steps are by embed/pxe.ipxe
end note

hnote over bootnode
    iPXE
endhnote
bootnode -> dhcp : DHCP request
dhcp -> bootnode : IP
bootnode -> sysdb : load iPXE menu http:/ipxe/v1/config?mac=$MAC
note right
    Default selection by sydb boot
    property "local" or "netboot",
    later automatically starts the
    installer configured in sysdb
    attribute "ipxe_installer".
    Manually selectable are all
    Red Hat 7 versions and Red Hat 8
    alpha test version to install,
    Windows, a selection of tools
    and "HP SPP".
endnote
bootnode -> reposerver : load initrd http:/iso/rhel-server-7.9-x86_64-dvd/images/pxeboot/initrd.img
bootnode -> reposerver : load kernel http:/iso/rhel-server-7.9-x86_64-dvd/images/pxeboot/vmlinuz

hnote over bootnode
    Linux kernel
endhnote
bootnode -> reposerver : installation media http:/iso/rhel-server-7.9-x86_64-dvd/ 
bootnode -> sysdb : kickstart file http:/kickstart/v1/config?fqdn=$HOSTNAME&instrepo=rhel-server-7.9-x86_64-dvd

@enduml


