### Execute Windows Setup from Mounted Share Source: https://netboot.xyz/docs/kb/pxe/windows After successfully mounting the SMB share, this command changes the current directory to the mounted drive (F:) and then executes the 'setup.exe' file. This action initiates the standard Windows installation interface, allowing the user to proceed with the setup. ```Shell F:\setup.exe ``` -------------------------------- ### Boot netboot.xyz with QEMU using Legacy PCBIOS Source: https://netboot.xyz/docs/booting/qemu This command starts a QEMU virtual machine configured with 4GB of RAM. It boots directly from the `netboot.xyz.iso` using a traditional PCBIOS setup, suitable for older systems or specific testing scenarios. ```bash qemu-system-x86_64 -cdrom netboot.xyz.iso -m 4G ``` -------------------------------- ### iPXE Boot Snippet for Debian Installer Kernels Source: https://netboot.xyz/docs/kb/pxe/debian This iPXE snippet configures variables and loads the Debian installer kernel and initrd over the network. It sets installation parameters, mirror, base directory, Debian version, and architecture to fetch the correct netboot images. The 'kernel' command loads the Linux kernel with specified parameters, and 'initrd' loads the initial ramdisk, followed by 'boot' to start the installation. ```iPXE 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 ``` -------------------------------- ### iPXE Configuration for Ubuntu Installer Kernel Boot Source: https://netboot.xyz/docs/kb/pxe/ubuntu This iPXE script defines variables for Ubuntu mirror, version, architecture, and constructs the necessary paths for the installer kernel and initrd. It then uses these variables to load the Ubuntu installer kernel with specified installation parameters, including an example for an autoinstall URL. This snippet is essential for network-based Ubuntu installations. ```iPXE 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 ``` -------------------------------- ### Start netboot.xyz Docker Container Source: https://netboot.xyz/docs/kb/hardware/synology Instructions to start the newly created and configured netboot.xyz container within the Synology Container Manager interface. ```Synology Container Manager 1. Go to the "Container" tab in Container Manager. 2. Select the `netbootxyz` container. 3. Click "Start". ``` -------------------------------- ### Install Docker Engine on Linux Distributions Source: https://netboot.xyz/docs/docker/usage These snippets provide instructions for installing Docker Engine, CLI, containerd, and necessary plugins on various Linux distributions, including Debian, Ubuntu, and Red Hat-based systems. It covers adding Docker's official GPG key, setting up repositories, and installing the packages. ```shell # Add Docker's official GPG key: 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 # Add the repository to Apt sources: 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 ``` ```shell # Add Docker's official GPG key: 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 # Add the repository to Apt sources: 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 ``` ```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 ``` -------------------------------- ### Start netboot.xyz Containers with Docker Compose Source: https://netboot.xyz/docs/docker/usage This command starts the netboot.xyz services defined in your `docker-compose.yml` file in detached mode. Ensure the `docker-compose.yml` file is properly configured based on the provided example before execution. ```Shell docker compose up -d netbootxyz ``` -------------------------------- ### iPXE Boot Snippet for AlmaLinux Installer Source: https://netboot.xyz/docs/kb/pxe/almalinux This iPXE snippet configures variables for the AlmaLinux installer, including the mirror, version, and architecture, then loads the vmlinuz kernel and initrd.img for network-based installation. It includes placeholders for install_params which can contain a Kickstart URL. ```iPXE 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 ``` -------------------------------- ### Set Base URL for Windows PE in netboot.xyz Source: https://netboot.xyz/docs/kb/pxe/windows This snippet provides an example of the base URL format required to point to the netboot.xyz container's IP address and Nginx port, which hosts the Windows PE assets. This URL is entered when prompted to load the installer. ```Shell http://192.168.2.46:8000/WinPE ``` -------------------------------- ### iPXE Snippet for Adding Kickstart URL Source: https://netboot.xyz/docs/kb/pxe/rockylinux This iPXE snippet demonstrates how to pass a Kickstart URL to the Rocky Linux installer kernel for automated installations. It sets a variable for the Kickstart URL and appends it to the kernel command line using the 'inst.ks' parameter. ```iPXE set ksurl http://my.kickstart.com/ks.cfg inst.ks=${ksurl} ``` -------------------------------- ### Install QEMU Dependencies and Download netboot.xyz ISO Source: https://netboot.xyz/docs/booting/qemu This snippet installs the necessary QEMU system packages (qemu-system, ovmf) on Ubuntu 20.04 and downloads the latest combined Legacy and EFI netboot.xyz ISO image using `wget`. These are prerequisites for running netboot.xyz in a QEMU virtual machine. ```bash # install the qemu-system package 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 ``` -------------------------------- ### Adding Kickstart URL to iPXE Kernel Line Source: https://netboot.xyz/docs/kb/pxe/almalinux This iPXE snippet demonstrates how to define a Kickstart URL variable (ksurl) and append it to the kernel boot parameters using inst.ks=. This is used for automated installations. ```iPXE set ksurl http://my.kickstart.com/ks.cfg inst.ks=${ksurl} ``` -------------------------------- ### Docker ISO Processor Settings File Example Source: https://netboot.xyz/docs/community/build-automation This snippet demonstrates an example of the settings file ingested by the `docker-iso-processor` container. It specifies the URL of the source ISO or torrent, its type, and the specific contents (e.g., `filesystem.squashfs`) to extract. The `REPLACE_VERSION` keyword acts as a placeholder for dynamic versioning during the build process. ```Shell URL="http://releases.ubuntu.com/18.04/ubuntu-REPLACE_VERSION-desktop-amd64.iso.torrent" TYPE=torrent CONTENTS="\ casper/filesystem.squashfs|filesystem.squashfs" ``` -------------------------------- ### iPXE Snippet for Rocky Linux Installer Boot Source: https://netboot.xyz/docs/kb/pxe/rockylinux This iPXE snippet configures variables and commands to boot the Rocky Linux installer kernel and initrd over the network. It sets parameters for the installation source and an optional Kickstart file, then loads the kernel and initrd before initiating the boot process. ```iPXE 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 ``` -------------------------------- ### Verify TFTP Image Download on EdgeRouter Source: https://netboot.xyz/docs/kb/networking/edgerouter This snippet provides an example of how to verify that the netboot.xyz.kpxe image can be successfully fetched from the EdgeRouter's TFTP server using a TFTP client from a client machine on the network. ```shell $ tftp 10.10.2.1 tftp> get netboot.xyz.kpxe Received 354972 bytes in 2.0 seconds ``` -------------------------------- ### Boot netboot.xyz with QEMU using UEFI BIOS Source: https://netboot.xyz/docs/booting/qemu This command starts a QEMU virtual machine with 4GB of RAM, booting from the `netboot.xyz.iso` using a UEFI BIOS. It specifies the path to the OVMF firmware (`/usr/share/ovmf/OVMF.fd`) to enable UEFI boot capabilities. ```bash qemu-system-x86_64 -bios /usr/share/ovmf/OVMF.fd -cdrom netboot.xyz.iso -m 4G ``` -------------------------------- ### iPXE Snippet for Ubuntu Autoinstall URL Integration Source: https://netboot.xyz/docs/kb/pxe/ubuntu This iPXE snippet demonstrates how to set an autoinstall URL and append it to the kernel boot parameters. It's used in conjunction with the main installer kernel boot command to enable automated Ubuntu installations via a pre-configured autoinstall server. ```iPXE set autoinstall_url http://my.autoinstall.com/ autoinstall ds=nocloud-net;s=${autoinstall_url} ``` -------------------------------- ### Load netboot.xyz Kernel via iPXE Chain Command Source: https://netboot.xyz/docs/quick-start These iPXE commands allow you to load the netboot.xyz kernel directly from the network using the `chain` command. The appropriate command should be used based on whether the system is booting in Legacy BIOS or EFI mode. The `--autofree` option ensures memory is freed after the kernel is loaded. ```iPXE (Legacy BIOS) chain --autofree http://boot.netboot.xyz/ipxe/netboot.xyz.lkrn ``` ```iPXE (EFI BIOS) chain --autofree http://boot.netboot.xyz/ipxe/netboot.xyz.efi ``` -------------------------------- ### Fix dnsmasq Systemd Service Startup Issue Source: https://netboot.xyz/docs/booting/tftp To resolve dnsmasq failing to start at boot when running systemd, modify the /lib/systemd/system/dnsmasq.service file. Change the After directive in the [Unit] section to network-online.target to ensure dnsmasq waits for the network to be fully online before attempting to start. ```Systemd Unit File After=network-online.target ``` -------------------------------- ### Add Preseed URL to Debian Installer iPXE Boot Source: https://netboot.xyz/docs/kb/pxe/debian This iPXE snippet demonstrates how to include a preseed URL in the kernel command line for automated Debian installations. It sets a variable 'preseedurl' to the desired URL and appends 'preseed/url=${preseedurl}' to the kernel parameters, allowing the installer to fetch an automated configuration file. ```iPXE set preseedurl http://my.preseed.com/preseed.cfg preseed/url=${preseedurl} ``` -------------------------------- ### Copy Sample Custom Menu Directory Source: https://netboot.xyz/docs/selfhosting This bash command copies the provided sample custom menu directory from the netboot.xyz repository's 'etc/netbootxyz/custom' path to the system's '/etc/netbootxyz/custom' directory. This provides a starting point for building and testing custom boot menus. ```bash cp etc/netbootxyz/custom /etc/netbootxyz/custom ``` -------------------------------- ### Loading and Testing ISOs with iPXE memdisk Source: https://netboot.xyz/docs/faq This iPXE command sequence demonstrates how to load an ISO image directly into RAM for testing purposes. It's useful for verifying if a distribution's ISO works with netboot.xyz by simulating a baremetal boot. Ensure ample RAM is available as the entire ISO is loaded into memory. If the installer fails to find the CD device during initramfs load, it indicates an issue with the ISO's ability to locate itself in memory. ```iPXE kernel https://boot.netboot.xyz/memdisk iso raw initrd http://url/to/iso boot ``` -------------------------------- ### Install Synology Container Manager Source: https://netboot.xyz/docs/kb/hardware/synology Instructions to install the Container Manager package from the Synology Package Center, a prerequisite for deploying Docker containers. ```Synology Container Manager 1. Open the Synology Package Center. 2. Search for "Container Manager". 3. Click "Install". ``` -------------------------------- ### Enable and Start dnsmasq Service Source: https://netboot.xyz/docs/docker/dhcp These commands enable the dnsmasq service to start automatically on boot and immediately start it using systemctl. ```Shell sudo systemctl enable dnsmasq ``` ```Shell sudo systemctl start dnsmasq ``` -------------------------------- ### Download and Set Permissions for netboot.xyz EFI Boot File Source: https://netboot.xyz/docs/kb/networking/edgerouter This snippet downloads the EFI version of the netboot.xyz boot file to the TFTP root directory and then sets read permissions for all users. This ensures the EFI boot file is available and accessible for PXE booting. ```Shell 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 ``` -------------------------------- ### Configure GRUB and Download netboot.xyz ISO on Linode Source: https://netboot.xyz/docs/kb/providers/linode This script prepares a Debian or Ubuntu-based Linode instance to boot netboot.xyz. It increases the GRUB timeout to 60 seconds, installs the `grub-imageboot` package, downloads the `netboot.xyz.iso` to the `/boot/images` directory, and updates the GRUB configuration to include the ISO as a bootable option. A system reboot is required after executing these commands for changes to take effect. ```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 netboot.xyz Dependencies on Debian/Ubuntu Source: https://netboot.xyz/docs/selfhosting This command installs Ansible, Git, and Apache2 on Debian or Ubuntu systems, which are required for deploying netboot.xyz using Ansible. ```bash sudo apt install -y ansible git apache2 ``` -------------------------------- ### Access netboot.xyz Web Interface Source: https://netboot.xyz/docs/kb/hardware/synology Guidance on how to access the netboot.xyz web interface and asset folder via a web browser using the Synology NAS's IP address and the configured ports. ```Network Access Access netboot.xyz UI: - Open web browser. - Navigate to http://:3000 Access asset folder (if mapped to 8080): - Navigate to http://:8080 ``` -------------------------------- ### Install netboot.xyz Dependencies on RHEL/Rocky Linux/Fedora Source: https://netboot.xyz/docs/selfhosting This command installs Ansible, Git, and HTTPD on RHEL, Rocky Linux, or Fedora systems, which are required for deploying netboot.xyz using Ansible. ```bash sudo dnf install -y ansible git httpd ``` -------------------------------- ### Create Persistent Directory for PXE Configuration Scripts Source: https://netboot.xyz/docs/kb/networking/edgerouter This command creates a directory structure for storing PXE-related configuration scripts in a persistent storage location. This ensures that the custom DHCP configuration files will survive system upgrades. ```Shell mkdir --parents /config/user-data/scripts/pxe/ ``` -------------------------------- ### Download netboot.xyz Docker Image Source: https://netboot.xyz/docs/kb/hardware/synology Steps to download the official netboot.xyz Docker image from the Container Manager's Registry tab, ensuring the latest version is selected for deployment. ```Docker 1. Open Container Manager from the main menu. 2. Go to the "Registry" tab. 3. Search for `netbootxyz`. 4. Select the `netbootxyz/netboot.xyz` image. 5. Click "Download" and choose the latest version. ``` -------------------------------- ### Start netboot.xyz Container with Docker CLI Source: https://netboot.xyz/docs/docker/usage This command initiates the netboot.xyz container in detached mode, configuring essential ports (web interface, TFTP, NGINX) and optional volume mounts for persistent configuration and assets. Environment variables can be set for menu version and port customization. The container is set to restart automatically unless explicitly stopped. ```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 ``` -------------------------------- ### Verify netboot.xyz GRUB Menu Option on Linode Source: https://netboot.xyz/docs/kb/providers/linode After successfully installing and configuring netboot.xyz on a Linode instance, this snippet shows the expected entry that will appear in the GRUB boot menu. This option allows users to select and load the netboot.xyz menu, confirming the successful integration of the ISO. ```Shell Bootable ISO image: netboot.xyz ``` -------------------------------- ### Configure Persistent Windows Base URL in local-vars.ipxe Source: https://netboot.xyz/docs/kb/pxe/windows This iPXE command is added to the 'local-vars.ipxe' file, accessible through the netboot.xyz web configuration interface. It sets the 'win_base_url' variable persistently, eliminating the need to manually input the URL each time Windows is booted via netboot.xyz. ```iPXE set win_base_url http://192.168.2.46:8080/WinPE ``` -------------------------------- ### YAML User Override Example Source: https://netboot.xyz/docs/community/build-automation This YAML snippet illustrates how a user can override default settings in `user_overrides.yml` to disable the OpenBSD menu entry entirely. By setting `enabled: false`, users can prune specific distributions from their custom-built menus. ```YAML openbsd: name: "OpenBSD" mirror: "http://ftp.openbsd.org" base_dir: "pub/OpenBSD" enabled: false menu: "bsd" ``` -------------------------------- ### Boot Google Compute Engine instance from custom image Source: https://netboot.xyz/docs/kb/providers/gce Starts a new Google Compute Engine instance using the custom image created in the previous step. It's crucial to enable the serial port for console output to interact with the netboot.xyz menu. ```shell gcloud compute instances create $instance_name --image $image_name --metadata serial-port-enable=1 ``` -------------------------------- ### Install dnsmasq DHCP Server Source: https://netboot.xyz/docs/docker/dhcp Commands to install the dnsmasq DHCP server package on various Linux distributions. ```Shell sudo apt install dnsmasq ``` ```Shell sudo dnf install dnsmasq ``` -------------------------------- ### Configure dnsmasq for netboot.xyz PXE Booting on Router Source: https://netboot.xyz/docs/kb/networking/edgerouter This configuration snippet is for setting up dnsmasq on a router (e.g., EdgeRouter, VyOS) to facilitate PXE booting with netboot.xyz. It defines DHCP forwarding options to identify different PXE client architectures (BIOS, EFI32, EFI64) and directs them to the correct netboot.xyz bootloader (netboot.xyz.kpxe or netboot.xyz.efi). Remember to replace `SERVERIP` with the actual IP address of your netboot.xyz server. ```Router CLI 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 ``` -------------------------------- ### Download netboot.xyz iPXE Image to EdgeRouter TFTP Root Source: https://netboot.xyz/docs/kb/networking/edgerouter This snippet shows how to download the netboot.xyz iPXE kernel image (netboot.xyz.kpxe) directly to the configured TFTP root directory on the EdgeRouter and set appropriate file permissions. ```shell 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 ``` -------------------------------- ### Configure netboot.xyz Container on Synology NAS Source: https://netboot.xyz/docs/kb/hardware/synology Detailed configuration steps for creating the netboot.xyz container, including setting up container name, auto-restart, port mappings for web UI, TFTP, and assets, volume mounts for configuration and assets, network mode, and environment variables. ```Synology Container Manager Configuration Container Name: netbootxyz Enable Auto-restart: Yes Port Settings: - Map container port 3000/TCP to NAS port 3000 - Map container port 80/TCP to NAS port 8080 (for UI, to avoid conflict) - Map container port 69/UDP to NAS port 69 (for TFTP) Volume Settings: - Add Folder: Map a NAS folder to /config (container path) - Add Folder: Map a NAS folder to /assets (container path) Network Mode: Bridge Environment Variables: - Remove TFTP_OPTS if not used. - Ensure NGINX port matches mapped port (e.g., 8080). - Ensure WEB_APP_PORT matches mapped port (e.g., 3000). ``` -------------------------------- ### Create an Optional QEMU Virtual Disk Source: https://netboot.xyz/docs/booting/qemu This command creates an 8GB raw format virtual disk named `vmdisk` using `qemu-img`. This disk is optional and can be attached to the QEMU virtual machine if you need persistent storage for installations or other operations within the VM. ```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 ``` -------------------------------- ### Mount SMB Share for Windows ISO in WinPE Source: https://netboot.xyz/docs/kb/pxe/windows This command is executed within the Windows PE terminal to mount the Samba (SMB/CIFS) share where the extracted Windows 11 ISO files are located. It requires the server's IP address, the share name, and optionally a username and password if authentication is needed. ```Shell net use F: \\\ /user:\ ``` -------------------------------- ### Boot netboot.xyz on macOS Apple Silicon (M1) with QEMU Source: https://netboot.xyz/docs/booting/qemu This snippet outlines the steps to install QEMU via Homebrew and then boot netboot.xyz on an Apple Silicon Mac. It uses `qemu-system-aarch64` with HVF acceleration for performance, specifies the UEFI firmware for ARM, and includes devices for graphics and USB input, ensuring a functional virtual environment. ```bash $ brew install qemu $ qemu-system-aarch64 --version QEMU emulator version 7.1.0 $ qemu-system-aarch64 -cpu host -M virt,accel=hvf -m 4G \ -drive file=/opt/homebrew/share/qemu/edk2-aarch64-code.fd,if=pflash,format=raw,readonly=on \ -kernel netboot.xyz-arm64.efi \ -serial stdio \ -device virtio-gpu-pci \ -device nec-usb-xhci -device usb-kbd ``` -------------------------------- ### iPXE script for Google Compute Engine metadata boot Source: https://netboot.xyz/docs/kb/providers/gce An example iPXE script designed for use within Google Compute Engine. It attempts to configure networking via DHCP and then chains to a custom iPXE boot script retrieved from the instance's metadata service. ```ipxe #!ipxe echo Google Compute Engine - iPXE boot via metadata ifstat || dhcp || route || chain -ar http://metadata.google.internal/computeMetadata/v1/instance/attributes/ipxeboot ``` -------------------------------- ### Configure TFTP Support in dnsmasq on EdgeRouter Source: https://netboot.xyz/docs/kb/networking/edgerouter This snippet details the steps to enable TFTP support within the dnsmasq service on a Ubiquiti EdgeRouter. It involves creating a dedicated TFTP root directory and configuring dnsmasq to use it for serving files. ```shell sudo mkdir /config/user-data/tftproot sudo chmod ugo+rX /config/user-data/tftproot configure set service dns forwarding options enable-tftp set service dns forwarding options tftp-root=/config/user-data/tftproot commit save ``` -------------------------------- ### Configure ISC DHCP to Include Custom PXE Configuration Files Source: https://netboot.xyz/docs/kb/networking/edgerouter These commands configure the ISC DHCP server to deny BOOTP requests and include custom configuration files (`option-space.conf` globally and `pxe.conf` for a specific subnet). These files define iPXE options and boot filename logic. ```Shell 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\";" ``` -------------------------------- ### Display EdgeRouter DHCP LAN Pool Configuration Source: https://netboot.xyz/docs/kb/networking/edgerouter This snippet shows the expected output of the `show service dhcp-server shared-network-name LAN` command on an EdgeRouter, demonstrating the applied DHCP configuration for the 'LAN' subnet, including bootfile server and name. ```shell skottler@edge1# show service dhcp-server shared-network-name LAN authoritative enable subnet 10.10.2.0/24 { bootfile-name netboot.xyz.kpxe bootfile-server 10.10.2.1 default-router 10.10.2.1 dns-server 10.10.2.1 lease 86400 start 10.10.2.100 { stop 10.10.2.199 } } [edit] ``` -------------------------------- ### Configure iPXE Manual Networking for DigitalOcean Droplets Source: https://netboot.xyz/docs/kb/providers/digitalocean This snippet illustrates the interactive prompts for manually configuring network settings within the iPXE failsafe menu. It guides the user to input the network interface number, droplet IP address, subnet mask, gateway, and a DNS server to establish network connectivity for iPXE. ```Configuration Set network interface number [0 for net0, defaults to 0]: IP: Subnet mask: Gateway: DNS: ``` -------------------------------- ### Vultr: Booting from netboot.xyz ISO Source: https://netboot.xyz/docs/kb/providers/vultr Instructions for deploying a Vultr instance by uploading the netboot.xyz ISO and selecting it as the operating system. This method involves manual ISO upload and selection through the Vultr console. ```URL https://boot.netboot.xyz/ipxe/netboot.xyz.iso ``` -------------------------------- ### Bash Commands for Self-Hosting Assets Source: https://netboot.xyz/docs/community/build-automation This Bash script provides a basic method for downloading and organizing netboot.xyz assets based on provided metadata. It sets environment variables for the download path and URL, creates a local directory structure, and uses `wget` to fetch the specified `initrd` and `vmlinuz` files. ```Bash export DLPATH="/ubuntu-core-18.04/releases/download/4.15.0.20.23-91c3d317/" export DLURL="https://github.com/netbootxyz$DLPATH" mkdir -p .$DLPATH wget -O ."$DLPATH"initrd "$DLURL"initrd wget -O ."$DLPATH"vmlinuz "$DLURL"vmlinuz ``` -------------------------------- ### Configure DHCP Server for netboot.xyz on EdgeRouter Source: https://netboot.xyz/docs/kb/networking/edgerouter This snippet outlines the configuration steps for the DHCP server on the EdgeRouter to provide the necessary boot parameters for netboot.xyz. It sets the client architecture option, the bootfile server IP, and the bootfile name for the specified DHCP pool (e.g., 'LAN'). ```shell 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 ``` -------------------------------- ### Configure DigitalOcean Droplet for netboot.xyz with GRUB Imageboot Source: https://netboot.xyz/docs/kb/providers/digitalocean This script prepares a Debian/Ubuntu-based DigitalOcean droplet to boot netboot.xyz. It removes the default GRUB timeout, increases the GRUB menu display duration, installs grub-imageboot, downloads the netboot.xyz ISO to /boot/images, and updates the GRUB configuration. A reboot is required to apply changes, and access via the recovery console is recommended to select the netboot.xyz option. ```bash # 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 ``` -------------------------------- ### ISC DHCP PXE Boot Filename Configuration (pxe.conf) Source: https://netboot.xyz/docs/kb/networking/edgerouter This configuration file, `pxe.conf`, defines the boot behavior for clients based on their architecture. It sets the `next-server` and dynamically selects between `netboot.xyz.efi` for EFI clients and `netboot.xyz.kpxe` for legacy BIOS clients, ensuring the correct boot file is served. ```DHCP Config 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"; } ``` -------------------------------- ### Write netboot.xyz Image to USB on macOS Source: https://netboot.xyz/docs/booting/usb This set of commands guides users through the process of creating a bootable netboot.xyz USB key on macOS. It involves identifying the USB device, unmounting it, writing the image using `dd` (with considerations for `rdisk` and `bs=1m`), and finally ejecting the drive. Important notes about `dd` errors and disk utility are included. ```bash diskutil list ``` ```bash diskutil unmountDisk /dev/diskN ``` ```bash sudo dd if=netboot.xyz.img of=/dev/rdiskN bs=1m ``` ```bash diskutil eject /dev/diskN ``` -------------------------------- ### ISC DHCP iPXE Option Space Declaration (option-space.conf) Source: https://netboot.xyz/docs/kb/networking/edgerouter This configuration file, `option-space.conf`, declares the iPXE/gPXE/Etherboot option space within ISC DHCP. It defines various iPXE-specific options and feature flags, allowing the DHCP server to communicate advanced boot parameters to iPXE clients. It also includes the standard `arch` option. ```DHCP Config # Declare the iPXE/gPXE/Etherboot option space option space ipxe; option ipxe-encap-opts code 175 = encapsulate ipxe; # iPXE options, can be set in DHCP response packet option ipxe.priority code 1 = signed integer 8; option ipxe.keep-san code 8 = unsigned integer 8; option ipxe.skip-san-boot code 9 = unsigned integer 8; option ipxe.syslogs code 85 = string; option ipxe.cert code 91 = string; option ipxe.privkey code 92 = string; option ipxe.crosscert code 93 = string; option ipxe.no-pxedhcp code 176 = unsigned integer 8; option ipxe.bus-id code 177 = string; option ipxe.bios-drive code 189 = unsigned integer 8; option ipxe.username code 190 = string; option ipxe.password code 191 = string; option ipxe.reverse-username code 192 = string; option ipxe.reverse-password code 193 = string; option ipxe.version code 235 = string; option iscsi-initiator-iqn code 203 = string; # iPXE feature flags, set in DHCP request packet option ipxe.pxeext code 16 = unsigned integer 8; option ipxe.iscsi code 17 = unsigned integer 8; option ipxe.aoe code 18 = unsigned integer 8; option ipxe.http code 19 = unsigned integer 8; option ipxe.https code 20 = unsigned integer 8; option ipxe.tftp code 21 = unsigned integer 8; option ipxe.ftp code 22 = unsigned integer 8; option ipxe.dns code 23 = unsigned integer 8; option ipxe.bzimage code 24 = unsigned integer 8; option ipxe.multiboot code 25 = unsigned integer 8; option ipxe.slam code 26 = unsigned integer 8; option ipxe.srp code 27 = unsigned integer 8; option ipxe.nbi code 32 = unsigned integer 8; option ipxe.pxe code 33 = unsigned integer 8; option ipxe.elf code 34 = unsigned integer 8; option ipxe.comboot code 35 = unsigned integer 8; option ipxe.efi code 36 = unsigned integer 8; option ipxe.fcoe code 37 = unsigned integer 8; option ipxe.vlan code 38 = unsigned integer 8; option ipxe.menu code 39 = unsigned integer 8; option ipxe.sdi code 40 = unsigned integer 8; option ipxe.nfs code 41 = unsigned integer 8; # Other useful general options # https://www.iana.org/assignments/dhcpv6-parameters/dhcpv6-parameters.xhtml option arch code 93 = unsigned integer 16; ``` -------------------------------- ### Metadata for Self-Hosting Assets Source: https://netboot.xyz/docs/community/build-automation This YAML-like metadata structure defines the `path` and `files` for specific netboot.xyz assets, such as `initrd` and `vmlinuz`. This information is crucial for constructing direct download URLs that are compatible with the project's menus, enabling self-hosting. ```YAML path: /ubuntu-core-18.04/releases/download/4.15.0.20.23-91c3d317/ files: - initrd - vmlinuz ``` -------------------------------- ### YAML Configuration for OpenBSD Versions Source: https://netboot.xyz/docs/community/build-automation This YAML snippet from `defaults/main.yml` defines the configuration for OpenBSD, including its name, mirror, base directory, enabled status, menu category, and a list of available versions with their names, code names, and image versions. It serves as a base for user overrides. ```YAML openbsd: name: "OpenBSD" mirror: "http://ftp.openbsd.org" base_dir: "pub/OpenBSD" enabled: true menu: "bsd" versions: - name: "6.6" code_name: "6.6" image_ver: "66" - name: "6.5" code_name: "6.5" image_ver: "65" - name: "6.4" code_name: "6.4" image_ver: "64" - name: "6.3" code_name: "6.3" image_ver: "63" - name: "6.6 Latest Snapshot" code_name: "snapshots" image_ver: "66" ``` -------------------------------- ### Configure GRUB to Boot netboot.xyz UEFI Executable Source: https://netboot.xyz/docs/booting/uefi This GRUB menu entry allows booting the netboot.xyz UEFI executable. It searches for the EFI file and then uses `chainloader` to execute it. This entry should be added to `/etc/grub.d/40_custom`. ```plaintext menuentry "netboot.xyz" { search --no-floppy --file --set=root /EFI/netboot.xyz/netboot.xyz.efi chainloader /EFI/netboot.xyz/netboot.xyz.efi } ``` -------------------------------- ### Prepare Asuswrt-Merlin for PXE Booting Source: https://netboot.xyz/docs/kb/networking/asuswrt-merlin This snippet outlines the initial shell commands to prepare the Asuswrt-Merlin router for PXE booting. It includes connecting via SSH, creating the TFTP root directory, and downloading the necessary netboot.xyz iPXE kernel and EFI files to the router's JFFS partition. ```Shell ssh username@192.168.1.1 mkdir /jffs/tftproot curl -o /jffs/tftproot/netboot.xyz.kpxe https://boot.netboot.xyz/ipxe/netboot.xyz.kpxe curl -o /jffs/tftproot/netboot.xyz.efi https://boot.netboot.xyz/ipxe/netboot.xyz.efi touch /jffs/configs/dnsmasq.conf.add nano /jffs/configs/dnsmasq.conf.add ``` -------------------------------- ### Copy SSL Certificates and CA Certificates for HTTPS Booting Source: https://netboot.xyz/docs/community/build-automation This shell script creates necessary directories and copies SSL certificates and CA certificates from standard system locations to a specified destination directory. It also configures `wget` to use the copied certificates, enabling HTTPS support for network booting. ```Shell mkdir -p \ $DESTDIR/etc/ssl \ $DESTDIR/usr/share/ca-certificates/ cp -a \ /etc/ssl/certs \ $DESTDIR/etc/ssl/ cp -a \ /etc/ca-certificates \ $DESTDIR/etc/ cp -a \ /usr/share/ca-certificates/mozilla \ $DESTDIR/usr/share/ca-certificates/ echo "ca_directory=/etc/ssl/certs" > $DESTDIR/etc/wgetrc ``` -------------------------------- ### Vultr: Booting from netboot.xyz iPXE Chain URL (Virtual Instance) Source: https://netboot.xyz/docs/kb/providers/vultr Steps to deploy a Vultr virtual instance using the netboot.xyz iPXE chain URL. This method simplifies the boot process by directly chaining to the netboot.xyz menu, requiring console access within five minutes of boot. ```URL https://boot.netboot.xyz ``` -------------------------------- ### Download and Import netboot.xyz ISO into OpenStack Glance Source: https://netboot.xyz/docs/kb/providers/openstack This snippet demonstrates how to download the netboot.xyz ISO image using `wget` and then import it into OpenStack Glance as a public image. It includes the `glance image-create` command with parameters for disk format, container format, and visibility, along with the expected output showing image properties. ```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 +------------------+--------------------------------------+ | 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 | +------------------+--------------------------------------+ ``` -------------------------------- ### Remove Existing PXE Boot Configurations from ISC DHCP Source: https://netboot.xyz/docs/kb/networking/edgerouter These commands remove the `bootfile-name` and `bootfile-server` options from the specified DHCP shared network and subnet, preparing for new PXE configurations. This is a prerequisite for setting up netboot.xyz with ISC DHCP. ```Shell delete service dhcp-server shared-network-name LAN subnet 10.10.2.0/24 bootfile-name netboot.xyz.kpxe delete service dhcp-server shared-network-name LAN subnet 10.10.2.0/24 bootfile-server 10.10.2.1 ``` -------------------------------- ### dnsmasq TFTP Server Configuration Source: https://netboot.xyz/docs/booting/tftp Configure dnsmasq to act as a TFTP server by enabling the service, specifying the root directory for TFTP files (e.g., /var/lib/tftp), and defining the default boot file for network clients. ```Configuration enable-tftp tftp-root=/var/lib/tftp dhcp-boot=netboot.xyz.kpxe ``` -------------------------------- ### Generic DHCP Server Configuration for TFTP Boot Source: https://netboot.xyz/docs/booting/tftp Configure a standard DHCP server to provide the TFTP server address ("next-server") and the netboot.xyz boot file ("filename") to network-booting clients. This allows clients to automatically pull the iPXE bootloader and load the OS menu. ```Configuration next-server "1.2.3.4" filename "netboot.xyz.kpxe" ``` -------------------------------- ### Add UEFI Boot Entry with efibootmgr Source: https://netboot.xyz/docs/booting/uefi This command creates a new UEFI boot entry for the netboot.xyz executable. It requires specifying the disk and partition of the EFI system partition and a label for the entry. The `--loader` flag points to the path of the netboot.xyz EFI file. ```bash sudo efibootmgr --create --disk /dev/sdX --part Y --label "netboot.xyz" --loader /EFI/netboot.xyz/netboot.xyz.efi ``` -------------------------------- ### Boot netboot.xyz from UEFI Shell Source: https://netboot.xyz/docs/booting/uefi This sequence of commands allows booting the netboot.xyz UEFI executable directly from the UEFI Shell. It involves navigating to the correct filesystem and directory, then executing the EFI file. ```bash fsX: cd EFI\netboot.xyz netboot.xyz.efi ``` -------------------------------- ### Download netboot.xyz.kpxe and Register to TFTP Server in RouterOS (BIOS) Source: https://netboot.xyz/docs/kb/networking/mikrotik Fetches the netboot.xyz.kpxe boot file from the official URL and registers it with the RouterOS TFTP server, making it available for BIOS PXE clients. ```RouterOS /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 ``` -------------------------------- ### Jinja2 Loop for Menu Entry Generation Source: https://netboot.xyz/docs/community/build-automation This Jinja2 template iterates through `releases.items()` to dynamically generate menu entries. It filters entries based on whether they are enabled, belong to the 'bsd' menu, and are explicitly set to true, displaying the key and name of each release. ```Jinja2 {% for key, value in releases.items() | sort(attribute='1.name') %} {% if value.enabled is defined and value.menu == "bsd" and value.enabled | bool %} item {{ key }} ${space} {{ value.name }} {% endif %} {% endfor %} ``` -------------------------------- ### Chainload netboot.xyz with iPXE using DHCP Source: https://netboot.xyz/docs/booting/ipxe This iPXE command sequence configures DHCP on the network interface and then chainloads the netboot.xyz menu from the official HTTPS URL. It's used when an iPXE environment is already set up and DHCP is available. ```iPXE dhcp chain --autofree https://boot.netboot.xyz ``` -------------------------------- ### Chainload netboot.xyz with iPXE using Static IP Source: https://netboot.xyz/docs/booting/ipxe This iPXE command sequence manually configures network settings (IP, netmask, gateway, DNS) for the 'net0' interface when DHCP is not available. After setting up the network, it chainloads the netboot.xyz menu from the official HTTPS URL. ```iPXE set net0/ip set net0/netmask set net0/gateway set dns ifopen net0 chain --autofree https://boot.netboot.xyz ``` -------------------------------- ### Chainload netboot.xyz with iPXE (HTTP fallback) Source: https://netboot.xyz/docs/booting/ipxe This iPXE command chainloads the netboot.xyz menu using an HTTP connection. This is a fallback option for iPXE builds that do not support HTTPS, addressing 'Operation not supported' errors. ```iPXE chain --autofree http://boot.netboot.xyz ``` -------------------------------- ### Add netboot.xyz Entry to systemd-boot Source: https://netboot.xyz/docs/booting/uefi This configuration snippet creates a new boot entry for netboot.xyz in systemd-boot. It specifies the title and the path to the UEFI executable. This file should be placed in `/boot/loader/entries/`. ```plaintext title netboot.xyz efi /EFI/netboot.xyz/netboot.xyz.efi ``` -------------------------------- ### Run Ansible Playbook for netboot.xyz Deployment Source: https://netboot.xyz/docs/selfhosting Navigate to the cloned netboot.xyz directory and execute this Ansible playbook to generate the custom netboot.xyz environment, including menus and iPXE bootloaders. The output is placed in /var/www/html by default. ```bash cd /opt/netboot.xyz ansible-playbook -i inventory site.yml ```