Skip to content

igorpupkinable/TFTP-PXE-Boot-Server

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

20 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

TFTP-PXE-Boot-Server

This project contains basic files and folder setup needed for a TFTP PXELINUX server.

Network (PXE) boot supports the following live CD or installation distros for BIOS and UEFI (without Secure Boot yet) devices.

  • CentOS 6.x
  • CentOS 7.0
  • CloneZilla Live 64-bit with additional non-free firmware support
  • CloneZilla Live 32-bit with i686 support
  • Fedora 24
  • GParted Live 64-bit
  • GParted Live 32-bit with i686 support
  • Ubuntu 16.04 (Xenial)

Usage

  1. Set up TFTP server
  2. Optionally set up HTTP server pointing to images/ directory
    • Debug HTTP server as per instructions below
  3. Check out this project code on TFTP server git clone --depth 1 [email protected]:paulmaunders/TFTP-PXE-Boot-Server.git .
  4. Ensure TFTP server root points to this project directory
    • Debug TFTP server as per instructions below
  5. Configure your DHCP to use TFTP server
    • Use DHCP option 66 "next-server" if located on a different IP to DHCP server
    • DHCP should offer the PXELINUX.0 as the boot filename (DHCP option 67)
    • Follow these instructions on Synology router
  6. Optionally edit the <architecture>/pxelinux.cfg/default files to add your PXE boot options
  7. Create symlinks to images in this project directory
    user:~$ ln -s <absolute path>/images/ bios/images
    user:~$ ln -s <absolute path>/images/ efi32/images
    user:~$ ln -s <absolute path>/images/ efi64/images
  8. Download and configure each bootstrap program you require as per instructions. Bootstraps are not committed to this repository due to their size.

Debug TFTP server

tftp is the user interface to the Internet TFTP (Trivial File Transfer Protocol), which allows users to transfer files to and from a remote machine. The remote host may be specified on the command line, in which case tftp uses host as the default host for future transfers.

  1. Install TFTP client
user:~$ sudo apt update
user:~$ sudo apt install tftp
  1. Test connection and file download
user:~$ tftp 192.168.0.123
tftp> verbose
Verbose mode on.
tftp> get bios/pxelinux.0
getting from 192.168.0.123:bios/pxelinux.0 to pxelinux.0 [netascii]
Received 46995 bytes in 0.2 seconds [1879800 bits/sec]
tftp> quit

Debug HTTP server

  1. Download a file placed in images/ directory
user:~$ wget http://192.168.0.123/somefile.txt

Alpine Linux instructions

TODO

CentOS instructions

TODO

CloneZilla Live 64-bit instructions

  1. Download amd64 ISO or ZIP alternative stable release from here
  2. Create image version directory in this project, i.e. images/clonezilla/20230212-kinetic
  3. Extract vmlinuz, initrd.img and filesystem.squashfs files from live/ directory of the downloaded archive
  4. Image version directory should look like this
  • images/clonezilla/20230212-kinetic/filesystem.squashfs
  • images/clonezilla/20230212-kinetic/initrd.img
  • images/clonezilla/20230212-kinetic/vmlinuz
  1. Make sure CloneZilla Live x64 KERNEL, APPEND initrd and APPEND fetch paths and TFTP/HTTP server IP match in <architecture>/pxelinux.cfg/default configuration file, e.g.

for TFTP: LINUX images/clonezilla/20230212-kinetic/vmlinuz APPEND initrd=images/clonezilla/20230212-kinetic/initrd.img ... fetch=tftp://192.168.0.123/images/clonezilla/20230212-kinetic/filesystem.squashfs

for HTTP: LINUX http://192.168.0.123/clonezilla/20230212-kinetic/vmlinuz APPEND initrd=http://192.168.0.123/clonezilla/20230212-kinetic/initrd.img ... fetch=http://192.168.0.123/clonezilla/20230212-kinetic/filesystem.squashfs

More information can be found here

CloneZilla Live 32-bit instructions

  1. Download i686 ISO or ZIP stable release from here
  2. Create image version directory in this project, i.e. images/clonezilla/3.1.0-22-i686
  3. Extract vmlinuz, initrd.img and filesystem.squashfs files from live/ directory of the downloaded archive
  4. Image version directory should look like this
  • images/clonezilla/3.1.0-22-i686/filesystem.squashfs
  • images/clonezilla/3.1.0-22-i686/initrd.img
  • images/clonezilla/3.1.0-22-i686/vmlinuz
  1. Make sure CloneZilla Live x32 KERNEL, APPEND initrd and APPEND fetch paths and TFTP/HTTP server IP match in <architecture>/pxelinux.cfg/default configuration file, e.g.

for TFTP: LINUX images/clonezilla/3.1.0-22-i686/vmlinuz APPEND initrd=images/clonezilla/3.1.0-22-i686/initrd.img ... fetch=tftp://192.168.0.123/images/clonezilla/3.1.0-22-i686/filesystem.squashfs

for HTTP: LINUX http://192.168.0.123/clonezilla/3.1.0-22-i686/vmlinuz APPEND initrd=http://192.168.0.123/clonezilla/3.1.0-22-i686/initrd.img ... fetch=http://192.168.0.123/clonezilla/3.1.0-22-i686/filesystem.squashfs

More information can be found here and here

Fedora instructions

TODO

GParted Live 64-bit instructions

  1. Download amd64 ISO or ZIP stable release from here
  2. Create image version directory in this project, i.e. images/gparted/1.5.0-1-amd64
  3. Extract vmlinuz, initrd.img and filesystem.squashfs files from live/ directory of the downloaded archive
  4. Image version directory should look like this
  • images/gparted/1.5.0-1-amd64/filesystem.squashfs
  • images/gparted/1.5.0-1-amd64/initrd.img
  • images/gparted/1.5.0-1-amd64/vmlinuz
  1. Make sure GParted Live x64 KERNEL, APPEND initrd and APPEND fetch paths and TFTP/HTTP server IP match in <architecture>/pxelinux.cfg/default configuration file, e.g.

for TFTP: LINUX images/gparted/1.5.0-1-amd64/vmlinuz APPEND initrd=images/gparted/1.5.0-1-amd64/initrd.img ... fetch=tftp://192.168.0.123/images/gparted/1.5.0-1-amd64/filesystem.squashfs

for HTTP: LINUX http://192.168.0.123/gparted/1.5.0-1-amd64/vmlinuz APPEND initrd=http://192.168.0.123/gparted/1.5.0-1-amd64/initrd.img ... fetch=http://192.168.0.123/gparted/1.5.0-1-amd64/filesystem.squashfs

More information can be found here

GParted Live 32-bit instructions

  1. Download i686 ISO or ZIP stable release from here
  2. Create image version directory in this project, i.e. images/gparted/1.5.0-1-i686
  3. Extract vmlinuz, initrd.img and filesystem.squashfs files from live/ directory of the downloaded archive
  4. Image version directory should look like this
  • images/gparted/1.5.0-1-i686/filesystem.squashfs
  • images/gparted/1.5.0-1-i686/initrd.img
  • images/gparted/1.5.0-1-i686/vmlinuz
  1. Make sure GParted Live x32 KERNEL, APPEND initrd and APPEND fetch paths and TFTP/HTTP server IP match in <architecture>/pxelinux.cfg/default configuration file, e.g.

for TFTP: LINUX images/gparted/1.5.0-1-i686/vmlinuz APPEND initrd=images/gparted/1.5.0-1-i686/initrd.img ... fetch=tftp://192.168.0.123/images/gparted/1.5.0-1-i686/filesystem.squashfs

for HTTP: LINUX http://192.168.0.123/gparted/1.5.0-1-i686/vmlinuz APPEND initrd=http://192.168.0.123/gparted/1.5.0-1-i686/initrd.img ... fetch=http://192.168.0.123/gparted/1.5.0-1-i686/filesystem.squashfs

More information can be found here and here

Ubuntu Desktop instructions

TODO

Ubuntu Minimal instructions

TODO

Ubuntu Server instructions

TODO


Further documentation

The Syslinux Project
https://www.syslinux.org/

PXELINUX is a Syslinux derivative for booting from a network server
https://wiki.syslinux.org/wiki/index.php?title=PXELINUX

  • Configuration introduction can be found here
  • Advanced menu system configuration documentation can be found here
How to upgrade Syslinux
  1. Clone repository
    git clone --depth 1 https://github.com/paulmaunders/TFTP-PXE-Boot-Server .
  2. Download new version from https://wiki.syslinux.org/wiki/index.php?title=Download
    wget https://mirrors.edge.kernel.org/pub/linux/utils/boot/syslinux/Testing/6.04/syslinux-6.04-pre1.zip
  3. Extract modules and dependencies according to https://wiki.syslinux.org/wiki/index.php?title=Library_modules
  • bios/com32/elflink/ldlinux.c32
  • bios/com32/libutil/libutil.c32
  • bios/com32/menu/menu.c32
  • bios/com32/modules/linux.c32
  • bios/core/pxelinux.0
  1. DO NOT use Syslinux versions 5.10 to 6.02 due to known bug which crashes VM
dnsmasq DHCP server

https://dnsmasq.org/docs/dnsmasq-man.html

Run dnsmasq --help dhcp to see available DHCP options. List of standard DHCP options is here.

Testing with Oracle VirtualBox
  1. Oracle VirtualBox VM requires at least 1024MB of base memory for successful testing.
  2. Oracle VirtualBox VM requires Intel PRO/1000 MT Desktop bridged network adapter for successful BIOS PXE testing.
  3. Oracle VirtualBox VM requires virtio-net bridged network adapter for successful UEFI PXE testing.
  4. Use Microsoft Hyper-V Generation 2 VM for successful UEFI PXE testing.

About

Files and folder setup for a TFTP PXELINUX server

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published