diff --git a/docs/changelog.md b/docs/changelog.md index 66d64b76..e819052d 100644 --- a/docs/changelog.md +++ b/docs/changelog.md @@ -17,6 +17,31 @@ roadmap as it read that day, and the *Done* entries keep the shape they had there. `check_docs.py` does not check this file, for the reason its module docstring gives: it is a record, not a claim about now. +## 2026-11-18 + +- **Every 26.04 lab guest asked the lab's DHCP server for an address while it + booted, and their runbooks now stop it.** This answers the question left + open by "`fenrir`'s capture NIC speaks while it boots", filed under + 2026-11-17: whether the `ens18` lease `fenrir`'s initramfs took happens on + every 26.04 guest built from the ISO. It does. Each guest's own journal, read + for its last four boots: + - **`alexander`** leased `.100` three times and then `.101` from the + `.100–.200` pool. + - **`odin`** leased `.101`, `.101`, `.102` and `.115` from the pool. + - **`phoenix`** was answered with `.70` every time. That is its own address, + from the reservation `build-the-jumpbox.md` §3 maps to its MAC, so it took + no pool address, but it still asked. + - **`eden`** was off and was not read. + + All three run dracut 110 with no `dracut.conf.d` file, so dracut's + catch-all `zzzz-dracut-default.network` ran DHCP on `ens18` in the + initramfs. Each lease lasted until switch-root, about seven seconds; now + each guest holds only its static address. `build-the-lab-guest.md`, + `build-the-soc-guest.md` and `build-the-jumpbox.md` §2 each now leave + networking out of the initramfs, with the drop-in `fenrir` already has. The + proof is a boot whose journal shows no DHCP before switch-root; the check + reads 2 on `alexander` today. Not yet applied on any of the three. + ## 2026-11-17 - **The wall page is live on `heimdall`.** `morpheus` has the `wall` host diff --git a/docs/runbooks/build-the-jumpbox.md b/docs/runbooks/build-the-jumpbox.md index 5ab836f3..3cf53696 100644 --- a/docs/runbooks/build-the-jumpbox.md +++ b/docs/runbooks/build-the-jumpbox.md @@ -144,6 +144,54 @@ hand. The agent grants nothing new: root on `Saruman` already holds this guest's console and disk. It is preferred to trusting `Saruman`'s key for SSH, which would open a network login into the host that holds the token. +### No network in the initramfs + +Ubuntu 26.04's initramfs is dracut's. It carries systemd-networkd and a +catch-all, `zzzz-dracut-default.network`, that runs DHCP on every interface, +so `ens18` asks the lab's DHCP server for an address before netplan's static +`10.0.30.70` applies. On `phoenix` that request is answered with `.70` itself, because §3's reservation maps its MAC there, so it has taken no pool address. It still asks, every boot, and it would take one the day the reservation drifts. The address is dropped at switch-root, +seconds later, but the request has crossed the segment with the guest's MAC +and, as `fenrir`'s capture showed for its own, its hostname. The root disk is +local, so the initramfs needs no network at all. Leave it out, as `fenrir` +does ([`build-the-sensor-guest.md`](build-the-sensor-guest.md) §3) and as +dracut's own `no-network` profile does: + +```bash +sudo tee /etc/dracut.conf.d/10-homelab-no-network.conf >/dev/null <<'CONF' +# phoenix: no networking in the initramfs (build-the-jumpbox.md §2). +# The root disk is local. With systemd-networkd in the image, its catch-all +# DHCPs ens18 before netplan's static address applies. +# Same line as dracut's own dracut.conf.d/no-network profile. +omit_dracutmodules+=" net-lib systemd-networkd " +CONF +ls /var/run/reboot-required 2>/dev/null && echo 'reboot first' +k="$(uname -r)" +sudo cp -p "/boot/initrd.img-$k" "/boot/initrd.img-$k.pre-no-network" +sudo update-initramfs -u -k "$k" +sudo lsinitrd -m "/boot/initrd.img-$k" | grep -E 'net-lib|systemd-networkd' # nothing +``` + +If `reboot first` prints, the running kernel may not be the one the next boot +uses. Reboot, then run the last four lines, so that the image rebuilt and +checked is the one the next boot uses. On 26.04, `update-initramfs` is +dracut's wrapper, and every later kernel is built with the file in place. + +The copy is the way back. If the new image does not boot, open VM 170's +console in the Proxmox web UI (*Saruman → 170 → Console*). Reset the VM and +hold Esc to show GRUB's menu, which Ubuntu hides by default. Press `e` on the +first entry, add `.pre-no-network` to the end of the file name on the `initrd` +line, and boot with Ctrl-X. Then remove the dracut file and run +`sudo update-initramfs -u -k "$(uname -r)"` again. + +Reboot, and check that nothing before switch-root asked for an address: + +```bash +sudo journalctl -b -o short-iso | awk '/Switching root/{exit} {print}' | grep -cE 'DHCPv4|zzzz-dracut-default' # 0 +ip -4 -o addr show ens18 | awk '{print $4}' # 10.0.30.70/24 +``` + +Then delete the copy. + ## 3. The reservation on `morpheus` Read the guest's MAC from the hypervisor: diff --git a/docs/runbooks/build-the-lab-guest.md b/docs/runbooks/build-the-lab-guest.md index 1c2363a1..52e67cef 100644 --- a/docs/runbooks/build-the-lab-guest.md +++ b/docs/runbooks/build-the-lab-guest.md @@ -238,6 +238,54 @@ The first must fail with `Permission denied (publickey)`, and the second must succeed. Run the second from `phoenix` too: it must succeed there without a password prompt. +### No network in the initramfs + +Ubuntu 26.04's initramfs is dracut's. It carries systemd-networkd and a +catch-all, `zzzz-dracut-default.network`, that runs DHCP on every interface, +so `ens18` asks the lab's DHCP server for an address before netplan's static +`10.0.30.40` applies. On `alexander`'s four boots before 2026-11-18 that was a lease from the pool, `.100` three times and then `.101`, read from its own journal. The address is dropped at switch-root, +seconds later, but the request has crossed the segment with the guest's MAC +and, as `fenrir`'s capture showed for its own, its hostname. The root disk is +local, so the initramfs needs no network at all. Leave it out, as `fenrir` +does ([`build-the-sensor-guest.md`](build-the-sensor-guest.md) §3) and as +dracut's own `no-network` profile does: + +```bash +sudo tee /etc/dracut.conf.d/10-homelab-no-network.conf >/dev/null <<'CONF' +# alexander: no networking in the initramfs (build-the-lab-guest.md §2). +# The root disk is local. With systemd-networkd in the image, its catch-all +# DHCPs ens18 before netplan's static address applies. +# Same line as dracut's own dracut.conf.d/no-network profile. +omit_dracutmodules+=" net-lib systemd-networkd " +CONF +ls /var/run/reboot-required 2>/dev/null && echo 'reboot first' +k="$(uname -r)" +sudo cp -p "/boot/initrd.img-$k" "/boot/initrd.img-$k.pre-no-network" +sudo update-initramfs -u -k "$k" +sudo lsinitrd -m "/boot/initrd.img-$k" | grep -E 'net-lib|systemd-networkd' # nothing +``` + +If `reboot first` prints, the running kernel may not be the one the next boot +uses. Reboot, then run the last four lines, so that the image rebuilt and +checked is the one the next boot uses. On 26.04, `update-initramfs` is +dracut's wrapper, and every later kernel is built with the file in place. + +The copy is the way back. If the new image does not boot, open VM 140's +console in the Proxmox web UI (*Saruman → 140 → Console*). Reset the VM and +hold Esc to show GRUB's menu, which Ubuntu hides by default. Press `e` on the +first entry, add `.pre-no-network` to the end of the file name on the `initrd` +line, and boot with Ctrl-X. Then remove the dracut file and run +`sudo update-initramfs -u -k "$(uname -r)"` again. + +Reboot, and check that nothing before switch-root asked for an address: + +```bash +sudo journalctl -b -o short-iso | awk '/Switching root/{exit} {print}' | grep -cE 'DHCPv4|zzzz-dracut-default' # 0 +ip -4 -o addr show ens18 | awk '{print $4}' # 10.0.30.40/24 +``` + +Then delete the copy. + ## 3. Docker, the agent, and the repository ```bash diff --git a/docs/runbooks/build-the-soc-guest.md b/docs/runbooks/build-the-soc-guest.md index 43767790..a0851211 100644 --- a/docs/runbooks/build-the-soc-guest.md +++ b/docs/runbooks/build-the-soc-guest.md @@ -225,6 +225,54 @@ The last two are vulnerability detection's two halves, both on the data disk persist. `df` must show about 94G on `/dev/sdb1`. A reboot now, and `df -h /srv/soc-data` after it, proves the `fstab` line before any data depends on it. +### No network in the initramfs + +Ubuntu 26.04's initramfs is dracut's. It carries systemd-networkd and a +catch-all, `zzzz-dracut-default.network`, that runs DHCP on every interface, +so `ens18` asks the lab's DHCP server for an address before netplan's static +`10.0.30.60` applies. On `odin`'s four boots before 2026-11-18 that was a lease from the pool, `.101`, `.101`, `.102` and `.115`, read from its own journal. The address is dropped at switch-root, +seconds later, but the request has crossed the segment with the guest's MAC +and, as `fenrir`'s capture showed for its own, its hostname. The root disk is +local, so the initramfs needs no network at all. Leave it out, as `fenrir` +does ([`build-the-sensor-guest.md`](build-the-sensor-guest.md) §3) and as +dracut's own `no-network` profile does: + +```bash +sudo tee /etc/dracut.conf.d/10-homelab-no-network.conf >/dev/null <<'CONF' +# odin: no networking in the initramfs (build-the-soc-guest.md §2). +# The root disk is local. With systemd-networkd in the image, its catch-all +# DHCPs ens18 before netplan's static address applies. +# Same line as dracut's own dracut.conf.d/no-network profile. +omit_dracutmodules+=" net-lib systemd-networkd " +CONF +ls /var/run/reboot-required 2>/dev/null && echo 'reboot first' +k="$(uname -r)" +sudo cp -p "/boot/initrd.img-$k" "/boot/initrd.img-$k.pre-no-network" +sudo update-initramfs -u -k "$k" +sudo lsinitrd -m "/boot/initrd.img-$k" | grep -E 'net-lib|systemd-networkd' # nothing +``` + +If `reboot first` prints, the running kernel may not be the one the next boot +uses. Reboot, then run the last four lines, so that the image rebuilt and +checked is the one the next boot uses. On 26.04, `update-initramfs` is +dracut's wrapper, and every later kernel is built with the file in place. + +The copy is the way back. If the new image does not boot, open VM 160's +console in the Proxmox web UI (*Saruman → 160 → Console*). Reset the VM and +hold Esc to show GRUB's menu, which Ubuntu hides by default. Press `e` on the +first entry, add `.pre-no-network` to the end of the file name on the `initrd` +line, and boot with Ctrl-X. Then remove the dracut file and run +`sudo update-initramfs -u -k "$(uname -r)"` again. + +Reboot, and check that nothing before switch-root asked for an address: + +```bash +sudo journalctl -b -o short-iso | awk '/Switching root/{exit} {print}' | grep -cE 'DHCPv4|zzzz-dracut-default' # 0 +ip -4 -o addr show ens18 | awk '{print $4}' # 10.0.30.60/24 +``` + +Then delete the copy. + ## 3. Docker, sops, age, and the repository Identical to `alexander`'s §3 — the Docker repository, `git clone` into