Skip to content

piffall/PXESetupWizard

Repository files navigation

PXE SW

Gitter

NetBoot installers and Live OSs over TFTP. This project is a wizard, collection of install scripts, patches, ... to setup a PXE server with most popular GNU/Linux distros.

Dockerized

  • Clone this repository.
git clone https://github.com/piffall/pxe-sw
  • Build image and setup, this could take several time
make all

After this point, the container is ready. You only need to start/stop when you need.

docker start pxe-sw
docker stop pxe-sw

Systemd (to start up on boot)

#### Enable as service

make install # Systemd only

Hosted

Requirements

  • Debian based OS (Debian,Ubuntu,Mint,...)
  • Some packages: wget, sudo, unzip, tar, ...

Install

  • Install dependencies
sudo apt-get -y install git tftpd-hpa unzip wget curl p7zip-full xzip xz-utils cpio
  • Clone this repository, I recomend you clone into your home path.
git clone https://github.com/piffall/pxe-sw /path/to/pxe-sw
  • Setup (required step)

This will ask for IP address to listen to, and if you want to setup all OS. If you are only interested in one of them, answer "n" to this question.

./setup.sh
  • Specific OS setup

If you only want to setup one OS, for example, Debian, find corresponding setup script and run it, after that, you shuold run fix-vesamenu.sh.

./scripts/exec/debian-stable-amd64.sh
./fix_vesamenu.sh
  • Create a symlink

If you /srv/tftp already exists, this will cause an error, please backup and remove /srv/tftp before symlink.

sudo ln -s /path/to/pxe/ /srv/tftp

Configure and install TFTP server

  • Install tftpd-hpa
sudo apt-get install tftpd-hpa
  • Edit the configuration file "/etc/default/tftpd-hpa"
# /etc/default/tftpd-hpa

TFTP_USERNAME="tftp"
TFTP_DIRECTORY="/srv/tftp"
TFTP_ADDRESS="0.0.0.0:69"
TFTP_OPTIONS="--verbose"
#TFTP_OPTIONS="--secure"

Note that "--secure" option line is commented

Configure DHCP Server

Configure with OpenWRT dhcp server

  • Edit the DHCP configuration file "/etc/config/dhcp" to add a dhcp_boot option
config dnsmasq
  option domainneeded '1'
  option boguspriv '1'
  option localise_queries '1'
  ...
  option dhcp_boot '/srv/tftp/pxelinux.0,pxe-hostname,192.168.1.254' # Change host and IP address.
  • Restart your device

Configure with DHCP3 Server

  • Add an option to the network configuration
subnet 192.168.1.0 netmask 255.255.255.0 {
	range 192.168.1.200 192.168.1.253;
	option domain-name "lan";
	default-lease-time 1800;
	max-lease-time 7200;
	next-server "192.168.1.254";                     # The TFTP IP address
	option bootfile-name "/srv/tftp/pxelinux.0";     # The PXE file
}

OS and Tools

Popular GNU/Linux Distributions

More GNU/Linux Distributions

Recovery

Diagnostic and detection

Other OS

Boot Loaders

Other Tools

License

All files are under GNU General Public License v3

Donations (BTC)

Please consider support the project donating to the Bitcoin address below:

17q6RT31yEJAptrUzXhwEq5iPwEguEFFBG