Offline install that lands fully patched: resolve against the ISO's own base
- autoinstall: dead mirror + fallback offline-install, so the installed base is exactly the ISO's; late-commands run offline-apt-install.sh on CIDATA packages/ (local apt repo, one transaction, errors fail the install, log /var/log/offline-apt-install.log); first boot no longer runs dpkg -i; real archive sources written back at the end. - download-packages.sh --iso: unpacks the ISO's default install source into a docker image (pxe-iso-base:<version>) and downloads there: all updates of the base, the explicit list (zip included) and the newest pool packages with their closure; writes Packages + explicit.list and checks the set offline in a fresh base container (--network none). - offline-apt-install.sh: new; also used by that check (--simulate). - build-usb.sh: ships Packages, explicit.list and the script; refuses a set without them. - tests/vm: pxetest-client-nosb (Secure Boot off, e1000e, SATA), one client at a time.
This commit is contained in:
@@ -10,7 +10,8 @@ a laptop, without root and without touching a real network.
|
||||
| `pxetest-imaging` | libvirt network, bridge `virbr-pxetest`. No `<forward>`, no `<ip>`: the host has no address on it and libvirt runs no DHCP there. Only VM taps are on the bridge. |
|
||||
| `default` | libvirt NAT, 192.168.122.0/24. Stands in for the GE/corp network. |
|
||||
| `pxetest-server` | 2 vCPU, 4 GiB, q35 + OVMF Secure Boot (MS keys), 60G thin qcow2 (`vda`, boot 1), the USB image as a USB disk (`sda`, boot 2). |
|
||||
| `pxetest-client` | 2 vCPU, 2 GiB, OVMF Secure Boot (MS keys), 1G blank disk, network boot first (UEFI IPv4 PXE, virtio-net, OVMF driver, no option ROM). |
|
||||
| `pxetest-client` | 2 vCPU, 2 GiB, OVMF Secure Boot (MS keys), 1G blank disk, network boot first (UEFI IPv4 PXE, virtio-net, OVMF driver, no option ROM). Proves shim -> iPXE -> menu -> WinPE under Secure Boot; WinPE has no virtio driver, so it stops at "Waiting for network". |
|
||||
| `pxetest-client-nosb` | 2 vCPU, 2 GiB, OVMF without Secure Boot, e1000e NIC, 64G thin SATA disk. WinPE has in-box drivers for both, so startnet gets a network and maps the shares. |
|
||||
|
||||
NIC MACs (fixed):
|
||||
|
||||
@@ -19,6 +20,7 @@ NIC MACs (fixed):
|
||||
| server | GE | `52:54:00:9e:10:01` | `default` NAT | `corp_nic_mac` |
|
||||
| server | imaging | `52:54:00:9e:10:02` | `pxetest-imaging` | `pxe_nic_mac` |
|
||||
| client | - | `52:54:00:9e:10:03` | `pxetest-imaging` | - |
|
||||
| client-nosb | - | `52:54:00:9e:10:04` | `pxetest-imaging` | - |
|
||||
|
||||
`build-image.sh` writes `$PXETEST_CACHE/site-vars.yml` with these two
|
||||
MACs (`pxe_nic_mac`, `corp_nic_mac`) and passes it to `build-usb.sh
|
||||
@@ -40,14 +42,19 @@ IPv4 address or a non-tap bridge port.
|
||||
|
||||
export PXETEST_CACHE=~/.cache/pxetest # ISO + image (about 10 GB)
|
||||
export PXETEST_PAYLOAD_ROOT=/home/camp/projects/pxe # checkout holding offline-packages/, boot-files/, ...
|
||||
export UBUNTU_ISO_NAME=ubuntu-24.04.3-live-server-amd64.iso # optional; default 24.04.5
|
||||
|
||||
tests/vm/fetch-iso.sh # Ubuntu 24.04.5 live-server ISO, SHA256SUMS-verified
|
||||
tests/vm/fetch-iso.sh # the live-server ISO, SHA256SUMS-verified
|
||||
scripts/download-packages.sh --iso "$PXETEST_CACHE/$UBUNTU_ISO_NAME" "$PXETEST_PAYLOAD_ROOT/offline-packages"
|
||||
scripts/check-updates.py --debs "$PXETEST_PAYLOAD_ROOT/offline-packages"
|
||||
tests/vm/build-image.sh # build-usb.sh --image, upload as volume pxetest-usb.img
|
||||
tests/vm/create.sh # network, volumes, both VMs (prints the MAC pins)
|
||||
tests/vm/start.sh server # autoinstall, reboot, first-boot playbook
|
||||
tests/vm/status.sh --shot /tmp/pxetest-shots # states, leases, screenshots
|
||||
tests/vm/start.sh client # once the server playbook is done
|
||||
tests/vm/stop.sh # ACPI shutdown both, keep them defined
|
||||
tests/vm/start.sh client # once the server playbook is done (Secure Boot client)
|
||||
tests/vm/stop.sh client
|
||||
tests/vm/start.sh client2 # Secure Boot off, e1000e: WinPE maps the shares
|
||||
tests/vm/stop.sh # ACPI shutdown all, keep them defined
|
||||
tests/vm/destroy.sh # remove every pxetest-* object
|
||||
|
||||
`build-image.sh` skips enrollment/, bios-staging/, drivers-staging/ and
|
||||
@@ -62,5 +69,10 @@ to `/var/log/first-boot.log`. Once the GE NIC takes a DHCP lease on the NAT
|
||||
network, `status.sh` shows its address and `ssh pxe@<address>` works from
|
||||
the host.
|
||||
|
||||
Memory: server 4 GiB + client 2 GiB. Keep other VMs (win11) off while
|
||||
The offline package set must be built against the SAME ISO the image is
|
||||
built from (download-packages.sh resolves against that ISO's base). For a
|
||||
fresh server disk: `tests/vm/destroy.sh`, then build-image.sh, create.sh,
|
||||
start.sh server.
|
||||
|
||||
Memory: server 4 GiB + one client 2 GiB (start.sh refuses a second client). Keep other VMs (win11) off while
|
||||
both run, and stop them when done.
|
||||
|
||||
Reference in New Issue
Block a user