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.
This commit is contained in:
@@ -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
|
# 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).
|
# deps from /lib/modules/$KVER/modules.dep (built by prepare-boot-tools).
|
||||||
# Anything missing is silently ignored; whatever matches PCI IDs will bind.
|
# 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 \
|
for drv in \
|
||||||
|
xhci_pci xhci_pci_renesas \
|
||||||
mii libphy ptp \
|
mii libphy ptp \
|
||||||
e1000 e1000e igb igc ixgbe ixgbevf i40e ice iavf \
|
e1000 e1000e igb igc ixgbe ixgbevf i40e ice iavf \
|
||||||
tg3 bnx2 bnx2x bnxt_en b44 \
|
tg3 bnx2 bnx2x bnxt_en b44 \
|
||||||
@@ -91,6 +95,8 @@ for i in $(seq 1 30); do
|
|||||||
for n in /sys/class/net/*; do
|
for n in /sys/class/net/*; do
|
||||||
name="${n##*/}"
|
name="${n##*/}"
|
||||||
case "$name" in lo|wl*) continue ;; esac
|
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
|
[ "$(cat "$n/carrier" 2>/dev/null)" = "1" ] && CARRIER="$name" && break 2
|
||||||
done
|
done
|
||||||
sleep 1
|
sleep 1
|
||||||
@@ -100,8 +106,11 @@ echo ""
|
|||||||
if [ -z "$CARRIER" ]; then
|
if [ -z "$CARRIER" ]; then
|
||||||
echo "ERROR: no wired interface has link. Interfaces seen:"
|
echo "ERROR: no wired interface has link. Interfaces seen:"
|
||||||
for n in /sys/class/net/*; do
|
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
|
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."
|
echo "Check the cable, then type 'exit' to reboot."
|
||||||
exec /bin/sh
|
exec /bin/sh
|
||||||
fi
|
fi
|
||||||
|
|||||||
Reference in New Issue
Block a user