You are not logged in.
Pages: 1
FYI to anyone who needs USB support during rc.sysinit
I just spent most of a day trying dozens of modprobe this and modprobe that, trials and errors, with lenthy reboots in between, just to discover: It takes more than 5 seconds from a 'lshwd -a' to the time when /dev/sda* is available. :shock:
Here's some code that finally worked:
lshwd -a > /dev/null
...add as much time-consuming junk as you can, here...
# takes time for USB drive to activate
for (( i=10; $i; i=$i-1 )); do
if [ "`udevinfo -q path -n /dev/sda1 2>/dev/null | grep sda1`" ]; then
/bin/mount -t ext2 /dev/sda1 /mnt >/dev/null 2>&1
break
fi
sleep 1
# echo "Countdown: $i"
done
if [ ! -f /mnt/keyfile.gpg ]; then
echo "Ok, we probably really failed."
exit 1
fi
...do USB Drive related stuff here...
/bin/umount /mnt
/bin/umount /proc/bus/usb
# rc.sysinit later tries to mount /proc/bus/usb
As always, with USB, YMMV
Offline
Pages: 1