Skip to content
This repository has been archived by the owner on Dec 8, 2023. It is now read-only.

Commit

Permalink
mount from bare usb device if mount fails
Browse files Browse the repository at this point in the history
If mounting the discovered USB device fails during install, try again mounting the bare device, i.e. /dev/sdb3 -> /dev/sdb.
  • Loading branch information
dweomer committed Jul 29, 2020
1 parent 1688b71 commit 4c68a32
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
}

Expand Down Expand Up @@ -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()
Expand Down

0 comments on commit 4c68a32

Please sign in to comment.