Giter Site home page Giter Site logo

pixie's Introduction

pixie

TFTP and HTTP server specifically designed to serve iPXE.

pixie comes embedded with the following ROMs provided by the iPXE project:

  • undionly.kpxe - for legacy (BIOS) machines
  • snponly64.efi - for 64-bit EFI machines
  • snponly32.efi - for 32-bit EFI machines
  • ipxe64.efi - for 64-bit EFI machines (contains embedded networking stack)
  • ipxe32.efi - for 32-bit EFI machines (contains embedded networking stack)
  • snponly-arm64.efi - for 64-bit ARM machines
  • snponly-arm32.efi - for 32-bit ARM machines

It comes with an embedded iPXE script, which is used to chainload into per-machine iPXE scripts or access an iPXE shell.

iPXE menu

It has no dependencies, everything is in one binary.

Usage

  1. Run the pixie binary using default ports, specifying path to store iPXE scripts:
pixie -d /srv/ipxe

See --help for more options

  1. Define iPXE script for a machine with the MAC-address 00:11:22:33:44:55:
cat >/srv/ipxe/00-11-22-33-44-55.ipxe <<EOF
#!ipxe
initrd http://dl.rockylinux.org/pub/rocky/8/BaseOS/x86_64/os/images/pxeboot/initrd.img
kernel http://dl.rockylinux.org/pub/rocky/8/BaseOS/x86_64/os/images/pxeboot/vmlinuz initrd=initrd.magic
boot
EOF
  1. Configure pixie as the next-server on the DHCP server:

Example for ISC dhcpd:

option client-architecture code 93 = unsiged integer 16;
if exists user-class and option user-class = "iPXE" {
	filename "chain.ipxe";
} elsif option client-architecture = 00:00 {
	filename "undionly.kpxe";
} else {
	filename "snponly.efi";
}
next-server 192.168.0.100;

Example for dnsmasq:

dhcp-match=set:ipxe,175
dhcp-vendorclass=BIOS,PXEClient:Arch:00000
dhcp-boot=tag:!ipxe,tag:BIOS,undionly.kpxe,pixie,192.168.0.100
dhcp-boot=tag:!ipxe,tag:!BIOS,snponly.efi,pixie,192.168.0.100
dhcp-boot=tag:ipxe,chain.ipxe,pixie,192.168.0.100

In both these examples pixie runs on 192.168.0.100

Walkthrough

When a machine with the MAC-address of 00:11:22:33:44:55 now attempts to PXE boot, the following will happen:

  1. The machine queries DHCP (standard procedure from PXE)
  2. The DHCP server will instruct the machine to download a new ROM from pixie (next-server) using TFTP
    • if the machine is running BIOS it will ask for undionly.kpxe
    • if the machine is running EFI it will ask for snponly.efi
  3. The machine downloads and runs the iPXE ROM from pixie
  4. The machine queries DHCP again (this time from iPXE)
  5. The DHCP server will instruct the machine to download the chain.ipxe file from pixie using TFTP
  6. The machine downloads and runs the chain.ipxe script
    • the screenshot above shows this stage
  7. Unless manually intervened, the machine chainloads into its iPXE script from pixie using HTTP
  8. The machine boots the operating system

ceshi

pixie's People

Contributors

dependabot[bot] avatar github-actions[bot] avatar p3lim avatar yyy1867 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.