Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bugfix VentoyWorker.sh - mount detection false-positive #2625

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

folfy
Copy link

@folfy folfy commented Oct 22, 2023

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

@ventoy
Copy link
Owner

ventoy commented May 19, 2024

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

@folfy
Copy link
Author

folfy commented Dec 16, 2024

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>).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants