Ventoy
Ventoy copied to clipboard
[issue]: Prevent VTOYEFI partition from being auto-mounted
Official FAQ
- [X] I have checked the official FAQ.
Ventoy Version
1.0.74
What about latest release
Yes. I have tried the latest release, but the bug still exist.
BIOS Mode
Both
Partition Style
GPT
Disk Capacity
32GB
Disk Manufacturer
SanDisk
Image file checksum (if applicable)
Yes.
Image file download link (if applicable)
https://www.microsoft.com/en-us/software-download/windows10ISO
What happened?
After installing Ventoy on my USB stick, whenever I plug the USB stick into a computer, both Ventoy and VTOYEFI partitions are automatically mounted. This happens on both Linux and Windows. And as far as I know, this behavior is present in older versions as well, not just 1.0.74.
While not a critical issue, the VTOYEFI partition being auto-mounted is an annoyance. Ideally, only the Ventoy partition auto-mounted, while the VTOYEFI partition is kept hidden. I have never needed to use the VTOYEFI partition anyway. This would also prevent people from accidentally copying files into this partition.
Right now, there is a solution for this: change the partition type to "Windows recovery environment". We can use fdisk
and set the VTOYEFI partition type to 14
. After this change, the partition is not auto-mounted anymore, both on Linux and Windows.
I have tried other partition types, but some will just make Windows 10 unable to install ("Windows could not prepare the computer to boot into the next phase of installation.")
I have made a blog post about this: https://wpyoga.github.io/blog/2022/05/10/hiding-ventoy-second-partition
Questions:
- Are there any concerns over using this method to disable auto-mounting the VTOYEFI partition?
- This seems somewhat trivial to implement -- please let me know if it's okay, and I will submit a patch.
Thank you for making this useful tool.
For MBR
partition style the VTOYEFI
partition type should be 0xEF
0xEF
is a standard EFI System Partition type according to UEFI specification.
If change the type to 14
then some computer may refuse to boot it in UEFI mode.
@ventoy Thank you for the information about MBR
partition style.
However, I am using GPT
, and booting in UEFI mode (CSM disabled). By setting the VTOYEFI partition type to Windows Recovery Environment
, I have been able to achieve the goal of:
- booting normally, and
- avoiding auto-mounting of the drive, both on Linux and on Windows
I have tested the above on ThinkPad T450s, ThinkPad T14, ASUS Maximus VIII Hero, Huananzhi X99-T8. Please let me know if I should do more tests, and probably other ISO images that I should test?
For GPT
partition style, the VOYEFI partition has an part attribute 0xC000000000000000
and should be hidden by default.
- Did you make a fresh install of 1.0.74 ?
- Which Windows version or Linux distro did you plug the USB stick?
Ah, I see. So it should have been hidden.
-
I don't remember whether it was a fresh install. I will check and report back.
-
I plugged the USB stick into Windows 10, Linux Mint 20.2 & 20.3 both XFCE and MATE editions, and Ubuntu 22.04.
Regarding the partition attribute, how do we check it?
I have made a fresh install using Ventoy 1.0.74, and both Ventoy adn VTOYEFI partitions are shown. The command used was sudo ./Ventoy2Disk.sh -i -g /dev/sdb -I
, this means it's a fresh install right?
After unplugging and plugging in the USB stick, I get these two entries (on Linux Mint 20.3 XFCE)
What's interesting is, the VTOYEFI icon looks normal, but the Ventoy icon looks grayed out a bit, like it's a hidden file. However, both partitions are automatically mounted upon USB insertion.
This is what fdisk
shows:
What you said about the partition attribute is true, the hidden attribute is set
I have tried installing Ventoy on 2 other USB disks now, both have the same behavior:
- On Windows 10, only the Ventoy partition is auto-mounted. The VTOYEFI partition is visible in Disk Management, but not auto-mounted, and not assigned a drive letter.
- On Linux Mint 20.3 XFCE, both partitions are auto-mounted.
I will retest on Ubuntu, and report back. It seems like the issue is Linux-specific, or maybe even Linux Mint-specific.
I have tested on Ubuntu 20.04 and 22.04, on both versions, both partitions are auto-mounted. So this looks like a Linux-specific issue.
KDE does not auto-mount 0xEF parition (VTOYEFI).
I'm closing this issue now. There seems to be a better solution, which is to hide the VTOYEFI partition altogether by flagging it as diag
: #2399