summaryrefslogtreecommitdiff
path: root/initramfs-init
diff options
context:
space:
mode:
authorNatanael Copa <ncopa@alpinelinux.org>2009-03-13 18:27:35 +0000
committerNatanael Copa <ncopa@alpinelinux.org>2009-03-13 18:27:35 +0000
commit311fd299f68ce07503e77066291cb107e6c465b3 (patch)
tree879de13de1a2e6c6ca5fccf55d95ce6c6a7501c4 /initramfs-init
parent874e4379d298b7b2ba9b2659dd627aaab0b9ded7 (diff)
downloadabuild-311fd299f68ce07503e77066291cb107e6c465b3.tar.gz
abuild-311fd299f68ce07503e77066291cb107e6c465b3.tar.bz2
abuild-311fd299f68ce07503e77066291cb107e6c465b3.tar.xz
abuild-311fd299f68ce07503e77066291cb107e6c465b3.zip
add support to boot from usb
Diffstat (limited to 'initramfs-init')
-rwxr-xr-xinitramfs-init8
1 files changed, 7 insertions, 1 deletions
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