Problem:
PXE templates are being rendered with “foreman.domain.com” on all external smart proxies which causes systems to fail provisioning. Manual modification to grub2.cfg, menu.lst and default are overridden every time PXE default templates are built.
Expected outcome:
When building PXE default templates, URLs should reflect the hostname and ports specific to the smart proxy they are rendered on (i.e. proxy.domain.com:8000)
Foreman and Proxy versions:
Foreman 3.0
Katello 4.2
Distribution and version:
Rocky Linux 8.5
Other relevant data:
What renders
menuentry 'Chainload into BIOS bootloader on second disk' --id local_chain_legacy_hd1 {
set root=(hd1,0)
chainloader +1
boot
}
common="rootflags=loop root=live:/fdi.iso rootfstype=auto ro rd.live.image acpi=force rd.luks=0 rd.md=0 rd.dm=0 rd.lvm=0 rd.bootif=0 rd.neednet=0 nokaslr nomodeset proxy.url=https://foreman.domain.com proxy.type=foreman BOOTIF=01-$net_default_mac"
if [ ${grub_platform} == "pc" ]; then
menuentry 'Foreman Discovery Image' --id discovery {
linux boot/fdi-image/vmlinuz0 ${common}
initrd boot/fdi-image/initrd0.img
}
else
menuentry 'Foreman Discovery Image EFI' --id discovery {
linuxefi boot/fdi-image/vmlinuz0 ${common}
initrdefi boot/fdi-image/initrd0.img
}
fi
menuentry 'Provisioning_CentOS-7 - CentOS-7_Dell-7700' {
linuxefi boot/centos-7_os-1-vmlinuz ks=http://foreman.domain.com/unattended/template/CentOS-7_Dell-7700/Provisioning_CentOS-7 ksdevice=bootif network kssendmac ks.sendmac inst.ks.sendmac
initrdefi boot/centos-7_os-1-initrd.img
}
What should render
type or pamenuentry 'Chainload into BIOS bootloader on second disk' --id local_chain_legacy_hd1 {
set root=(hd1,0)
chainloader +1
boot
}
common="rootflags=loop root=live:/fdi.iso rootfstype=auto ro rd.live.image acpi=force rd.luks=0 rd.md=0 rd.dm=0 rd.lvm=0 rd.bootif=0 rd.neednet=0 nokaslr nomodeset proxy.url=https://pxy-foreman-01.domain.com:9090 proxy.type=proxy BOOTIF=01-$net_default_mac"
if [ ${grub_platform} == "pc" ]; then
menuentry 'Foreman Discovery Image' --id discovery {
linux boot/fdi-image/vmlinuz0 ${common}
initrd boot/fdi-image/initrd0.img
}
else
menuentry 'Foreman Discovery Image EFI' --id discovery {
linuxefi boot/fdi-image/vmlinuz0 ${common}
initrdefi boot/fdi-image/initrd0.img
}
fi
menuentry 'Provisioning_CentOS-7 - CentOS-7_Dell-7700' {
linuxefi boot/centos-7_os-1-vmlinuz ks=http://pxy-foreman-01.domain.com:8000/unattended/template/CentOS-7_Dell-7700/Provisioning_CentOS-7 ksdevice=bootif network kssendmac ks.sendmac inst.ks.sendmac
initrdefi boot/centos-7_os-1-initrd.imgste code here