From 25f65424c75f6dfe5782c3014d27e3a620c2588c Mon Sep 17 00:00:00 2001 From: cproudlock Date: Mon, 5 Oct 2026 11:48:17 -0400 Subject: [PATCH] blancco-init: load xhci_pci so USB-C NICs work, report why a link fails The initrd has no udev, so only modules init names get loaded, and xhci_pci is a module in the Ubuntu kernel. USB 3 / USB-C ports were therefore dead in the UEFI Blancco path and a Dell USB-C to RJ45 adapter never appeared; init took the onboard e1000e port with no cable. - modprobe xhci_pci and xhci_pci_renesas before the NIC drivers - bring up interfaces inside the carrier wait too, since USB NICs enumerate seconds after onboard ports - on no-link, print each interface's driver and the NIC/firmware/link kernel messages before dropping to a shell Live kexec-initrd.img also now carries the NIC firmware set from the Blancco 7.20 early cpio (rtl_nic, tigon, bnx2x, ...) under /lib/firmware. The playbook build does not add it yet. --- playbook/blancco-init.sh | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/playbook/blancco-init.sh b/playbook/blancco-init.sh index ec0f505..42caba7 100644 --- a/playbook/blancco-init.sh +++ b/playbook/blancco-init.sh @@ -35,7 +35,11 @@ echo "[1/5] Loading NIC drivers via modprobe (resolves deps automatically)..." # Throw the full common-NIC driver list at the wall. modprobe resolves the # deps from /lib/modules/$KVER/modules.dep (built by prepare-boot-tools). # Anything missing is silently ignored; whatever matches PCI IDs will bind. +# USB host controllers first: xhci_pci is a module in the Ubuntu kernel +# (CONFIG_USB_XHCI_PCI=m) and there is no udev here, so without this no +# USB 3 / USB-C port works and USB-C to RJ45 adapters never appear. for drv in \ + xhci_pci xhci_pci_renesas \ mii libphy ptp \ e1000 e1000e igb igc ixgbe ixgbevf i40e ice iavf \ tg3 bnx2 bnx2x bnxt_en b44 \ @@ -91,6 +95,8 @@ for i in $(seq 1 30); do for n in /sys/class/net/*; do name="${n##*/}" case "$name" in lo|wl*) continue ;; esac + # USB NICs enumerate seconds after onboard ports: bring up late ones too + [ "$(cat "$n/operstate" 2>/dev/null)" = "down" ] && { ip link set "$name" up 2>/dev/null || ifconfig "$name" up 2>/dev/null || true; } [ "$(cat "$n/carrier" 2>/dev/null)" = "1" ] && CARRIER="$name" && break 2 done sleep 1 @@ -100,8 +106,11 @@ echo "" if [ -z "$CARRIER" ]; then echo "ERROR: no wired interface has link. Interfaces seen:" for n in /sys/class/net/*; do - echo " ${n##*/} carrier=$(cat "$n/carrier" 2>/dev/null)" + drv=$(readlink "$n/device/driver" 2>/dev/null) + echo " ${n##*/} carrier=$(cat "$n/carrier" 2>/dev/null) driver=${drv##*/}" done + echo "=== kernel messages (NIC / firmware / link) ===" + dmesg | grep -i -E 'eth|enp|enx|r8152|r8169|e1000e|igc|cdc|firmware|link' | tail -20 echo "Check the cable, then type 'exit' to reboot." exec /bin/sh fi