-
-
Notifications
You must be signed in to change notification settings - Fork 48
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
Consider relaxing installation medium validation check to accommodate Windows #2051
Comments
Just for clarification, as per the full message, the core of the issue is that the default modern Windows behaviour is that, whenever you plug a disk with a file system that Windows can recognize, it creates a So the problem is that, after a Windows user writes the Qubes image in Of course, this means that the FAT32 index gets modified and fails the byte comparison... Possible solutions include:
Note that there also exists a way to disable the policy that creates |
I think relaxing the check is really bad idea. The verification is based on byte comparison (not filesystem structure), so it isn't possible to tell whether such difference is harmless or not at this level. But adding that directory with a file by default sounds like a reasonable choice. Could you generate one and attach here? Just to make sure it have proper format (newlines etc). I'm not sure if I can force specific fat attribute at ISO generation time, but hope Windows will not change them when the directory+file already exists... Will it be enough? Or maybe just mounting the partition make some modification (like last mount time or so)? |
Sure. Here you go: The attributes should be preserved in the archive, and I empirically confirmed that none of directory or files seemed to be updated when plugging the drive on a different computer.
I would think so. I'll be happy to test if you have an image that you want to check. |
What |
When installation image is written on Windows, it automatically (by the OS) gets mounted and Windows create "System Volume Information" there. This obviously means the installation media is modified and then fails verification. This is really wrong from the Windows side to automatically modify some files behind users back. But since we can prevent this with really low cost by just creating those files ourself and reduce a lot of user confusion, just do it. Thanks @pbatard for the help. Fixes QubesOS/qubes-issues#2051
Ah shoot. That's an extra file that Windows 10 seems to create. But it isn't created right after the drive is mounted, which is why I didn't notice it. From what I can find, this seems to be related to Windows Phone support in Windows 10 and may be used by Microsoft to tie a removable card to a phone (or pseudo-phone since I'm not using any Windows Phone in any way shape or form, and I have no idea why the £$%^&* Microsoft thought it needed to create even more unwanted content on removable devices). Of course, its content and the reason for its creation are undocumented by Microsoft... 😠 If you look at the timestamps, you'll see that it was created long after the Guid file was, so I'm a bit two minds about it: Either ignore it altogether, with the expectation that users will have unplugged their drive before that file gets a chance to get written. But of course, that's taking a bit of a chance, and won't help if the user replug their drive after a while. Or just duplicate the Looking at the actual content of the file, we see that we have: It's pretty clear that So I tried to see if this could be tied to a disk or FAT32 partition serial number, but the one reported for that partition is For good measure I also searched the ISOHybrid for occurrences of Right now, I have recreated a Qubes USB drive, and am waiting for the |
Well, I waited more than one hour, and tried to replicate what I did before by plugging the USB on a different computer, but still no |
Unfortunately, that's a NO_GO. Looks to me like you created the
This is corroborated by the fact that a new I do see the |
Looks like |
Automated announcement from builder-github The package
|
Automated announcement from builder-github The package
Or update dom0 via Qubes Manager. |
Sorry for the delay in testing. I'm afraid I have to report that For a start, it seems that Windows 10 (1607 refresh) now consistently creates a
Now, my guess is that this file just contains a random 8 byte sequence, that acts as a fingerprint for the media, to be used when plugged into a Windows Phone, and therefore that simply creating a 12 byte file containing However, even on the one attempt when I didn't get a NB: This is at offset So even with an extra |
Re |
I'd think that creating a However, looking at FAT Directory Entry specs, which is the other change we're dealing with, I'm pretty sure that those two bytes are the 'Last access date' (offset
And indeed I can see that, when I look at the properties for My guess is that Windows does access So, short of specifically designing your checksum test to ignore those specific 2 bytes, I don't think there's an easy solution for Windows users... |
Is it possible to mark that FAT as read only (in some metadata)? |
Alternative, crazy idea - patch checksum checker to restore original value in those 2 bytes before. Something like |
I don't think there's a way to make FAT read-only (and, as a possible follow up in that direction, I'm pretty sure that setting a FAT file to read-only doesn't prevent the access time from being altered). The |
From the developer of Rufus:
Full message
The text was updated successfully, but these errors were encountered: