From 311fd299f68ce07503e77066291cb107e6c465b3 Mon Sep 17 00:00:00 2001 From: Natanael Copa Date: Fri, 13 Mar 2009 18:27:35 +0000 Subject: add support to boot from usb --- initramfs-init | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'initramfs-init') diff --git a/initramfs-init b/initramfs-init index b427de3..b0a8a75 100755 --- a/initramfs-init +++ b/initramfs-init @@ -133,8 +133,14 @@ mkdir -p $ALPINE_MNT if [ -n "$ALPINE_DEV_FS" ]; then mount_opts="-t $ALPINE_DEV_FS" fi -mount $mount_opts /dev/$ALPINE_DEV $ALPINE_MNT >/dev/null 2>&1 + +# usb might need some time to settle so we retry a few times +for i in $(seq 0 19); do + mount $mount_opts /dev/$ALPINE_DEV $ALPINE_MNT >/dev/null 2>&1 && break + sleep 1 +done eend $? + ebegin "Mounting loopback device for kernel modules" modprobe loop if [ -n "$KOPT_modloop" ]; then -- cgit v1.2.3-60-g2f50