Hey! I have a debian server on which I'd like to install a TFTP server so I can mass…
- User
Hey! I have a debian server on which I'd like to install a TFTP server so I can mass install Windows 11 on my org's PCs through PXE. Could you please guide me through the entire process? Please note DHCP is managed by an external switch so it won't be necessary to set up one
Assistant
Sure! Setting up a TFTP server on Debian to support PXE booting for Windows 11 deployment is totally feasible. Since your organization's DHCP is handled externally (e.g., via a managed switch or router), we don’t need to configure a local DHCP server.
Here’s a step-by-step guide to install and configure a TFTP server, set up PXE booting, and prepare it for Windows 11 imaging:
🔧 Prerequisites
- A Debian-based server (Debian 11 or 12 recommended)
- Root or sudo access
- External DHCP server already configured to point clients to this Debian server as the PXE boot server
- Enough disk space to store Windows 11 installation files (~8–10GB minimum)
✅ Step 1: Install Required Packages
We'll use
tftpd-hpafor TFTP, andsyslinuxfor PXE boot files.sudo apt update sudo apt install tftpd-hpa syslinux syslinux-common pxelinux ntfs-3g
📁 Step 2: Prepare TFTP Root Directory
Create a directory for your TFTP files if it doesn't exist:
sudo mkdir -p /srv/tftpSet permissions:
sudo chmod -R 777 /srv/tftp sudo chown -R nobody /srv/tftp
⚙️ Step 3: Configure TFTP Server (
tftpd-hpa)Edit the configuration file:
sudo nano /etc/default/tftpd-hpaUpdate it with the following:
TFTPD_USERNAME="tftp" TFTPD_DIRECTORY="/srv/tftp" TFTPD_ADDRESS=":69" TFTPD_OPTIONS="--secure --create"Save and exit.
Restart the service:
sudo systemctl restart tftpd-hpaCheck status:
sudo systemctl status tftpd-hpaYou should see it running without errors.
🖥️ Step 4: Set Up PXE Boot Files
1. Copy PXELINUX files
PXELINUX is part of SYSLINUX:
sudo cp -r /usr/lib/SYSLINUX.PXELINUX/pxelinux.0 /srv/tftp/ sudo mkdir -p /srv/tftp/pxelinux.cfg2. Create default PXE config file:
sudo nano /srv/tftp/pxelinux.cfg/defaultAdd the following content (for now):
DEFAULT windows LABEL windows MENU LABEL Boot from network (Windows 11) KERNEL windows11/wimboot APPEND initrd=windows11/bootmgr.wim,windows11/sources/boot.wimWe’ll add the actual boot files in the next steps.
💾 Step 5: Prepare Windows 11 Installation Media
You’ll need a Windows 11 ISO file (from Microsoft).
Mount the ISO:
sudo mkdir /mnt/winiso sudo mount -o loop /path/to/your/windows11.iso /mnt/winisoCopy necessary files to TFTP folder:
Create a directory for Windows 11 files:
sudo mkdir -p /srv/tftp/windows11Copy the required boot files:
sudo cp /mnt/winiso/bootmgr.wim /srv/tftp/windows11/ sudo cp /mnt/winiso/sources/boot.wim /srv/tftp/windows11/Get
wimbootutility:sudo apt install wimtools sudo cp /usr/lib/wimboot/wimboot /srv/tftp/windows11/Unmount the ISO:
sudo umount /mnt/winiso
🧪 Step 6: Test PXE Boot
Make sure your target PCs are set to boot from network (PXE) in BIOS/UEFI settings.
Power them on and ensure they get an IP address from your DHCP server and then attempt to boot from the network.
If everything is set up correctly, you should see the PXE menu and start loading the Windows 11 boot image.
🛠️ Optional: Add Menu Entry for Local Boot
You can modify
/srv/tftp/pxelinux.cfg/defaultto allow fallback to local boot:DEFAULT menu.c32 PROMPT 0 TIMEOUT 300 MENU TITLE PXE Boot Menu LABEL windows MENU LABEL ^Boot Windows 11 Installer KERNEL windows11/wimboot APPEND initrd=windows11/bootmgr.wim,windows11/sources/boot.wim LABEL local MENU LABEL ^Boot from local disk LOCALBOOT 0Install
menu.c32:sudo cp /usr/lib/syslinux/modules/bios/menu.c32 /srv/tftp/
🔄 Troubleshooting Tips
- Make sure firewall allows UDP port 69 (TFTP).
- Check logs:
sudo journalctl -u tftpd-hpa - Ensure your external DHCP server is configured to send option
66(next-server) pointing to your Debian server's IP, and option67(filename) set topxelinux.0.
Example DHCP options:
option tftp-server-name "192.168.x.x"; option bootfile-name "pxelinux.0";
🎯 Bonus: Automate Windows Deployment (Optional)
Once the Windows installer loads, you can further automate setup using:
- An unattended answer file (
autounattend.xml) - WDS (Windows Deployment Services) — though that would require a Windows server
- MDT (Microsoft Deployment Toolkit) or SCCM (more advanced)
Let me know if you'd like help automating post-boot deployment tasks too!
✅ Summary
You now have a working TFTP + PXE setup on Debian to boot into Windows 11 installer over the network.
What was installed/configured:
Component Description tftpd-hpaTFTP server for PXE boot files syslinuxPXE boot loader (pxelinux.0) wimbootLoads .wimimages over the networkbootmgr.wim,boot.wimWindows boot files from ISO
Let me know if you want to expand this to support Linux imaging too, or automate full OS deployments (with unattended installs).
Other models, same or similar prompt
Responses were produced in different, uncontrolled contexts (system prompts, settings, prior turns). This is not a benchmark.