From 0b5be6858672eb57bf43e5d6532e01a112bd70e6 Mon Sep 17 00:00:00 2001 From: Jarrod Johnson Date: Tue, 29 Apr 2025 09:53:58 -0400 Subject: [PATCH] Give media bootstrap more of a chance in genesis If the USB is slow to enumerate, keep trying during the network scan to let the USB have a chance to interject if the network is unwilling. --- .../initramfs/opt/confluent/bin/rungenesis | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/confluent_osdeploy/genesis/initramfs/opt/confluent/bin/rungenesis b/confluent_osdeploy/genesis/initramfs/opt/confluent/bin/rungenesis index 362617ac..4d9a92ad 100644 --- a/confluent_osdeploy/genesis/initramfs/opt/confluent/bin/rungenesis +++ b/confluent_osdeploy/genesis/initramfs/opt/confluent/bin/rungenesis @@ -79,6 +79,24 @@ fi cd /sys/class/net echo -n "Scanning for network configuration..." while ! grep ^EXTMGRINFO: /etc/confluent/confluent.info | awk -F'|' '{print $3}' | grep 1 >& /dev/null && [ "$TRIES" -lt 30 ]; do + if [ -e /dev/disk/by-label/CNFLNT_IDNT ]; then + echo "" + echo "Media bootstrap detected, switching to media based boot" + mkdir -p /media/ident + mount /dev/disk/by-label/CNFLNT_IDNT /media/ident + if [ -e /media/ident/genesis_bootstrap.sh ]; then + exec bash /media/ident/genesis_bootstrap.sh + fi + fi + if [ -e /dev/disk/by-label/GENESIS-X86 ]; then + echo "" + echo "Media bootstrap detected, switching to media based boot" + mkdir -p /media/genesis + mount /dev/disk/by-label/GENESIS-X86 /media/genesis + if [ -e /media/genesis/genesis_bootstrap.sh ]; then + exec bash /media/genesis/genesis_bootstrap.sh + fi + fi TRIES=$((TRIES + 1)) for i in *; do ip link set $i up