Giter VIP home page Giter VIP logo

pxe-server's Introduction

PXE Server

PXE Server provides a DHCP server with support PXE and network boot, TFTP server and HTTP server (only send static files).

Features

Avalible loaders:

  • SYSLINUX (bios, efi)
  • IPXE (bios, efi)
  • SHIM_GRUB2 (bios, efi with secure boot)
  • UEFI_HTTP (efi-only, not tested on real hardware)

Todo

  • Rewrite hard-coded dhcp boot filename for support user configuration

Quick start guide

  1. Download prepared wwwroot
  2. Download minilinux and extract to wwwroot
  3. Change loader config:
  4. Configure PXE (pxe.conf)
  5. Run server

Setup test enviroment

Tested only on Windows 10 x64.

Test EFI x64 boot:

  1. Install TAP-Windows
  2. Install QEMU
  3. Download OVMF EDK2
  4. Run QEMU
 qemu-system-x86_64.exe ^
 -M q35 ^
 -cpu max ^
 -m 512M ^
 -bios RELEASEX64_OVMF.fd ^
 -netdev tap,id=mynet0,ifname=<TAP interface name> -device e1000,netdev=mynet0

Test PXE BIOS boot:

  1. Install VirtualBox
  2. Create new VM and select network boot.
  3. Enjoy!

If server not work

Check your firewall and open ports:

  • UDP: 67, 69
  • TCP: 80

On Windows:

 netsh advfirewall firewall add rule name="PXE DHCP" dir=in action=allow protocol=UDP localport=67
 netsh advfirewall firewall add rule name="PXE DHCP" dir=out action=allow protocol=UDP localport=67 
 netsh advfirewall firewall add rule name="PXE TFTP" dir=in action=allow protocol=UDP localport=69
 netsh advfirewall firewall add rule name="PXE TFTP" dir=out action=allow protocol=UDP localport=69 
 netsh advfirewall firewall add rule name="PXE HTTP" dir=in action=allow protocol=TCP localport=80
 netsh advfirewall firewall add rule name="PXE HTTP" dir=out action=allow protocol=TCP localport=80

Notes

  1. How create grub2 pxe loader: grub-mkimage -d /usr/lib/grub/i386-pc/ -O i386-pc-pxe -p "(pxe)/grub" -o grub2.pxe pxe tftp pxechain boot http linux

  2. How work shim? Shim not work on http. I use signed shim from ubuntu 20.04. Its pre-compiled with hard-coded filename "grubx64.efi". So I can't set http path. Only work with tftp.

  3. Memdisk not work in EFI.

  4. Grub loopback can't loop ISO over HTTP :)

  5. IPXE sometimes slow downloading over HTTP (maybe bug?)

List of other open source projects used

License

This project is licensed under the MIT License - see the LICENSE file for details

pxe-server's People

Contributors

shkarlatov avatar

Watchers

James Cloos avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.