From 4c68a325341f72eeb4b1f2715284de9fa29e1211 Mon Sep 17 00:00:00 2001 From: Jacob Blain Christen Date: Wed, 29 Jul 2020 11:58:11 -0700 Subject: [PATCH] mount from bare usb device if mount fails If mounting the discovered USB device fails during install, try again mounting the bare device, i.e. /dev/sdb3 -> /dev/sdb. --- install.sh | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/install.sh b/install.sh index c99d84f9..ffb08364 100755 --- a/install.sh +++ b/install.sh @@ -30,7 +30,7 @@ cleanup2() umount ${TARGET} || true fi - losetup -d ${ISO_DEVICE} || true + losetup -d ${ISO_DEVICE} || losetup -d ${ISO_DEVICE%?} || true umount $DISTRO || true } @@ -116,8 +116,8 @@ do_mount() mount ${BOOT} ${TARGET}/boot/efi fi - mkdir -p $DISTRO - mount -o ro $ISO_DEVICE $DISTRO + mkdir -p ${DISTRO} + mount -o ro ${ISO_DEVICE} ${DISTRO} || mount -o ro ${ISO_DEVICE%?} ${DISTRO} } do_copy()