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

[issue]: Provide opaque and stable identifier for partition with boot images #3116

Open
1 task done
youk opened this issue Feb 13, 2025 · 2 comments
Open
1 task done

Comments

@youk
Copy link

youk commented Feb 13, 2025

Official FAQ

  • I have checked the official FAQ.

Ventoy Version

1.1.02

What about latest release

Yes. I have tried the latest release, but the bug still exist.

Try alternative boot mode

Yes. I have tried them, but the bug still exist.

BIOS Mode

UEFI Mode

Partition Style

GPT

Disk Capacity

64GB

Disk Manufacturer

No response

Image file checksum (if applicable)

None

Image file download link (if applicable)

No response

What happened?

New Linux Remount Feature makes partitions on USB device accessible via alternative locations (/dev/mapper/xxx). Unfortunately, it relies solely on partition names (i.e. /dev/sda1 will be accessible as /dev/mapper/sda1). Such a naming scheme is inflexible. As partition names in Linux are assigned dynamically, the name can be different depending on where USB device is plugged in. Compare this with having well-known and stable identifier. For example, on many modern Linux systems partitions are accessible under /dev/disk/by-label by their label. Should one have some automation script that reads from USB, it won't have to care about the partition name (which is unknown in advance).

VTOY_LINUX_REMOUNT worked transparently and one shouldn't know the partition name. Now that it doesn't work, one have to either manually remove devices mapped by Ventoy (i.e. dmsetup remove ventoy; dmsetup remove sda1) or use hardcoded partition name (/dev/mapper/sda1). Please consider providing a location which doesn't depend on the partition name (ideally, based on the partition label).

BTW, I don't find the name "Linux Remount Feature" especially good. It is confusing and doesn't reflect what is actually happening under the hood. It really should be something like "Partition Mapping/Remapping" or even "Partition Aliasing".

@ventoy
Copy link
Owner

ventoy commented Feb 13, 2025

There should have exist link in /dev/disk/by-label which point to the original /dev/XXX, so we can not use /dev/disk/by-label

#3113 also mentioned this point, in the future release, maybe I can add another map device with a unique name, for eample /dev/mapper/ventoy_iso_part

Assume Ventoy device is /dev/sdb, then user can use any of the follows:

/dev/mapper/sdb1
/dev/mapper/ventoy_iso_part
/dev/dm-1

@youk
Copy link
Author

youk commented Feb 13, 2025

There should have exist link in /dev/disk/by-label which point to the original /dev/XXX, so we can not use /dev/disk/by-label

This is understandable.

Didn't you think about adopting the existing naming scheme in Linux, e.g. /dev/mapper/ventoy/by-label for exposing partitions by label? It is hierarchical and future-proof. The naming is familiar to users too.

Thank you.

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

2 participants