Skip to content

Instantly share code, notes, and snippets.

@jacobweinstock
Created January 6, 2023 19:44
Show Gist options
  • Save jacobweinstock/22996970b15b4108baead2e6359df2fe to your computer and use it in GitHub Desktop.
Save jacobweinstock/22996970b15b4108baead2e6359df2fe to your computer and use it in GitHub Desktop.
use a custom ipxe script with tinkerbell hardware.yaml
apiVersion: tinkerbell.org/v1alpha1
kind: Hardware
metadata:
annotations:
name: "pxe-uefi"
namespace: tink-system
spec:
disks:
- device: /dev/nvme0n1
interfaces:
- dhcp:
arch: x86_64
hostname: pxe-uefi
ip:
address: 192.168.2.158
gateway: 192.168.2.1
netmask: 255.255.255.0
lease_time: 86400
mac: 52:54:00:ee:0d:0b
name_servers:
- 1.1.1.1
netboot:
allowPXE: true
allowWorkflow: true
metadata:
facility:
facility_code: onprem
instance:
hostname: pxe-uefi
id: 52:54:00:ee:0d:0b
# userdata must start with `#!ipxe`: https://github.com/tinkerbell/boots/blob/aee8a507b6f3d069f7dfa41f921eb1130342dfff/installers/customipxe/main.go#L44
userdata: |
#!ipxe
echo this is a custom ipxe script
shell
# if userdata is set, ipxe_script_url is not used. https://github.com/tinkerbell/boots/blob/aee8a507b6f3d069f7dfa41f921eb1130342dfff/installers/customipxe/main.go#L46
ipxe_script_url: https://boot.netboot.xyz
operating_system:
distro: custom_ipxe
manufacturer:
slug: libvirt
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment