File tree Expand file tree Collapse file tree 2 files changed +14
-3
lines changed
Expand file tree Collapse file tree 2 files changed +14
-3
lines changed Original file line number Diff line number Diff line change @@ -11,8 +11,19 @@ if grep -q /boot /proc/mounts ; then
1111 || die " Unable to unmount /boot"
1212fi
1313
14- # Mount the USB boot device
15- mount_usb || die " Unable to mount /media"
14+ available_partitions=" $( blkid | while read line; do echo $line | awk -F " :" {' print $1' }; done ) "
15+
16+ if [ " $1 " == " usb" ]; then
17+ # Mount the USB boot device
18+ mount_usb || die " Unable to mount /media"
19+ elif $( echo $available_partitions | grep -q " $1 " ) ; then
20+ if grep -q /media /proc/mounts; then
21+ umount /media \
22+ || die " Unable to unmount /media"
23+ fi
24+ mount " $1 " /media \
25+ || die " Unable to mount $1 to /media"
26+ fi
1627
1728# Get USB boot device
1829USB_BOOT_DEV=$( grep " /media" /etc/mtab | cut -f 1 -d' ' )
Original file line number Diff line number Diff line change @@ -9,5 +9,5 @@ if [ "$CONFIG_TPM" = "y" ]; then
99 tpm extend -ix 4 -ic usb
1010fi
1111
12- usb -scan
12+ media -scan usb
1313recovery " Something failed during USB boot"
You can’t perform that action at this time.
0 commit comments