{"id":13876097,"url":"https://github.com/rgl/pxe-vagrant","last_synced_at":"2025-06-13T01:32:44.742Z","repository":{"id":43054111,"uuid":"65158068","full_name":"rgl/pxe-vagrant","owner":"rgl","description":"a Preboot Execution Environment (PXE) gateway","archived":false,"fork":false,"pushed_at":"2022-03-27T16:26:57.000Z","size":96,"stargazers_count":53,"open_issues_count":0,"forks_count":7,"subscribers_count":4,"default_branch":"master","last_synced_at":"2025-04-30T10:50:44.064Z","etag":null,"topics":["gateway","netboot","pxe","vagrant"],"latest_commit_sha":null,"homepage":null,"language":"Shell","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/rgl.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2016-08-07T23:06:09.000Z","updated_at":"2025-03-20T23:29:04.000Z","dependencies_parsed_at":"2022-07-08T10:13:47.311Z","dependency_job_id":null,"html_url":"https://github.com/rgl/pxe-vagrant","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/rgl/pxe-vagrant","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rgl%2Fpxe-vagrant","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rgl%2Fpxe-vagrant/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rgl%2Fpxe-vagrant/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rgl%2Fpxe-vagrant/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/rgl","download_url":"https://codeload.github.com/rgl/pxe-vagrant/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rgl%2Fpxe-vagrant/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":259561850,"owners_count":22876894,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["gateway","netboot","pxe","vagrant"],"created_at":"2024-08-06T06:01:00.760Z","updated_at":"2025-06-13T01:32:44.722Z","avatar_url":"https://github.com/rgl.png","language":"Shell","funding_links":[],"categories":["Shell","vagrant"],"sub_categories":[],"readme":"This is a [Vagrant](https://www.vagrantup.com/) Environment for a [Preboot Execution Environment (PXE)](https://en.wikipedia.org/wiki/Preboot_Execution_Environment) gateway.\n\n![](network.png)\n\n# Usage\n\nInstall the [Ubuntu 20.04 base box](https://github.com/rgl/ubuntu-vagrant).\n\nRun `create_empty_box.sh` to create the `empty` environment (the PXE client machines use it as a base box).\n\nRun `vagrant up gateway --no-destroy-on-error` to launch the gateway.\n\nRun `vagrant up debian_live --no-destroy-on-error` to launch the `debian_live` (Debian Live) PXE client. This assumes you have `../debian-live-builder-vagrant/live-image-amd64.hybrid.iso` built as described at the [rgl/debian-live-builder-vagrant](https://github.com/rgl/debian-live-builder-vagrant) repository.\n\nRun `vagrant up linuxkit --no-destroy-on-error` to launch the `linuxkit` (LinuxKit) PXE client. This assumes you have `../linuxkit-vagrant/shared/sshd-kernel` (and `sshd-initrd.img`) built as described at the [rgl/linuxkit-vagrant](https://github.com/rgl/linuxkit-vagrant) repository.\n\nRun `vagrant up tcl --no-destroy-on-error` to launch the `tcl` (Tiny Core Linux) PXE client.\n\nRun `vagrant up winpe --no-destroy-on-error` to launch the `winpe` (Windows PE) PXE client. This assumes you have `../windows-pe-vagrant/tmp/winpe-amd64.iso` built as described at the [rgl/windows-pe-vagrant](https://github.com/rgl/windows-pe-vagrant) repository. Note that vagrant wont be able to connect to it; the idea is just to see it PXE boot.\n\nThe `winpe` (Windows PE) PXE client can also install Windows from a SMB network share into the local disk, as described at the end of the [windows-server-2022/startup.ps1](windows-server-2022/startup.ps1) file.\n\n# PXE boot\n\nThis is roughly how Debian Live Linux is booted on a PXE PC:\n\n1. The PC broadcasts an DHCP request\n2. The DHCP server offers the TFTP server address (`10.10.10.2`) in the\n   `Next server IP address` field and the bootloader (`debian-live/lpxelinux.0`)\n   filename in the `Boot file name` field\n3. The PC TFTP downloads the `debian-live/lpxelinux.0` file\n4. `lpxelinux.0` HTTP downloads `ldlinux.c32` with a request similar to:\n    ```plain\n    GET /debian-live/ldlinux.c32 HTTP/1.0\n    Host: 10.10.10.2\n    User-Agent: Syslinux/6.03\n    Connection: close\n    Cookie: _Syslinux_ip=10.10.10.100%3A10.10.10.2%3A10.10.10.2%3A255.255.255.0\n    Cookie: _Syslinux_BOOTIF=01-08-00-27-00-00-03\n    Cookie: _Syslinux_SYSUUID=00000000-0000-4000-8000-000000000003\n    Cookie: _Syslinux_CPU=6PXL\n    Cookie: _Syslinux_SYSVENDOR=innotek+GmbH\n    Cookie: _Syslinux_SYSPRODUCT=VirtualBox\n    Cookie: _Syslinux_SYSVERSION=1.2\n    Cookie: _Syslinux_SYSSERIAL=0\n    Cookie: _Syslinux_SYSFAMILY=Virtual+Machine\n    Cookie: _Syslinux_MBVENDOR=Oracle+Corporation\n    Cookie: _Syslinux_MBPRODUCT=VirtualBox\n    Cookie: _Syslinux_MBVERSION=1.2\n    Cookie: _Syslinux_MBSERIAL=0\n    Cookie: _Syslinux_BIOSVENDOR=innotek+GmbH\n    Cookie: _Syslinux_BIOSVERSION=VirtualBox\n    Cookie: _Syslinux_SYSFF=1\n    ```\n5. `lpxelinux.0` HTTP downloads the configuration from one the first addresses that return an HTTP 200:\n    ```plain\n    /debian-live/pxelinux.cfg/00000000-0000-4000-8000-000000000003\n    /debian-live/pxelinux.cfg/01-08-00-27-00-00-03\n    /debian-live/pxelinux.cfg/0A0A0A64\n    /debian-live/pxelinux.cfg/0A0A0A6\n    /debian-live/pxelinux.cfg/0A0A0A\n    /debian-live/pxelinux.cfg/0A0A0\n    /debian-live/pxelinux.cfg/0A0A\n    /debian-live/pxelinux.cfg/0A0\n    /debian-live/pxelinux.cfg/0A\n    /debian-live/pxelinux.cfg/0\n    /debian-live/pxelinux.cfg/default\n    ```\n6. `lpxelinux.0` HTTP downloads and loads `linux` and `initrd` into memory\n7. `lpxelinux.0` transfers control to `linux`\n8. `initrd` HTTP downloads and mounts the root filesystem (`filesystem.squashfs`)\n\nYou can see all of this if you run the following command on your linux host before launching the `debian_live` vm:\n\n```bash\nvagrant ssh-config gateway \u003etmp/gateway-ssh-config.conf\nwireshark -k -i \u003c(ssh -F tmp/gateway-ssh-config.conf gateway 'sudo tcpdump -s 0 -U -n -i eth1 -w - not port 22')\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frgl%2Fpxe-vagrant","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Frgl%2Fpxe-vagrant","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frgl%2Fpxe-vagrant/lists"}