- PowerShell 89.3%
- Shell 10%
- Python 0.5%
- Batchfile 0.2%
- deploy.ps1 partitions Microsoft's recommended UEFI/GPT layout: EFI, MSR, Windows, then a recovery partition (shrink, type de94bba4-06d1-4d40-a16a-bfd50179d6ac, GPT attributes 0x8000000000000001). New setting recovery_mb (default 1024, 0 keeps the three-partition layout). - After bcdboot, Winre.wim is copied to R:\Recovery\WindowsRE, verified and registered with Reagentc /Setreimage; the original is removed and R: unassigned. A missing Winre.wim or a Reagentc failure is logged and recorded but does not fail the deployment (WinRE then stays on C:). - Tests for both diskpart layouts and the WinRE step; README, design, CHANGELOG, VERSION 0.0.15. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01J4PHgnHWx1bvAXbwTACKep |
||
|---|---|---|
| docs | ||
| Drivers | ||
| server | ||
| tests | ||
| tools | ||
| winpe | ||
| .gitattributes | ||
| .gitignore | ||
| AGENTS.md | ||
| CHANGELOG.md | ||
| README.md | ||
| VERSION | ||
Tabula
Zero-touch Windows deployment over PXE. A technician network-boots a machine, picks Install Windows in the menu, and walks away. The disk is erased and Windows is applied with the right answer file and drivers. Office and other apps install after setup.
WinPE stays small and rarely changes. All deployment logic and per-machine configuration live on a plain web server and Samba share, where you change them without rebuilding anything.
Design and the reasoning behind it: docs/design.md.
How it works
- PXE: dnsmasq hands out iPXE, and iPXE shows
menu.ipxe. The menu waits forever and defaults to Boot local disk. Only the Install Windows entry addsmode.txt=deployto WinPE (wimboot injects it), so nothing else can erase a disk. - WinPE runs
loader.ps1, the only Tabula code in boot.wim. It finds the repo the way munki does. It triesrepo.txtfrom the menu, thenhttps://deploy.<dhcp-domain>/repo/, thenhttp://deploy.<dhcp-domain>/repo/, thenhttps://deploy/repo/andhttp://deploy/repo/. HTTPS works with the server's self-made lab CA: the menu hands its public certificate (tabula-ca.cer) to WinPE through wimboot, and the loader trusts it before discovery. The first candidate that serves arepo.jsoncontaining"tabula": 1wins. The loader then downloads and runs that repo'sdeploy.ps1. - deploy.ps1 reads the machine's UUID, serial, make, model and MAC. It walks the answer-file chain in
repo.json, then checks the image on the share. Only after all of that does it erase the single internal disk and lay it out the way Microsoft recommends for UEFI: EFI, MSR, Windows and a 1 GB recovery partition (settings.recovery_mbinrepo.json;0leaves it out). It then applies the WIM straight from SMB with/CheckIntegrity, and adds the WinPE drivers plus any model driver pack. It stages the apps, runs bcdboot, moves WinRE (Winre.wim) from the image to the recovery partition withReagentc /Setreimage, and reboots. - Windows Setup uses the answer file. The continuation task installs the staged apps after setup, shows a full-screen progress window, and cleans up after itself.
Layout
| Path | What |
|---|---|
winpe/Build-TabulaPE.ps1 |
Builds boot.wim, BCD and boot.sdi from a Microsoft ISO and the ADK. Run on Windows. |
winpe/loader.ps1, winpe/startnet.cmd |
Baked into boot.wim. |
server/setup-tabula-server.sh |
Configures dnsmasq, nginx and Samba on the Ubuntu lab server, and copies in the repo code. |
server/pxe/ |
Config templates: dnsmasq, menu.ipxe, mode-deploy.txt, nginx, Samba. |
server/repo/ |
The repo code (deploy.ps1, Invoke-TabulaContinuation.ps1) and examples of repo.json, apps.json and an answer file. |
tools/ |
Export-TabulaImage.ps1 (exports one edition from a Windows ISO to the deployment WIM) and New-OfficePackage.ps1 (builds office.zip from an ODT download). Run on Windows. |
tests/ |
pwsh -File tests/Test-Tabula.ps1 and tests/Test-TabulaContinuation.ps1; on Windows PowerShell 5.1, powershell.exe -NoProfile -ExecutionPolicy Bypass -File .\tests\Test-Tabula.ps1 (and the same for Test-TabulaContinuation.ps1). Test-Tabula needs Python 3 on PATH. |
Drivers/ |
Your extracted INF drivers (git-ignored). Drivers\WinPE goes into boot.wim; Drivers\<maker>\<model> are sources for driver-pack zips. |
On the server (/srv/tabula)
boot/ menu.ipxe, wimboot, mode-deploy.txt, tabula-ca.cer, tabula-ca.crt, winpe/{boot.wim,BCD,boot.sdi}
repo/ repo.json, deploy.ps1, Invoke-TabulaContinuation.ps1
devices/<uuid>.xml, devices/<serial>.xml per machine (symlinks are fine)
models/<make>-<model>.xml per model
autounattended.xml everyone else (remove it to stop unknown machines)
drivers/<make>-<model>.zip extracted INF drivers, zipped
apps/apps.json, apps/<app>/<package>.zip
images/ win11-25h2-26200.6584-pro.wim read-only SMB share "images", user "deploy"
make and model are lowercase, with anything other than letters, digits, ., _ and - turned into -. For example, a Lenovo 21TF001RUS is models/lenovo-21tf001rus.xml. Placeholder serials and UUIDs ("To Be Filled By O.E.M.", all zeros and so on) are skipped, never requested.
A new machine: boot it with Install Windows. If there's no generic autounattended.xml, it stops before touching the disk and shows its identity. /var/log/nginx/tabula-access.log shows the exact paths it asked for, plus a checkin line with its serial, UUID, MAC, make and model. Create or symlink the file it needs, then boot again.
Only a 404 moves the lookup to the next candidate. A timeout or server error retries, then stops. It never falls through to a more generic file.
Quick start (lab)
- Server (Ubuntu): copy this repository over, then run
sudo ./server/setup-tabula-server.sh eth0 <server-ip> <dhcp-start> <dhcp-end> lab.local. It offers to install missing packages (dnsmasq, nginx, samba, openssl, and the optional ipxe and smbclient) with apt-get;TABULA_INSTALL=yesornoanswers without asking. Air-gapped, preinstall them, or copy theipxebinaries in by hand (the script says so). It also offers to downloadwimbootinto/srv/tabula/boot/(sameTABULA_INSTALLanswer); air-gapped, copy it there by hand (the script prints the command). The script also creates the lab CA and the HTTPS certificate in/etc/tabula/pki(see below). On a multi-homed server, the first argument is the deployment NIC and<server-ip>must be its address: dnsmasq, nginx and Samba listen only there (plus loopback for DNS and Samba). - WinPE (Windows with the ADK and WinPE add-on): put NIC drivers in
Drivers\WinPE, then run.\winpe\Build-TabulaPE.ps1 -IsoPath <Windows ISO>. Copyout\boot\*to/srv/tabula/boot/winpe/. - Image (Windows, as administrator): run
.\tools\Export-TabulaImage.ps1 -IsoPath <Windows ISO>. It exports Windows 11 Pro with an integrity table toout\images\, named after the build, for examplewin11-25h2-26200.6584-pro.wim; pass-Editionor-Indexfor another edition. Copy the file to/srv/tabula/images/as the script shows. - repo.json: set
image.file,image.index(1) andimage.editionas the export script prints them, andimage.password(the Samba password ofdeploy). Then copyserver/repo/autounattended.example.xmlto/srv/tabula/repo/autounattended.xmland change its password. - Apps (optional): build
office.zipwithtools/New-OfficePackage.ps1and put it atrepo/apps/office/office.zip. Then createrepo/apps/apps.jsonfromapps.example.json. - PXE-boot a UEFI machine (Secure Boot off) and choose Install Windows.
HTTPS (lab CA)
setup-tabula-server.sh creates a private CA once (/etc/tabula/pki/ca.key and ca.crt, 10 years) and a server certificate for deploy.<domain>, deploy and the server IP (825 days). nginx serves /repo/ on both 443 and 80. Re-running the script keeps the CA and reissues the server certificate only when it's missing, expires within 30 days, or the IP or domain changed.
- Only the CA's public certificate is published, as
/srv/tabula/boot/tabula-ca.cer(DER) andtabula-ca.crt(PEM). Both WinPE menu entries inject the.cer, and the loader adds it to WinPE's trusted root store (it logs the SHA1, which the setup script also prints). Nothing server-specific goes into boot.wim. - Windows PowerShell 5.1 can't skip certificate checks, so without
tabula-ca.certhe https candidates fail with "UntrustedRoot" and discovery moves on to http. A machine whose clock is far off fails the same way; the loader logs its clock. - iPXE still loads the menu, wimboot and boot.wim over plain HTTP.
- To trust the CA in a browser or on an admin machine, use the PEM copy:
/srv/tabula/boot/tabula-ca.crton the server (readable without sudo), or download it fromhttp://<server-ip>/boot/tabula-ca.crt. Check its SHA1 against the one the setup script prints. Never copyca.keyanywhere.
Security notes
- The WIM is Microsoft's unmodified image, so the read-only share holds nothing secret.
- Answer files and
repo.jsoncontain passwords. The loader fetches them over HTTPS when the lab CA is trusted, and falls back to plain HTTP otherwise, where anyone on the deployment network can read them. Keep that network isolated either way. - The answer file's AutoLogon password: the install task turns automatic sign-in off and removes the registry copy when it finishes. Windows also keeps it as an LSA secret, which only administrators can read; use a lab-only password, or change it after deployment.
C:\ProgramData\Tabula(where the SYSTEM install task runs from) is locked to SYSTEM and Administrators; users can only read it.- Whoever controls DHCP or DNS on the deployment network can answer as
deployand serve a script that erases disks. That's acceptable on an isolated lab network. Production should use HTTPS-only discovery or a signeddeploy.ps1; neither is implemented yet.
Versioning
Every commit bumps the patch number in VERSION (see AGENTS.md). Changes are listed in CHANGELOG.md.