MediaWriter icon indicating copy to clipboard operation
MediaWriter copied to clipboard

A flash drive restored on Linux is not accessible in Windows

Open kparal opened this issue 3 years ago • 1 comments

I noticed that when I restore a flash drive on Windows, I see it in the File explorer and it has a letter assigned. However, when I restore the same drive on Linux (Fedora 37) and then plug it to my Windows system, the File explorer doesn't see the drive - there is no flash drive icon visible and of course that means nor a letter assigned.

When I look at that flash drive through gnome-disks, it looks the same in both cases - an MBR with one exFAT partition. I have no idea why Windows accepts it only when the restoration happens on Windows, but it is reproducible behavior for me. The downside of this is that if such a restored flash drive is given to a person with Windows, he has no easy way to make that flash drive usable, because the file explorer doesn't see it, and FMW doesn't offer to restore it (it's already "restored").

A possible workaround is to burn some ISO to this "invisible" flash drive through FMW on Windows, and then restore it. Once that is done, the flash drive is made accessible again.

Reproducer:

  1. Write a Live ISO to a flash drive on Windows with FMW
  2. Restore the flash drive on Linux with FMW
  3. Plug the flash drive to Windows and see that Windows doesn't see it - it's not listed in File explorer -> This PC -> Devices and drives

The same thing happens, when I try to restore the flash drive manually, by reformatting it with MBR and creating an exFAT partition. If the drive was previously burned on Windows with FMW, even after manual restore Windows doesn't see it. But if I restore the drive on Windows first, or if I burn the ISO on Linux with FMW and then do the manual restore, the drive is accessible on Windows.

It almost seems like FMW sets some flag "this is an invisible drive" on Windows during ISO burn, and when the drive is reformatted on Linux, the flag is not reset. But when it's restored through FMW on Windows, the flag gets reset.

System: FMW 5.0.4 Windows 10 Fedora 37

kparal avatar Nov 14 '22 15:11 kparal

This might have the same reason as why we have to make sure to restore the partition table when restoring the drive on Windows. Looks that the way we write images on Windows makes it to corrupt it somehow and for that reason it's not working when restored on Linux. I guess I will have to check and improve the way we write images on Windows to fix this and possibly get rid of the hack we have there.

grulja avatar Nov 18 '22 12:11 grulja