### Install QEMU and Download ISO Source: https://github.com/netbootxyz/netboot.xyz-docs/blob/master/docs/booting/qemu.md Installs the necessary QEMU system package and downloads the latest netboot.xyz ISO for testing. ```bash sudo apt-get install -y qemu-system ovmf # download the latest combined Legacy and EFI iso wget https://boot.netboot.xyz/ipxe/netboot.xyz.iso ``` -------------------------------- ### Enable and Start dnsmasq Service Source: https://github.com/netbootxyz/netboot.xyz-docs/blob/master/docs/docker/dhcp.md Enables the dnsmasq service to start on boot and then starts the service immediately. Ensure the configuration file is correctly set up before running these commands. ```shell sudo systemctl enable dnsmasq sudo systemctl start dnsmasq ``` -------------------------------- ### Start Local Development Server Source: https://github.com/netbootxyz/netboot.xyz-docs/blob/master/README.md Starts a local development server for live previewing changes. Changes are reflected without restarting. ```bash yarn start ``` -------------------------------- ### Execute Windows Setup Source: https://github.com/netbootxyz/netboot.xyz-docs/blob/master/docs/kb/pxe/windows.md Launch the Windows setup executable from the mounted ISO share. This command should be run after successfully mounting the share in the Windows PE terminal. ```bash F:\\setup.exe ``` -------------------------------- ### Load Ubuntu Installer Kernel with iPXE Source: https://github.com/netbootxyz/netboot.xyz-docs/blob/master/docs/kb/pxe/ubuntu.md Use this iPXE snippet to load the Ubuntu installer kernel and initrd.gz from a specified mirror and version. It includes parameters for autoinstall and network configuration. ```bash set mirror http://releases.ubuntu.com set base_dir ubuntu set codename jammy set version_number 22.04 set os_arch amd64 set mirrorcfg mirror/suite=${ubuntu_version} set dir ${mirror}/${base_dir}/dists/${version}/main/installer-${arch}/current/images/netboot set ubuntu_iso_url http://releases.ubuntu.com/${codename}/ubuntu-${version_number}-live-server-${os_arch}.iso set install_params autoinstall ip=dhcp ds=nocloud-net;s=http://my.autoinstall.com/ url=${ubuntu_iso_url} kernel ${dir}/linux ${install_params} ${mirrorcfg} -- quiet initrd=initrd.gz initrd ${dir}/initrd.gz boot ``` -------------------------------- ### Install Docker on Red Hat Based Systems Source: https://github.com/netbootxyz/netboot.xyz-docs/blob/master/docs/docker/usage.md Installs Docker CE, CLI, containerd, and buildx/compose plugins on Red Hat-based systems using DNF. Enables and starts the Docker service. ```shell # Setup Repository sudo dnf -y install dnf-plugins-core sudo dnf config-manager --add-repo https://download.docker.com/linux/centos/docker-ce.repo # Install Docker sudo dnf install docker-ce docker-ce-cli containerd.io docker-buildx-plugin docker-compose-plugin # Start the Docker service sudo systemctl enable --now docker ``` -------------------------------- ### AlmaLinux Installer iPXE Boot Snippet Source: https://github.com/netbootxyz/netboot.xyz-docs/blob/master/docs/kb/pxe/almalinux.md Use this iPXE boot snippet to load the AlmaLinux installer kernels. Configure variables for mirror, version, and architecture as needed. The `inst.ks` parameter is crucial for automated installations. ```bash set install_params inst.ks=http://my.kickstart.com/ks.cfg inst.repo=http://repo.almalinux.org/almalinux/$version/BaseOS/$arch/os/ set mirror http://repo.almalinux.org set base_dir almalinux set version 8 set arch x86_64 set dir ${mirror}/${base_dir}/${version}/BaseOS/${arch}/os/images/pxeboot kernel ${dir}/vmlinuz ${install_params} -- quiet initrd ${dir}/initrd.img boot ``` -------------------------------- ### Start Netboot.xyz with Docker Compose Source: https://github.com/netbootxyz/netboot.xyz-docs/blob/master/docs/docker/usage.md Starts the Netboot.xyz containers defined in a docker-compose.yml file in detached mode. Ensure the docker-compose.yml file is present and configured. ```shell docker compose up -d netbootxyz ``` -------------------------------- ### AlmaLinux Kickstart URL Configuration Source: https://github.com/netbootxyz/netboot.xyz-docs/blob/master/docs/kb/pxe/almalinux.md Add this snippet to your iPXE configuration to specify a Kickstart URL for automated AlmaLinux installations. Ensure the `ksurl` variable points to your valid Kickstart file. ```bash set ksurl http://my.kickstart.com/ks.cfg inst.ks=${ksurl} ``` -------------------------------- ### Install GRUB Imageboot and Download ISO on Debian/Ubuntu Source: https://github.com/netbootxyz/netboot.xyz-docs/blob/master/docs/kb/providers/digitalocean.md This script installs grub-imageboot, downloads the netboot.xyz ISO, and updates the GRUB menu. It also modifies GRUB's timeout settings to allow selection. Reboot after execution. ```shell # Remove grub timeout configuration rm /etc/default/grub.d/15_timeout.cfg # Increase grub timeout if desired sed -i 's/GRUB_TIMEOUT=5/GRUB_TIMEOUT=60/g' /etc/default/grub # Install grub-imageboot apt update apt install -y grub-imageboot # Download netboot.xyz ISO mkdir /boot/images cd /boot/images wget https://boot.netboot.xyz/ipxe/netboot.xyz.iso # Update GRUB menu to include this ISO update-grub2 # reboot once you are ready, it may be good to load up the recovery console first reboot ``` -------------------------------- ### iPXE Boot Snippet for Rocky Linux Installer Source: https://github.com/netbootxyz/netboot.xyz-docs/blob/master/docs/kb/pxe/rockylinux.md Use this iPXE boot snippet to load the Rocky Linux installer. It sets parameters for network installation and specifies the kernel and initrd locations. ```bash set install_params inst.ks=http://my.kickstart.com/ks.cfg inst.repo=http://dl.rockylinux.org/pub/rocky/${version}/BaseOS/${arch}/os set mirror http://dl.rockylinux.org set base_dir pub/rocky set version 9 set arch x86_64 set dir ${mirror}/${base_dir}/${version}/BaseOS/${arch}/os/images/pxeboot kernel ${dir}/vmlinuz ${install_params} -- quiet initrd ${dir}/initrd.img boot ``` -------------------------------- ### Install Docker on Ubuntu Source: https://github.com/netbootxyz/netboot.xyz-docs/blob/master/docs/docker/usage.md Installs Docker CE, CLI, containerd, and buildx/compose plugins on Ubuntu-based systems. Requires adding Docker's GPG key and repository. ```shell sudo apt-get update sudo apt-get install ca-certificates curl sudo install -m 0755 -d /etc/apt/keyrings sudo curl -fsSL https://download.docker.com/linux/ubuntu/gpg -o /etc/apt/keyrings/docker.asc sudo chmod a+r /etc/apt/keyrings/docker.asc echo \ "deb [arch=$(dpkg --print-architecture) signed-by=/etc/apt/keyrings/docker.asc] https://download.docker.com/linux/ubuntu \ $(. /etc/os-release && echo "${UBUNTU_CODENAME:-$VERSION_CODENAME}") stable" | \ sudo tee /etc/apt/sources.list.d/docker.list > /dev/null sudo apt-get update sudo apt-get install docker-ce docker-ce-cli containerd.io docker-buildx-plugin docker-compose-plugin ``` -------------------------------- ### Install Dependencies with Yarn Source: https://github.com/netbootxyz/netboot.xyz-docs/blob/master/README.md Use this command to install project dependencies using Yarn. ```bash yarn install ``` -------------------------------- ### Load Debian Installer Kernel with iPXE Source: https://github.com/netbootxyz/netboot.xyz-docs/blob/master/docs/kb/pxe/debian.md Use this iPXE snippet to load the Debian installer kernel and initrd. Adjust variables for your desired Debian version and architecture. ```bash set install_params auto=true priority=critical set mirror http://deb.debian.org set base_dir debian set debian_version bookworm set arch amd64 set mirrorcfg mirror/suite=${debian_version} set dir ${mirror}/${base_dir}/dists/${version}/main/installer-${arch}/current/images/netboot/debian-installer/amd64/ kernel ${dir}/linux ${install_params} ${mirrorcfg} -- quiet initrd=initrd.gz initrd ${dir}/initrd.gz boot ``` -------------------------------- ### Install Ansible, Git, and Apache on Debian/Ubuntu Source: https://github.com/netbootxyz/netboot.xyz-docs/blob/master/docs/selfhosting.md Installs necessary packages for Ansible-based deployment on Debian or Ubuntu systems. ```shell sudo apt install -y ansible git apache2 ``` -------------------------------- ### Install dnsmasq on Debian/Ubuntu Source: https://github.com/netbootxyz/netboot.xyz-docs/blob/master/docs/docker/dhcp.md Installs the dnsmasq DHCP server on Debian-based systems. Ensure you have sudo privileges. ```shell sudo apt install dnsmasq ``` -------------------------------- ### Install Ansible, Git, and HTTPD on RHEL/Rocky/Fedora Source: https://github.com/netbootxyz/netboot.xyz-docs/blob/master/docs/selfhosting.md Installs necessary packages for Ansible-based deployment on RHEL, Rocky Linux, or Fedora systems. ```bash sudo dnf install -y ansible git httpd ``` -------------------------------- ### Install dnsmasq on Red Hat Based Systems Source: https://github.com/netbootxyz/netboot.xyz-docs/blob/master/docs/docker/dhcp.md Installs the dnsmasq DHCP server on Red Hat-based systems using dnf. Ensure you have sudo privileges. ```shell sudo dnf install dnsmasq ``` -------------------------------- ### Configure GRUB and Install netboot.xyz ISO on Linode Source: https://github.com/netbootxyz/netboot.xyz-docs/blob/master/docs/kb/providers/linode.md This script modifies GRUB settings to increase the boot menu timeout, installs the grub-imageboot package, downloads the netboot.xyz ISO, and updates the GRUB configuration. Reboot the instance after running this script. ```shell # Increase grub timeout if desired sed -i 's/GRUB_TIMEOUT=5/GRUB_TIMEOUT=60/g' /etc/default/grub # Install grub-imageboot apt update apt install -y grub-imageboot # Download netboot.xyz ISO mkdir /boot/images cd /boot/images wget https://boot.netboot.xyz/ipxe/netboot.xyz.iso # Update GRUB menu to include this ISO update-grub2 # reboot once you are ready, it may be good to load up the recovery console first reboot ``` -------------------------------- ### Install Docker on Debian Source: https://github.com/netbootxyz/netboot.xyz-docs/blob/master/docs/docker/usage.md Installs Docker CE, CLI, containerd, and buildx/compose plugins on Debian-based systems. Requires adding Docker's GPG key and repository. ```shell sudo apt-get update sudo apt-get install ca-certificates curl sudo install -m 0755 -d /etc/apt/keyrings sudo curl -fsSL https://download.docker.com/linux/debian/gpg -o /etc/apt/keyrings/docker.asc sudo chmod a+r /etc/apt/keyrings/docker.asc echo \ "deb [arch=$(dpkg --print-architecture) signed-by=/etc/apt/keyrings/docker.asc] https://download.docker.com/linux/debian \ $(. /etc/os-release && echo "$VERSION_CODENAME") stable" | \ sudo tee /etc/apt/sources.list.d/docker.list > /dev/null sudo apt-get update sudo apt-get install docker-ce docker-ce-cli containerd.io docker-buildx-plugin docker-compose-plugin ``` -------------------------------- ### Docker Resource Limits for Netboot.xyz Source: https://github.com/netbootxyz/netboot.xyz-docs/blob/master/docs/troubleshooting/performance-optimization.md Configure resource limits and reservations for the Netboot.xyz Docker container to ensure stable performance and prevent resource starvation. This example sets CPU and memory limits. ```yaml services: netbootxyz: deploy: resources: limits: cpus: '2.0' memory: 4G reservations: cpus: '1.0' memory: 2G ``` -------------------------------- ### Configure Persistent WinBaseURL Source: https://github.com/netbootxyz/netboot.xyz-docs/blob/master/docs/kb/pxe/windows.md Set the 'win_base_url' variable in the 'local-vars.ipxe' file to automatically use the specified URL for Windows installations. This avoids manual URL input during boot. ```bash set win_base_url http://192.168.2.46:8080/WinPE ``` -------------------------------- ### Basic Custom iPXE Menu Structure Source: https://github.com/netbootxyz/netboot.xyz-docs/blob/master/docs/docker/custom-menus.md A foundational example of an iPXE script for a custom menu, including options for custom items, tools, and returning to the main menu. This script uses standard iPXE syntax for menu display and navigation. ```ipxe #!ipxe ######## CUSTOM MENU ######## :custom_menu menu Custom Boot Options item --gap -- Custom Options: item custom_option1 Custom Option 1 item custom_option2 Custom Option 2 item --gap -- Tools: item custom_tool1 Custom Tool 1 item --gap -- Return: item return Return to Main Menu choose --default return --timeout 10000 custom_target && goto ${custom_target} :custom_option1 # Add your custom boot logic here echo Booting Custom Option 1... # Add your boot commands goto custom_menu :custom_option2 # Add your custom boot logic here echo Booting Custom Option 2... # Add your boot commands goto custom_menu :custom_tool1 # Add your custom tool logic here echo Loading Custom Tool 1... # Add your tool commands goto custom_menu :return exit ``` -------------------------------- ### Boot netboot.xyz with Legacy PCBIOS using QEMU Source: https://github.com/netbootxyz/netboot.xyz-docs/blob/master/docs/booting/qemu.md Launches a QEMU virtual machine booting from the netboot.xyz ISO using a legacy PC BIOS. ```bash qemu-system-x86_64 -cdrom netboot.xyz.iso -m 4G ``` -------------------------------- ### Try Alternative netboot.xyz Endpoints Source: https://github.com/netbootxyz/netboot.xyz-docs/blob/master/docs/troubleshooting/index.md If you experience slow loading or timeouts, try using a different netboot.xyz endpoint. ```bash # Try a different netboot.xyz endpoint # Instead of boot.netboot.xyz, try: # - boot.netboot.xyz (primary) # - github.netboot.xyz (GitHub pages backup) ``` -------------------------------- ### Boot netboot.xyz with UEFI BIOS using QEMU Source: https://github.com/netbootxyz/netboot.xyz-docs/blob/master/docs/booting/qemu.md Launches a QEMU virtual machine booting from the netboot.xyz ISO using a UEFI BIOS. Requires the OVMF firmware. ```bash qemu-system-x86_64 -bios /usr/share/ovmf/OVMF.fd -cdrom netboot.xyz.iso -m 4G ``` -------------------------------- ### Provision GCE instance with custom iPXE script Source: https://github.com/netbootxyz/netboot.xyz-docs/blob/master/docs/kb/providers/gce.md Compiles a custom iPXE boot image and adds a specified iPXE script to the instance's metadata for booting. ```bash # Create shared boot image make bin/ipxe.usb CONFIG=cloud EMBED=config/cloud/gce.ipxe # Configure per-instance boot script gcloud compute instances add-metadata \ --metadata-from-file ipxeboot=boot.ipxe ``` -------------------------------- ### Repository Structure Overview Source: https://github.com/netbootxyz/netboot.xyz-docs/blob/master/AGENTS.md An overview of the netboot.xyz documentation repository structure, detailing the purpose of each top-level directory. ```bash docs/ Documentation source (Markdown/MDX) — sidebar is auto-generated blog/ Blog posts (Markdown) external/ Auto-downloaded Markdown from upstream repos (do not edit manually) src/ components/ Reusable React components css/ Global styles (custom.css — Infima variable overrides) pages/ Top-level pages (homepage, downloads, feedback-analytics) theme/ Swizzled Docusaurus theme components static/ Static assets (images, favicon) scripts/ Utility scripts (validate-content.js) ``` -------------------------------- ### Chainload netboot.xyz with Static IP Source: https://github.com/netbootxyz/netboot.xyz-docs/blob/master/docs/booting/ipxe.md Configure network settings manually and then chainload netboot.xyz when DHCP is not available. ```bash set net0/ip set net0/netmask set net0/gateway set dns ifopen net0 chain --autofree https://boot.netboot.xyz ``` -------------------------------- ### Test TFTP Access to netboot.xyz Image Source: https://github.com/netbootxyz/netboot.xyz-docs/blob/master/docs/kb/networking/edgerouter.md Demonstrates how to use a TFTP client to fetch the netboot.xyz.kpxe image from the EdgeRouter. This verifies TFTP server configuration and accessibility. ```bash $ tftp 10.10.2.1 tftp> get netboot.xyz.kpxe Received 354972 bytes in 2.0 seconds ``` -------------------------------- ### Try Alternative Sources for Resources Source: https://github.com/netbootxyz/netboot.xyz-docs/blob/master/docs/troubleshooting/common-error-codes.md If a resource is not found at the primary URL, try accessing it from a mirror or alternative source, such as the GitHub mirror, to resolve HTTP 404 errors. ```bash # GitHub mirror: https://github.netboot.xyz/ipxe/filename ``` -------------------------------- ### Add Preseed URL to Debian Installer Kernel Source: https://github.com/netbootxyz/netboot.xyz-docs/blob/master/docs/kb/pxe/debian.md Append this to your kernel line to automate the Debian installation using a preseed configuration file hosted at a specified URL. ```bash set preseedurl http://my.preseed.com/preseed.cfg preseed/url=${preseedurl} ``` -------------------------------- ### Minimum Hardware Specifications for Netboot.xyz Source: https://github.com/netbootxyz/netboot.xyz-docs/blob/master/docs/troubleshooting/performance-optimization.md These are the minimum hardware requirements for running Netboot.xyz. Ensure your system meets these to avoid performance bottlenecks. ```text CPU: 2 cores, 2GHz RAM: 4GB Storage: 50GB SSD Network: Gigabit Ethernet ``` -------------------------------- ### Launch Nova Instance with netboot.xyz ISO Source: https://github.com/netbootxyz/netboot.xyz-docs/blob/master/docs/kb/providers/openstack.md Boot a new OpenStack Nova instance using the imported netboot.xyz ISO image. Replace placeholders with your actual image and network UUIDs. ```bash nova boot --flavor m1.small \ --image \ --nic net-id= \ netbootxyz-testing ``` -------------------------------- ### Download and Set Permissions for netboot.xyz PXE Image Source: https://github.com/netbootxyz/netboot.xyz-docs/blob/master/docs/kb/networking/edgerouter.md Downloads the netboot.xyz kpxe image and sets read permissions for all users. This makes the boot image accessible via TFTP. ```bash sudo curl -o /config/user-data/tftproot/netboot.xyz.kpxe https://boot.netboot.xyz/ipxe/netboot.xyz.kpxe sudo chmod ugo+r /config/user-data/tftproot/netboot.xyz.kpxe ``` -------------------------------- ### Create a Disk Image for QEMU Source: https://github.com/netbootxyz/netboot.xyz-docs/blob/master/docs/booting/qemu.md Creates a raw disk image file for QEMU. This is optional and can be attached to the VM to allow writing to a disk. ```bash qemu-img create -f raw vmdisk 8G # add the following to end of the qemu-system lines below if you want to add a disk to write to: # -drive file=vmdisk,format=raw ``` -------------------------------- ### Configure Swap File for Low-Memory Systems Source: https://github.com/netbootxyz/netboot.xyz-docs/blob/master/docs/troubleshooting/performance-optimization.md Create and enable a swap file to provide virtual memory on systems with limited RAM. Ensure the swap file is added to fstab for persistence across reboots. ```bash sudo fallocate -l 2G /swapfile sudo chmod 600 /swapfile sudo mkswap /swapfile sudo swapon /swapfile # Make permanent: echo '/swapfile none swap sw 0 0' | sudo tee -a /etc/fstab ``` -------------------------------- ### Systemd Dnsmasq Service Dependency Fix Source: https://github.com/netbootxyz/netboot.xyz-docs/blob/master/docs/booting/tftp.md Modify the dnsmasq systemd service file to ensure it starts after the network is fully online. ```bash After=network-online.target ``` -------------------------------- ### Docusaurus Component Swizzling Example Source: https://github.com/netbootxyz/netboot.xyz-docs/blob/master/AGENTS.md Demonstrates how to swizzle a Docusaurus component by importing the original and exporting a wrapper. Place swizzled components in 'src/theme/'. ```javascript import OriginalComponent from '@theme-original/ComponentName'; export default function ComponentNameWrapper(props) { return ; } ``` -------------------------------- ### Try Different iPXE Bootloader Variants Source: https://github.com/netbootxyz/netboot.xyz-docs/blob/master/docs/troubleshooting/common-error-codes.md When an operation is not supported, try booting with different iPXE variants. This can resolve issues related to missing features like HTTPS or crypto support. ```bash # Try different iPXE variants: - netboot.xyz.kpxe (standard) - netboot.xyz-undionly.kpxe (UNDI only) - netboot.xyz.efi (UEFI) ``` -------------------------------- ### Check for Port Conflicts with Docker Source: https://github.com/netbootxyz/netboot.xyz-docs/blob/master/docs/troubleshooting/index.md Before starting the netboot.xyz Docker container, check if the required ports (80 and 69) are already in use. If they are, you can map them to different host ports. ```bash # Check if ports are already in use sudo netstat -tulpn | grep :80 sudo netstat -tulpn | grep :69 # Use different ports if needed docker run -p 8080:80 -p 6969:69 netbootxyz/netboot.xyz ``` -------------------------------- ### Boot GCE instance with serial console enabled Source: https://github.com/netbootxyz/netboot.xyz-docs/blob/master/docs/kb/providers/gce.md Launches a Google Compute Engine instance from a custom image, ensuring the serial port is enabled for console access. ```bash gcloud compute instances create $instance_name --image $image_name --metadata serial-port-enable=1 ``` -------------------------------- ### Configure Autoinstall URL for Ubuntu Source: https://github.com/netbootxyz/netboot.xyz-docs/blob/master/docs/kb/pxe/ubuntu.md Add this snippet to the kernel line to specify an autoinstall URL for automated Ubuntu installations. It uses the `ds=nocloud-net` directive with the provided autoinstall server URL. ```bash set autoinstall_url http://my.autoinstall.com/ autoinstall ds=nocloud-net;s=${autoinstall_url} ``` -------------------------------- ### PXE Configuration File (pxe.conf) Source: https://github.com/netbootxyz/netboot.xyz-docs/blob/master/docs/kb/networking/edgerouter.md This file defines the boot behavior based on the client's architecture. It specifies the boot filename for UEFI (00:07) and legacy BIOS (00:00) systems, falling back to UEFI for other architectures. ```dnsmasq allow booting; next-server 10.10.2.1; if option arch = 00:07 { filename "netboot.xyz.efi"; } elsif option arch = 00:00 { filename "netboot.xyz.kpxe"; } else { filename "netboot.xyz.efi"; } ``` -------------------------------- ### Chainload netboot.xyz Menu with iPXE Source: https://github.com/netbootxyz/netboot.xyz-docs/blob/master/docs/kb/hardware/secureboot.md Use this iPXE script to chainload the netboot.xyz menu when booting with standalone iPXE binaries. Place this `autoexec.ipxe` file alongside the shim and iPXE binaries on your TFTP/HTTP server. ```ipxe #!ipxe chain --autofree https://boot.netboot.xyz ``` -------------------------------- ### Configure Local DNS Caching with Dnsmasq Source: https://github.com/netbootxyz/netboot.xyz-docs/blob/master/docs/troubleshooting/performance-optimization.md Install and configure dnsmasq for local DNS caching to improve resolution speed. Set the cache size and local TTL in the dnsmasq configuration file. ```bash # Install and configure dnsmasq: sudo apt-get install dnsmasq # /etc/dnsmasq.conf: cache-size=1000 local-ttl=300 ``` -------------------------------- ### Recommended Hardware Specifications for Netboot.xyz Source: https://github.com/netbootxyz/netboot.xyz-docs/blob/master/docs/troubleshooting/performance-optimization.md For better performance and scalability, it is recommended to use hardware that meets these specifications. This includes faster CPUs, more RAM, and faster storage. ```text CPU: 4+ cores, 3GHz+ RAM: 8GB+ Storage: 100GB+ NVMe SSD Network: Gigabit Ethernet with QoS ``` -------------------------------- ### Linux Kernel Panic Solutions Source: https://github.com/netbootxyz/netboot.xyz-docs/blob/master/docs/troubleshooting/common-error-codes.md Addresses memory and root filesystem issues that can cause Linux kernel panics. Ensure minimum RAM requirements are met and consider alternative installation methods or disk checks. ```bash # Ensure minimum RAM requirements: # - Ubuntu: 1GB minimum, 2GB recommended # - CentOS/RHEL: 1GB minimum # - Arch Linux: 512MB minimum ``` ```bash # Try different installation method: # - Use netinstall instead of live image # - Check disk for errors before installation ``` -------------------------------- ### Development and Build Commands Source: https://github.com/netbootxyz/netboot.xyz-docs/blob/master/AGENTS.md Use these commands for local development with hot reload, building for production, and serving the production build locally. ```bash # Development yarn start # Local dev server with hot reload (http://localhost:3000) # Build yarn build # Production build (USE_SIMPLE_CSS_MINIFIER=true is set automatically) yarn serve # Serve the production build locally ``` -------------------------------- ### Run Netboot.xyz Container with Docker CLI Source: https://github.com/netbootxyz/netboot.xyz-docs/blob/master/docs/docker/usage.md Starts the Netboot.xyz container in detached mode with specified environment variables and port mappings. Ensure local paths for config and assets are correctly set if using volume mounts. ```shell docker run -d \ --name=netbootxyz \ -e MENU_VERSION=2.0.84 `# optional` \ -e NGINX_PORT=80 `# optional` \ -e WEB_APP_PORT=3000 `# optional` \ -p 3000:3000 `# sets web configuration interface port, destination should match ${WEB_APP_PORT} variable above.` \ -p 69:69/udp `# sets tftp port` \ -p 8080:80 `# optional, destination should match ${NGINX_PORT} variable above.` \ -v /local/path/to/config:/config `# optional` \ -v /local/path/to/assets:/assets `# optional` \ --restart unless-stopped \ ghcr.io/netbootxyz/netbootxyz ``` -------------------------------- ### Download netboot.xyz EFI for x86_64 Source: https://github.com/netbootxyz/netboot.xyz-docs/blob/master/docs/kb/providers/oci.md Download the netboot.xyz AMD64 EFI binary to the EFI directory on an AMD (x86_64) instance. This is a prerequisite for booting into netboot.xyz. ```shell # Download netboot (amd64) into the EFI directory sudo wget -O /boot/efi/netboot.xyz-snp.efi https://boot.netboot.xyz/ipxe/netboot.xyz-snp.efi ``` -------------------------------- ### Import netboot.xyz ISO to Glance Source: https://github.com/netbootxyz/netboot.xyz-docs/blob/master/docs/kb/providers/openstack.md Download the netboot.xyz ISO and import it into OpenStack Glance. Use the returned image UUID for subsequent operations. ```bash $ wget https://boot.netboot.xyz/ipxe/netboot.xyz.iso $ glance image-create --name netboot.xyz \ --disk-format iso \ --container-format bare \ --file netboot.xyz-dhcp.iso \ --visibility public ``` ```text +------------------+--------------------------------------+ | Property | Value | +------------------+--------------------------------------+ | checksum | 45cdcb89576b6c05598b11585aef46bc | | container_format | bare | | created_at | 2016-01-27T20:02:06Z | | disk_format | iso | | id | 4f11d49e-157b-4740-87ad-db7d59bb5d6d | | min_disk | 0 | | min_ram | 0 | | name | netboot.xyz | | owner | fbfce4cb346c4f9097a977c54904cafd | | protected | False | | size | 1048576 | | status | active | | tags | [] | | updated_at | 2016-01-27T20:02:04Z | | virtual_size | None | | visibility | public | +------------------+--------------------------------------+ ``` -------------------------------- ### Standard iPXE boot script for GCE Source: https://github.com/netbootxyz/netboot.xyz-docs/blob/master/docs/kb/providers/gce.md A basic iPXE script designed for Google Compute Engine that fetches a boot script from instance metadata. ```ipxe #!ipxe echo Google Compute Engine - iPXE boot via metadata ifstat || dhcp || route || chain -ar http://metadata.google.internal/computeMetadata/v1/instance/attributes/ipxeboot ``` -------------------------------- ### Enable Custom Menu in Configuration Source: https://github.com/netbootxyz/netboot.xyz-docs/blob/master/docs/docker/custom-menus.md Set the 'menu' option in boot.cfg to 'custom-user' to enable custom menu support in netboot.xyz. ```bash set menu custom-user ``` -------------------------------- ### Add netboot.xyz GRUB Menu Entry Source: https://github.com/netbootxyz/netboot.xyz-docs/blob/master/docs/booting/uefi.md Add this custom menu entry to `/etc/grub.d/40_custom` to boot netboot.xyz via GRUB. Remember to run `sudo update-grub` afterwards. ```bash menuentry "netboot.xyz" { search --no-floppy --file --set=root /EFI/netboot.xyz/netboot.xyz.efi chainloader /EFI/netboot.xyz/netboot.xyz.efi } ``` -------------------------------- ### Request Console URL for Nova Instance Source: https://github.com/netbootxyz/netboot.xyz-docs/blob/master/docs/kb/providers/openstack.md After launching the instance, request a SPICE HTML5 console URL to access the netboot.xyz iPXE interface. Use the instance UUID obtained from Nova. ```bash nova get-spice-console c4ff017e-1234-4053-b740-e83eade277b9 spice-html5 ``` -------------------------------- ### Boot netboot.xyz from UEFI Shell Source: https://github.com/netbootxyz/netboot.xyz-docs/blob/master/docs/booting/uefi.md Navigate to the EFI system partition and execute the netboot.xyz UEFI executable from the UEFI Shell. Replace `fsX:` with the correct filesystem identifier. ```shell fsX: cd EFI\netboot.xyz netboot.xyz.efi ``` -------------------------------- ### Configure DHCP Server Global and Subnet Parameters Source: https://github.com/netbootxyz/netboot.xyz-docs/blob/master/docs/kb/networking/edgerouter.md Configure the DHCP server to deny BOOTP requests and include the necessary PXE configuration files. Ensure the quoted paths are exact. ```bash set service dhcp-server global-parameters "deny bootp;" set service dhcp-server global-parameters "include "/config/user-data/scripts/pxe/option-space.conf";"; set service dhcp-server shared-network-name LAN subnet 10.10.2.0/24 subnet-parameters "include "/config/user-data/scripts/pxe/pxe.conf";"; ``` -------------------------------- ### Build Static Site Source: https://github.com/netbootxyz/netboot.xyz-docs/blob/master/README.md Generates static content for deployment. The output is placed in the 'build' directory. ```bash yarn build ``` -------------------------------- ### Run netboot.xyz Ansible Playbook Source: https://github.com/netbootxyz/netboot.xyz-docs/blob/master/docs/selfhosting.md Executes the main Ansible playbook to deploy netboot.xyz. Assumes you are in the /opt/netboot.xyz directory. ```bash cd /opt/netboot.xyz ansible-playbook -i inventory site.yml ``` -------------------------------- ### Download and Set Permissions for netboot.xyz.efi Source: https://github.com/netbootxyz/netboot.xyz-docs/blob/master/docs/kb/networking/edgerouter.md Download the UEFI boot file for netboot.xyz and ensure it has read permissions for all users. This file is essential for UEFI-based network booting. ```bash sudo curl -o /config/user-data/tftproot/netboot.xyz.efi https://boot.netboot.xyz/ipxe/netboot.xyz.efi sudo chmod ugo+r /config/user-data/tftproot/netboot.xyz.efi ``` -------------------------------- ### Add netboot.xyz systemd-boot Entry Source: https://github.com/netbootxyz/netboot.xyz-docs/blob/master/docs/booting/uefi.md Create a new file in `/boot/loader/entries/` with this content to add netboot.xyz to systemd-boot. ```ini title netboot.xyz efi /EFI/netboot.xyz/netboot.xyz.efi ``` -------------------------------- ### Download netboot.xyz Boot Files Source: https://github.com/netbootxyz/netboot.xyz-docs/blob/master/docs/kb/networking/asuswrt-merlin.md Downloads the PXE boot files for netboot.xyz to the TFTP root directory. These files are required for both legacy BIOS and UEFI booting. ```bash curl -o /jffs/tftproot/netboot.xyz.kpxe https://boot.netboot.xyz/ipxe/netboot.xyz.kpxe ``` ```bash curl -o /jffs/tftproot/netboot.xyz.efi https://boot.netboot.xyz/ipxe/netboot.xyz.efi ``` -------------------------------- ### Test ISO Boot with memdisk via iPXE Source: https://github.com/netbootxyz/netboot.xyz-docs/blob/master/docs/faq.md Use this command in the iPXE command line to test if an ISO can be booted using memdisk. Ensure sufficient RAM is available. ```shell kernel https://boot.netboot.xyz/memdisk iso raw initrd http://url/to/iso boot ``` -------------------------------- ### Run netboot.xyz Docker Container Source: https://github.com/netbootxyz/netboot.xyz-docs/blob/master/docs/selfhosting.md Runs the 'localbuild' Docker container, mounting the current directory to '/buildout' to capture build artifacts. The output will be in the 'buildout' folder. ```bash docker run --rm -it -v $(pwd):/buildout localbuild ``` -------------------------------- ### Download and Register BIOS Bootfile for TFTP Source: https://github.com/netbootxyz/netboot.xyz-docs/blob/master/docs/kb/networking/mikrotik.md Downloads the netboot.xyz.kpxe file and registers it with the Mikrotik TFTP server. This makes the BIOS bootloader available via TFTP. ```mikrotik /tool fetch url="https://boot.netboot.xyz/ipxe/netboot.xyz.kpxe" /ip tftp add req-filename=netboot.xyz.kpxe real-filename=netboot.xyz.kpxe allow=yes read-only=yes ``` -------------------------------- ### DHCP Next-Server and Filename Configuration Source: https://github.com/netbootxyz/netboot.xyz-docs/blob/master/docs/booting/tftp.md Specify the TFTP server address and the bootloader filename for DHCP clients. ```bash next-server "1.2.3.4" filename "netboot.xyz.kpxe" ``` -------------------------------- ### Monitor System Resources with htop Source: https://github.com/netbootxyz/netboot.xyz-docs/blob/master/docs/troubleshooting/performance-optimization.md Use `htop` for an interactive and real-time view of CPU and memory usage. It provides a more user-friendly interface than `top`. ```bash htop ``` -------------------------------- ### Chainload netboot.xyz with DHCP Source: https://github.com/netbootxyz/netboot.xyz-docs/blob/master/docs/booting/ipxe.md Use this command when DHCP is available to automatically load the netboot.xyz menu. ```bash dhcp chain --autofree https://boot.netboot.xyz ``` -------------------------------- ### Configure EdgeRouter for DNSMasq PXE Boot Source: https://github.com/netbootxyz/netboot.xyz-docs/blob/master/docs/kb/networking/edgerouter.md Enables dnsmasq and sets DHCP boot options for BIOS and UEFI clients. Replace SERVERIP with your server's IP address. ```bash configure set service dhcp-server use-dnsmasq enable set service dns forwarding options "dhcp-match=set:bios,60,PXEClient:Arch:00000" set service dns forwarding options "dhcp-boot=tag:bios,netboot.xyz.kpxe,,SERVERIP" set service dns forwarding options "dhcp-match=set:efi32,60,PXEClient:Arch:00002" set service dns forwarding options "dhcp-boot=tag:efi32,netboot.xyz.efi,,SERVERIP" set service dns forwarding options "dhcp-match=set:efi32-1,60,PXEClient:Arch:00006" set service dns forwarding options "dhcp-boot=tag:efi32-1,netboot.xyz.efi,,SERVERIP" set service dns forwarding options "dhcp-match=set:efi64,60,PXEClient:Arch:00007" set service dns forwarding options "dhcp-boot=tag:efi64,netboot.xyz.efi,,SERVERIP" set service dns forwarding options "dhcp-match=set:efi64-1,60,PXEClient:Arch:00008" set service dns forwarding options "dhcp-boot=tag:efi64-1,netboot.xyz.efi,,SERVERIP" set service dns forwarding options "dhcp-match=set:efi64-2,60,PXEClient:Arch:00009" set service dns forwarding options "dhcp-boot=tag:efi64-2,netboot.xyz.efi,,SERVERIP" commit; save ``` -------------------------------- ### Configure dnsmasq for netboot.xyz Source: https://github.com/netbootxyz/netboot.xyz-docs/blob/master/docs/docker/dhcp.md This configuration sets up DHCP ranges, default gateway, DNS servers, and specific boot files for various client architectures. Remember to replace SERVER_IP_ADDRESS with your Docker host's IP. ```shell # /etc/dnsmasq.conf # Set the DHCP Range and lease time dhcp-range=192.168.1.100,192.168.1.200,255.255.255.0,12h # Set the default gateway dhcp-option=option:router,192.168.1.1 # Set tne DNS servers dhcp-option=option:dns-server,8.8.8.8,8.8.4.4 # Standard PC BIOS dhcp-match=set:bios,60,PXEClient:Arch:00000 dhcp-boot=tag:bios,netboot.xyz.kpxe,,SERVER_IP_ADDRESS # 64-bit x86 EFI dhcp-match=set:efi64,60,PXEClient:Arch:00007 dhcp-boot=tag:efi64,netboot.xyz.efi,,SERVER_IP_ADDRESS # 64-bit x86 EFI (obsolete) dhcp-match=set:efi64-2,60,PXEClient:Arch:00009 dhcp-boot=tag:efi64-2,netboot.xyz.efi,,SERVER_IP_ADDRESS # 64-bit UEFI for arm64 dhcp-match=set:efi64-3,60,PXEClient:Arch:0000B dhcp-match=set:efi64-3,60,PXEClient:Arch:00011 dhcp-boot=tag:efi64-3,netboot.xyz-arm64.efi,,SERVER_IP_ADDRESS ``` -------------------------------- ### Chainload netboot.xyz via HTTP Source: https://github.com/netbootxyz/netboot.xyz-docs/blob/master/docs/booting/ipxe.md Use this command if your iPXE build does not support HTTPS connections. It chainloads netboot.xyz using HTTP. ```bash chain --autofree http://boot.netboot.xyz ``` -------------------------------- ### netboot.xyz Docker Container Flow (Left Right) Source: https://github.com/netbootxyz/netboot.xyz-docs/blob/master/docs/docker/overview.md This diagram illustrates the PXE boot request flow when using the netboot.xyz Docker container, showing how local requests are served and when external requests to boot.netboot.xyz are made. ```mermaid graph LR A[Client Computer] -->|PXE Boot Request| B{netboot.xyz container?} B -- Yes --> C[netboot.xyz container] C -- Local request --> D[Serve netboot.xyz] C -- Unavailable --> E[boot.netboot.xyz] B -- No --> E E -->|Internet Request| F[boot.netboot.xyz] F --> G[Serve netboot.xyz] G --> H[Client Boots OS] D --> H ``` -------------------------------- ### Download and Register UEFI Bootfile for TFTP Source: https://github.com/netbootxyz/netboot.xyz-docs/blob/master/docs/kb/networking/mikrotik.md Downloads the netboot.xyz.efi file and registers it with the Mikrotik TFTP server. This makes the UEFI bootloader available via TFTP. ```mikrotik /tool fetch url="https://boot.netboot.xyz/ipxe/netboot.xyz.efi" /ip tftp add req-filename=netboot.xyz.efi real-filename=netboot.xyz.efi allow=yes read-only=yes ``` -------------------------------- ### Build vanilla iPXE image for GCE Source: https://github.com/netbootxyz/netboot.xyz-docs/blob/master/docs/kb/providers/gce.md Compiles a vanilla iPXE image with GCE support and packages it into a tar archive suitable for GCE image creation. ```bash make bin/ipxe.usb CONFIG=cloud EMBED=$tmp/main.ipxe cp -f bin/ipxe.usb $tmp/disk.raw ( cd $tmp; tar Sczvf $image_name.tar.gz disk.raw ) ``` -------------------------------- ### Configure DHCP for netboot.xyz Boot Parameters Source: https://github.com/netbootxyz/netboot.xyz-docs/blob/master/docs/kb/networking/edgerouter.md Configures the EdgeRouter's DHCP server to provide the necessary boot parameters, including the client architecture option, boot server, and boot file name. This ensures clients receive the correct iPXE bootloader. ```bash configure set service dhcp-server global-parameters "option client-arch code 93 = unsigned integer 16;" edit service dhcp-server shared-network-name LAN subnet 10.10.2.0/24 set bootfile-server 10.10.2.1 set bootfile-name netboot.xyz.kpxe commit save ``` -------------------------------- ### Check iPXE Build Features Source: https://github.com/netbootxyz/netboot.xyz-docs/blob/master/docs/troubleshooting/common-error-codes.md In the iPXE command line, use the 'help' command to check for supported features like HTTPS and crypto. This helps diagnose 'Operation not supported' errors. ```bash # In iPXE command line: ipxe> help # Look for HTTPS, crypto support ``` -------------------------------- ### Dnsmasq TFTP Server Configuration Source: https://github.com/netbootxyz/netboot.xyz-docs/blob/master/docs/booting/tftp.md Enable the TFTP server in dnsmasq, set the TFTP root directory, and specify the default DHCP boot file. ```bash enable-tftp tftp-root=/var/lib/tftp dhcp-boot=netboot.xyz.kpxe ``` -------------------------------- ### Add UEFI Boot Entry with efibootmgr Source: https://github.com/netbootxyz/netboot.xyz-docs/blob/master/docs/booting/uefi.md Use this command to create a new UEFI boot entry for the netboot.xyz executable. Ensure to replace `/dev/sdX` and `Y` with your specific disk and partition. ```bash sudo efibootmgr --create --disk /dev/sdX --part Y --label "netboot.xyz" --loader /EFI/netboot.xyz/netboot.xyz.efi ``` -------------------------------- ### netboot.xyz Docker Container Flow (Top Down) Source: https://github.com/netbootxyz/netboot.xyz-docs/blob/master/docs/docker/overview.md This diagram presents the PXE boot request flow using the netboot.xyz Docker container in a top-down perspective, detailing the process from the client's request to the final OS boot. ```mermaid graph TD A[Client Computer] -->|PXE Boot Request| B{netboot.xyz container?} B -- Yes --> C[netboot.xyz container] C -- Local request --> D[Serve netboot.xyz] C -- Unavailable --> E[boot.netboot.xyz] B -- No --> E E -->|Internet Request| F[boot.netboot.xyz] F --> G[Serve netboot.xyz] G --> H[Client Boots OS] D --> H ``` -------------------------------- ### Download netboot.xyz EFI for arm64 Source: https://github.com/netbootxyz/netboot.xyz-docs/blob/master/docs/kb/providers/oci.md Download the netboot.xyz ARM64 EFI binary to the EFI directory on an Ampere A1 instance. This is a prerequisite for booting into netboot.xyz. ```shell # Download netboot (arm64) into the EFI directory sudo wget -O /boot/efi/netboot.xyz-arm64.efi https://boot.netboot.xyz/ipxe/netboot.xyz-arm64.efi ```