X-Git-Url: http://git.grml.org/?a=blobdiff_plain;f=scripts%2Flive;h=797f5df6fcea6ee082a482df9b70daa15a78fae4;hb=a242992a320b66e152fb1ba1705f9d8a9bf0313b;hp=7632fc896b59cc4acd5be3197d8d89724b367121;hpb=924d99d21049feb1213e1816d4345364bfb0900c;p=live-boot-grml.git diff --git a/scripts/live b/scripts/live index 7632fc8..797f5df 100755 --- a/scripts/live +++ b/scripts/live @@ -994,6 +994,30 @@ setup_unionfs () # Looking for "${root_persistence}" device or file if [ -n "${PERSISTENT}" ] && [ -z "${NOPERSISTENT}" ] then + # Load USB modules + num_block=$(ls -l /sys/block | wc -l) + for module in sd_mod uhci-hcd ehci-hcd ohci-hcd usb-storage + do + modprobe -q -b ${module} + done + + udevtrigger + udevsettle + + # For some reason, udevsettle does not block in this scenario, + # so we sleep for a little while. + # + # See https://bugs.launchpad.net/ubuntu/+source/casper/+bug/84591 + for timeout in 5 4 3 2 1 + do + sleep 1 + + if [ $(ls -l /sys/block | wc -l) -gt ${num_block} ] + then + break + fi + done + cowprobe=$(find_cow_device "${root_persistence}") if [ -b "${cowprobe}" ]