2020-09-10 01:20:15 +00:00
|
|
|
diff --git a/initrd/bin/gui-init b/initrd/bin/gui-init
|
2020-10-22 05:59:10 +00:00
|
|
|
index 38953ca..1740da6 100755
|
2020-09-10 01:20:15 +00:00
|
|
|
--- a/initrd/bin/gui-init
|
|
|
|
+++ b/initrd/bin/gui-init
|
|
|
|
@@ -13,6 +13,11 @@ mount_boot()
|
|
|
|
|
|
|
|
# Mount local disk if it is not already mounted
|
|
|
|
while ! grep -q /boot /proc/mounts ; do
|
2020-08-13 05:25:41 +00:00
|
|
|
+
|
2020-10-22 05:59:10 +00:00
|
|
|
+ if [ "$CONFIG_BOOT_USB" = "y" ]; then
|
|
|
|
+ enable_usb
|
|
|
|
+ fi
|
2020-09-10 01:20:15 +00:00
|
|
|
+
|
2020-10-22 05:59:10 +00:00
|
|
|
# try to mount if CONFIG_BOOT_DEV exists
|
|
|
|
if [ -e "$CONFIG_BOOT_DEV" ]; then
|
|
|
|
mount -o ro $CONFIG_BOOT_DEV /boot
|
2020-09-10 01:20:15 +00:00
|
|
|
diff --git a/initrd/bin/mount-usb b/initrd/bin/mount-usb
|
2020-10-22 05:59:10 +00:00
|
|
|
index 501171a..2196bbd 100755
|
2020-09-10 01:20:15 +00:00
|
|
|
--- a/initrd/bin/mount-usb
|
|
|
|
+++ b/initrd/bin/mount-usb
|
|
|
|
@@ -4,19 +4,6 @@
|
|
|
|
|
|
|
|
enable_usb
|
|
|
|
|
|
|
|
-if ! lsmod | grep -q usb_storage; then
|
|
|
|
- count=$(ls /dev/sd* 2>/dev/null | wc -l)
|
|
|
|
- timeout=0
|
|
|
|
- echo "Scanning for USB storage devices..."
|
|
|
|
- insmod /lib/modules/usb-storage.ko >/dev/null 2>&1 \
|
|
|
|
- || die "usb_storage: module load failed"
|
|
|
|
- while [[ $count == $(ls /dev/sd* 2>/dev/null | wc -l) ]]; do
|
|
|
|
- [[ $timeout -ge 4 ]] && break
|
|
|
|
- sleep 1
|
|
|
|
- timeout=$(($timeout+1))
|
|
|
|
- done
|
|
|
|
-fi
|
|
|
|
-
|
|
|
|
if [ ! -d /media ]; then
|
|
|
|
mkdir /media
|
2020-08-13 05:25:41 +00:00
|
|
|
fi
|
2020-09-10 01:20:15 +00:00
|
|
|
diff --git a/initrd/bin/usb-scan b/initrd/bin/usb-scan
|
2020-10-22 05:59:10 +00:00
|
|
|
index d9f26b0..330d672 100755
|
2020-09-10 01:20:15 +00:00
|
|
|
--- a/initrd/bin/usb-scan
|
|
|
|
+++ b/initrd/bin/usb-scan
|
2020-10-22 05:59:10 +00:00
|
|
|
@@ -5,12 +5,6 @@ set -e -o pipefail
|
|
|
|
. /etc/gui_functions
|
2020-09-10 01:20:15 +00:00
|
|
|
. /tmp/config
|
|
|
|
|
|
|
|
-# Unmount any previous boot device
|
|
|
|
-if grep -q /boot /proc/mounts ; then
|
|
|
|
- umount /boot \
|
|
|
|
- || die "Unable to unmount /boot"
|
|
|
|
-fi
|
|
|
|
-
|
|
|
|
# Mount the USB boot device
|
2020-10-22 05:59:10 +00:00
|
|
|
mount_usb || die "Unable to mount /media"
|
|
|
|
|
2020-09-10 01:20:15 +00:00
|
|
|
diff --git a/initrd/etc/functions b/initrd/etc/functions
|
2020-10-22 05:59:10 +00:00
|
|
|
index dc0fbed..00afcdb 100755
|
2020-09-10 01:20:15 +00:00
|
|
|
--- a/initrd/etc/functions
|
|
|
|
+++ b/initrd/etc/functions
|
2020-10-22 05:59:10 +00:00
|
|
|
@@ -122,6 +122,18 @@ enable_usb()
|
2020-09-10 01:20:15 +00:00
|
|
|
|| die "xhci_pci: module load failed"
|
|
|
|
sleep 2
|
|
|
|
fi
|
|
|
|
+ if ! lsmod | grep -q usb_storage; then
|
|
|
|
+ count=$(ls /dev/sd* 2>/dev/null | wc -l)
|
|
|
|
+ timeout=0
|
|
|
|
+ echo "Scanning for USB storage devices..."
|
|
|
|
+ insmod /lib/modules/usb-storage.ko >/dev/null 2>&1 \
|
|
|
|
+ || die "usb_storage: module load failed"
|
|
|
|
+ while [[ $count == $(ls /dev/sd* 2>/dev/null | wc -l) ]]; do
|
|
|
|
+ [[ $timeout -ge 4 ]] && break
|
|
|
|
+ sleep 1
|
|
|
|
+ timeout=$(($timeout+1))
|
|
|
|
+ done
|
|
|
|
+ fi
|
|
|
|
}
|
|
|
|
|
|
|
|
confirm_gpg_card()
|