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

Will not write to devices with names ending in a digit (e.g. loop or nvme devices) #131

Open
martijnf1 opened this issue Jan 9, 2025 · 1 comment

Comments

@martijnf1
Copy link

Pretty silly issue. Because loop devices -- which ARE block devices -- end in a digit (e.g. /dev/loop0), this line prevents the program from writing to them because WoeUSB assumes the /dev/sdX naming convention for removable drives, and /dev/sdXN (where N is a number) for partitions. The same goes for nvme drives, which have a naming convention that that will make them end in a digit.

if install_mode == "device" and target_media[-1].isdigit():

A more robust method of checking whether a file is a partition or a disk needs to be implemented to solve this. I'll look into this later. Just mentioning it here for documentation, in case i abandon this for whatever reason.

@martijnf1
Copy link
Author

The code progresses further by removing the check, but it gets worse: partition 'detection' is also done by concatenation. This means that, for example, the partition naming schemes for loop0p1 and nvme0n1p1 break as well.

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

No branches or pull requests

1 participant