Commit 311fd299 authored by Natanael Copa's avatar Natanael Copa

add support to boot from usb

parent 874e4379
......@@ -249,7 +249,7 @@ $(SYSLINUX_CFG):
@echo "default $(KERNEL_NAME)" >>$@
@echo "label $(KERNEL_NAME)" >>$@
@echo " kernel /boot/$(KERNEL_NAME)" >>$@
@echo " append initrd=/boot/$(KERNEL_NAME).gz alpine_dev=sda1:vfat quiet" >>$@
@echo " append initrd=/boot/$(KERNEL_NAME).gz alpine_dev=sda1:vfat modules=usb-storage,sd-mod quiet" >>$@
ISO_KERNEL := $(ISO_DIR)/boot/$(KERNEL_NAME)
ISO_PKGDIR := $(ISO_DIR)/packages
......
......@@ -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
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment