7

I have a USB flash drive which has Linux installed on it. Now what I do is insert it into my computer and boot it inside an VM. Works great.

The only problem is, that Windows always asks me to format the drive, because it can (obviously) make no sense of it.

How do I stop these popups telling me to format my drive?

Note that the answers on similar questions concerning VeraCrypt didn't work for me (I can't change the drive-letter because it is grayed out. When clicking on the disk at the bottom view, it just tells me that the view hasn't been updated and that I should reopen Disk Management or reboot my Computer. I did both 3 times.)

I also tried disabling AutoPlay (Control Panel\Hardware and Sound\AutoPlay) by unchecking "Use AutoPlay for all media and devices" and by specifically selecting "Take no action" for "Removable drives". Second attempt was to disable this using the registry also didn't work.

I say Reinstate Monica
  • 25,487
  • 19
  • 95
  • 131
redxef
  • 191
  • 1
  • 6
  • According to many Windows forums it can't be disabled. –  Oct 08 '18 at 21:04
  • @Albin updated my answer to reflect the way I did that, but I only now realised, that there also (of course) is a registry key, will tweak that. – redxef Oct 08 '18 at 22:05
  • @redxef you're way should have worked, but sometimes the UI of windows isn't that great, so I would just check if the regestry value has been updated to 0xFF. If it is, you're autorun should be disabled completely (I still would test it though) – Albin Oct 08 '18 at 22:10

2 Answers2

1

There is suppose to be a way that works with Win10 by editing the registry where the Volume Identifiers are stored. A full description can be found here.

As a temporary workaround (or a final one if you don't get anything else to work) you can use a workaround though Authotkey. You can setup a script that immediately closes the format window after it comes up. Here is a description how to do it.

Concerning deleting the drive letter: I didn't try it, but you can also remove a drive letter using diskpart, did you try that option running diskpart with administrator privileges?

Another option would be to disable the autorun through the registry (so all types of autoruns are disables), here's an explanation how. But I'm not sure if this will effect the formatting dialogue.

Albin
  • 9,307
  • 11
  • 50
  • 89
  • Will try the Windows 10 version. The second option wont be acceptable, because that would render the os useless. Third option is a last resort. – redxef Oct 08 '18 at 21:42
  • @redxef Let me know if it works. Why would the second render the OS useless? – Albin Oct 08 '18 at 21:44
  • @Albin Because the drive has a Linux distro already installed and probably formatted as EXT4, a file system Windows doesn't understand - reason why it asks for formatting - and cannot recreate. –  Oct 08 '18 at 21:53
  • @Albin Because that Stick needs at least 2 partitions, the first being an efi volume, the second an ext4 volume. Formatting it with MBR and a fat32 and then putting an iso of the os onto it would not make it bootable anymore. Which is the intent behind it, otherwise I would just use a virtual hard disk and be done with it. And merging the two partitions and letting the os live in a fat filesystem isn't that great of a solution either. – redxef Oct 08 '18 at 21:53
  • @Albin but if I dd it back on it will restore the usb to the exact same layout as before. I'll try it tomorrow when I have enough time on my hand, but doubt it will change anything. Thanks for your help in any case. And concerning the importance, it's not as important as I might make it seem, but I still use it often enough and got backups :) – redxef Oct 08 '18 at 22:00
  • @Albin Now reading the answer you linked I'm convince you misunderstood it. The other question is also about an unrecognized file system that's triggering the format dialog. The answer proposes a workaround: Instead of having a TC encrypted **partition** Harry suggested a TC container **file** inside a *known* (for Windows) partition. Of course this workaround works for the purpose of the other answer but in this case is a pure waste of time, as soon as you reimage the drive the "problem" will be the same. –  Oct 08 '18 at 22:10
  • @GabrielaGarcia you are right, I removed it. – Albin Oct 08 '18 at 22:14
0

Regarding the option below being grayed out, make sure you are selecting the correct drive (F:) I had accidentally selected the incorrect one and the option was grayed out for me.


While the USB is plugged in, run Computer Management (compmgmt.msc) and unassign the drive letter from that disk.

  • Right click → Change Drive Letters and Paths...

  • Select F: and hit Remove

A warning will come up:

enter image description here

Click Yes.

Welz
  • 207
  • 1
  • 4
  • 17
  • I thought this only worked until you unplugged it and plugged it back in? – acejavelin Oct 08 '18 at 21:12
  • *I can't change the drive-letter because it is grayed out.* Your proposed solution was already tried by the OP. –  Oct 08 '18 at 21:20
  • @acejavelin just tested it, no error comes up - when I reattach the drive letter, I immediately get the message. – Welz Oct 08 '18 at 21:22
  • @GabrielaGarcia I had a similar error, updated my answer. – Welz Oct 08 '18 at 21:24
  • Have you tried with an unformatted (or formatted with a file system not recognized by Windows) drive? –  Oct 08 '18 at 22:03
  • Yep, I first got the error, followed the steps, unplugged a few times, then reattached the letter and got the error. – Welz Oct 08 '18 at 22:23