On Windows 10 with USB stick that has UEFI boot and TrueCrypt/VeraCrypt partitions nothing works.
Windows 10 assigns letters in some way that neither DiskPart nor Disk Management sees them, but registry keys are present on HKLM\SYSTEM\MountedDevices
, so the “Format” message appears... also on “safely remove hardware” it appears with letters on all partitions.
Windows 10 does it so badly that the EFI partition isn't in Disk Management with the letter, and in DiskPart it is also not seen as a volume and without letter, but if you go to Explorer (use “safely remove hardware” to learn the letter but do not remove it) you see it with a letter and can enter it, modify files/folders, etc.
That keys are re-created upon re-connect, so no possible solution.
This Windows 10 is a headache... all caused by treating external media with the Removable Media Bit as 'special', one-partition devices, even while they have multiple partitions.
Example: USB EFI Boot with NTFS+EFI+... on a USB stick that is impossible to re-set the removable media bit.
Warning: Changing the partition type can corrupt data on VeraCrypt partitions.
But there is a trick touching registry... take a lot of care when doing this and quadruple-check that the hex data is identical.
On the registry key, there are two entries with same exact hex data for each partition... well, one has the letter, one starts with \??\Volume{
...
The trick is to rename the one that starts with \??\Volume{
that belongs to the partition you want to avoid getting a letter.
Instead of starting with \??\Volume{
make it start with #{
.
And of course, delete the one starting with \DosDevices\
.
Then, remove it (using the “safely remove” function) and plug it again. Press F5 to refresh the key in regedit to check if it worked.
On my tests it works, but must done be with a lot of care... I insist on quad checking hex data to be the same... a lot of times I didn't quad check it, I made a mistake, and sometimes on the next reboot Windows didn't start, so I needed to fix it with an ugly bootable Windows install DVD by going into console mode and running regedit from the DVD (no need to reinstall).
So, prior to deleting anything, save that registry hive, and quad check what you do.
But ensure the HEX DATA is what you want or else you can make your system unbootable. Quad check it!!!
ADDED:
- If you take the care to not delete (only rename) the
\??\Volume{
one, and also to not edit the hex data of it, you can be safe
- In the worst-case scenario, you to need to boot with a Windows install DVD and go to console mode, run regedit, and rename it back to start with
\??\Volume{
SO:
- Always do one at a time...better to stay on the safe side
You have been warned, it is touching the registry by hand.
Why does this work?
- It is telling Windows to ignore that 'volume', so it doesn't assign a letter or list it in the Safely Remove Hardware list for that device.
Yes, this works for USB memory cards, sticks, etc., without needing to touch the Removable Media Bit... it is just only to hide such partitions.
Side note: This is also valid for any other partition you do not want to auto-mount on USB connect.
1I'm having the same problem with W7 wanting to format a BTRFS partition on my Android whenever I plug it in to charge... Windows = data loss by design – Mark K Cowan – 2014-08-13T12:56:05.000
8Note there are two great answers here: The answer by Snark is great if you only want to solve to problem for one host computer and/or have added the truecrypted partition as a Favorite on any computer. The answer by SylikC solves the problem even for computers who haven't seen your USB drive before, but it (kind of) breaks adding that USB drive to TrueCrypt Favorites. – Jonas Heidelberg – 2011-08-30T15:02:41.433