Open ekristen opened 5 years ago
I may try this way.
#cloud-config
write_files:
- path: /etc/rc.local
permissions: "0755"
owner: root
content: |
#!/bin/bash
stamp=/var/lib/rancher/.kernel-extras-init
if [ ! -f $stamp ]; then
# wait-for-network
for _ in {1..20}; do
gateway=$(cat /proc/net/route | grep 0003 | wc -l)
if [[ $gateway -ge 1 ]]; then
echo "network is ready."
break
fi
sleep 1
done
# ros config
ros s enable kernel-extras
ros s up kernel-extras
ros c set rancher.modules "['ftdi_sio', 'usbserial']"
modprobe ftdi_sio
modprobe usbserial
touch $stamp
fi
RancherOS Version: (ros os version) 1.5.2
Where are you running RancherOS? (docker-machine, AWS, GCE, baremetal, etc.) baremetal
I'm doing strictly PXE boot using an eMMC module for state storage.
It seems on a clean and fresh install that the kernel-extras gets loaded super late, like just before the login prompt is shown, so on first clean boot the ftdi_sio and usbserial modules do not get loaded into the kernel, or they get loaded way late after all USB devices are already detected.
Is there any way to get this loaded earlier?
It seems on subsequent boots that since the kernel-extras is already on the state drive the modules get loaded before USB detection and I see my
ttyACM
andttyUSB
devices.