Skip to content

Instantly share code, notes, and snippets.

@jbweber
Last active November 9, 2025 13:45
Show Gist options
  • Select an option

  • Save jbweber/68c3f7d80dfa7abdd5342489cb7c0191 to your computer and use it in GitHub Desktop.

Select an option

Save jbweber/68c3f7d80dfa7abdd5342489cb7c0191 to your computer and use it in GitHub Desktop.
talos pxe boot
#!ipxe
# Set Talos version
set talos-version v1.11.5
set base-url http://10.230.230.10/talos
# Boot Talos
kernel ${base-url}/vmlinuz-amd64 initrd=initramfs-amd64.xz talos.platform=metal pti=on slab_nomerge console=ttyS0 console=tty0
initrd ${base-url}/initramfs-amd64.xz
boot
#!/bin/bash
# Set Talos version
TALOS_VERSION="v1.11.5" # Check https://github.com/siderolabs/talos/releases for latest
# Create directory
sudo mkdir -p /var/www/images/talos
# Download kernel and initramfs
cd /var/www/images/talos
sudo curl -LO https://github.com/siderolabs/talos/releases/download/${TALOS_VERSION}/vmlinuz-amd64
sudo curl -LO https://github.com/siderolabs/talos/releases/download/${TALOS_VERSION}/initramfs-amd64.xz
# Optional: Download disk image for installation
# sudo curl -LO https://github.com/siderolabs/talos/releases/download/${TALOS_VERSION}/metal-amd64.raw.xz
# Fix SELinux context
sudo restorecon -R -v /var/www/images/talos
# disable dns
port=0
# bind
interface=ens2
bind-dynamic
# Configure listening for DNS (0 disables DNS)
dhcp-ignore=!known
dhcp-range=10.230.230.0,static # static range
dhcp-option=1,255.255.255.0 # netmask
dhcp-option=3,10.230.230.1 # router
dhcp-option=6,10.230.230.1 # dns
dhcp-option=15,cofront.xyz # domain
dhcp-host=10.230.230.200,3c:ec:ef:43:1c:6e,super
enable-tftp
tftp-root=/var/lib/tftpboot
# match option 175 as ipxe
dhcp-match=set:ipxe,175
# 3951086164 vendor class: PXEClient:Arch:00007:UNDI:003010 supermicro intel nic
dhcp-match=set:efi-x86_64,option:client-arch,7 # efi byte code
dhcp-match=set:efi-x86_64,option:client-arch,9 # x86_64
#dhcp-match=set:efi,option:client-arch,11 # arm32
#dhcp-match=set:efi,option:client-arch,16 # arm64
# ipxe-bootimgs-x86
# /usr/share/ipxe/ipxe-snponly-x86_64.efi
# restorecon -R /var/lib/tftpboot
dhcp-boot=tag:!ipxe,tag:efi-x86_64,ipxe-snponly-x86_64.efi,10.230.230.101
dhcp-boot=tag:ipxe,boot.ipxe,,10.230.230.101
log-dhcp
# dnf install nginx
# mkdir -p /var/www/build-images
# restorecon -R /var/www/build-images
user nginx;
worker_processes auto;
error_log /var/log/nginx/error.log;
pid /run/nginx.pid;
events {
worker_connections 1024;
}
http {
log_format main '$remote_addr - $remote_user [$time_local] "$request" '
'$status $body_bytes_sent "$http_referer" '
'"$http_user_agent" "$http_x_forwarded_for"';
access_log /var/log/nginx/access.log main;
sendfile on;
tcp_nopush on;
keepalive_timeout 65;
types_hash_max_size 4096;
include /etc/nginx/mime.types;
default_type application/octet-stream;
server {
listen 80 default_server;
listen [::]:80 default_server;
root /var/www/build-images;
location / {
autoindex on;
autoindex_exact_size off;
autoindex_localtime on;
}
}
}
# Set to PXE boot
ipmitool -I lanplus -H bmc.example.org -U username -P password chassis bootdev pxe options=efiboot
# Power cycle
ipmitool -I lanplus -H bmc.example.org -U username -P password chassis power cycle
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment