Ventoy icon indicating copy to clipboard operation
Ventoy copied to clipboard

Bugfix VentoyWorker.sh - mount detection false-positive

Open folfy opened this issue 2 years ago • 1 comments

Need to match whole word, or e.g. /dev/loop12 would match, when trying to install to /dev/loop1

folfy avatar Oct 22 '23 22:10 folfy

For /dev/sda, if /dev/sda1 is mounted, we should check it.

ventoy avatar May 19 '24 08:05 ventoy

I see your intention now. There will be a lot of edge-cases to consider in order to do this properly then - For example, besides loop-devices, nvme has completely different naming conventions (pX for partitions), and there might be mounts through device-mapper (LVM or LUKS), that aren't even checked rn.

How about using lsblk -no MOUNTPOINTS "$DISK" | xargs instead? It should give us a list of all the actual active mountpoints on the particular block device, which could also be directly forwarded to the user for information (i.e. <DISK> is mounted on: <mountpoints>).

folfy avatar Dec 16 '24 14:12 folfy