Bug apparently introduced by update to windows 10 21H1

I dual boot my laptop with windows 10 and fedora 33. This is because there is some software that only runs under windows related to my medical devices.

What I do is upload the data and create a report based on the data which I save as a pdf file. I then boot back into fedora and am happy until the next time I need to upload the data.

I have a script that I use to mount the ntfs volume and copy the report files over to fedora so I can review them without needing to boot back into windows.

About 2 weeks ago my windows was updated to the 21H1 version and that seems to have broken mounting the ntfs volume in linux. (It mounted fine in versions 20H1 and 20H2).

The message I began getting said something to the effect that windows was hibernated and the volume could not be mounted read/write and was mounted as read only.

I went through several iterations of shutdown & restart windows, clean shutdown, clean restart, each time with the same error on attempting to mount the ntfs volume.

I then filed a bug on ntfs-3g about the failure to mount properly. I followed the advice from maintainers about power settings, running chkdsk, etc., all to no avail.

https://bugzilla.redhat.com/show_bug.cgi?id=1988745

The final determination was that It appears windows changed something in their shutdown procedure such that it now leaves a hibernation file on the disk (even with a normal shutdown or restart) that fakes linux into believing windows is hibernated and not a clean shutdown or restart, preventing a normal read/write mount of the ntfs volume.

The workaround I was given, and that seems to work for me was the command

sudo mount -t ntfs -o rw,remove_hiberfile <device> <mount point>

I mentioned that this command could cause problems if windows was actually hibernated.
The bug is still open.

I wanted to let people know that there is a problem that occurs when updating to win10 version 21H1 and suggest that they not update to that version until a fix has been developed.

9 Likes

Try opening command prompt as administrator in windows and typing
powercfg.exe /hibernate off
Also, make sure things like fast boot are off.

4 Likes

Is that command not the same as "powercfg /h off"?
If it is then I have already done so, although I tried it again the way you wrote it with no changes noted.

If you checked the comments on that bug you would find both those suggestions were already made and done.

The problem remains even after doing all that has been suggested to date.

I feel that microsoft found a way to prevent linux users from routinely accessing an ntfs volume and put it into their update.

2 Likes

IMO, trying to maintain interoperability with Windows is a losing battle, or at least not worth the aggravation. You might consider just using a separate drive for each OS, or even separate laptops, as opposed to dual booting.

maybe a hint to save the reboot tasks:

I’m running an Windows 8.1 on a second disk and boot it via VBox (without the need to reboot)

cause vbox is able to boot raw disk and I generate the disk for vbox-Windows via:

sudo VBoxManage internalcommands createrawvmdk -filename ./Win_RAW.vmdk -rawdisk /dev/sd_X -partitions 1,2 -relative

please adjust “/dev/sd_X”, the user-rights for the resulting files, and point your VBox-HD for Windows to “Win_RAW.vmdk”.

Hints:

  • I boot my linux via BIOS (not UEFI), dito for Windows (via grub, Bios-Boot-Menue)
  • I’m running Win 8.1, not Win10/11
  • I currently don’t know if your Apps you need under Windows are running in VBox Windows Guest too

A couple issues with your suggestion.

  1. This is my laptop and has only one drive.
  2. I need to transfer the files from ntfs to ext4 when linux is running. Thus it requires that I be able to mount the ntfs volume. I might be able to use samba with the VM, but that is extreme overkill for the small amount of time windows is running in any given month; since I would have to configure the win VM to share the drive and linux to access it via samba.

The workaround I noted above works so far, so will live with it and hope things are fixed soon.

to 1.:
currently don’t know if my suggestion might work on an single drive too

to 2.:
data exchange between window and linux under vbox goes via “vbox shares”, e.g. I mount a linux directory “/home/<me>/Download” (btrfs) under vbox into windows and it appears as a drive in the windows file explorer e.g. as z:
it’s just a configuration option of an VM (=> Settings => “Shared Folders”)
my windows programs e.g.CCleaner is hosted on an linux brtfs and is excutable via an vbox share
no need to use samba

see:

https://www.virtualbox.org/manual/

=> 4.3

for command “VBoxManage internalcommands createrawvmdk …”
=> 9.7.1.1. and 9.7.1.2.

P.S.
to get files from a partition (ntfs) on the same box running linux you just need to click “Other Locations” (in nautilus or files), then double click the target partition, key in the passwd and then you are able to access all files on that partition.
But I guess you know that already…

I cannot confirm your findings. I have a dual boot with windows 10 21H1 on my work computer and can easily mount the windows partition from Fedora without any issues.

  1. sure, but laptop drives are easy to swap out and small (128GB) SSDs are cheap on ebay. They also make HDD/SSD bays that insert in place of the cd drive if your laptop has one of those. You could also boot/install to a usb drive, etc.
  2. I don’t see where you mention why you would need to get the windows data to fedora if you were using the two drive method. That was part of the point of the two drive method. No more coop and hardware sharing between OSes needed (preferably).

I only have one drive, 500G nvme, and the mobo only has one nvme slot with no space nor connections for an SSD. I am stuck with a single drive unless I also use a usb device for the data.

The workaround handles the issue for now.

The laptop was delivered with win10, and I don’t want to try and migrate that to a vm on linux since it may easily break the licensing. I also do not want to have windows hosting a vm holding fedora since that would leave it accessing the net 24x7 and that is not acceptable to me. The small amount it gets now is more than I prefer.

I am testing the win10 vm idea on another machine just to see if it will work and may be able to migrate it later, but still need to confirm the licensing issue. The vm install of win10 is already telling me that win10 is not activated there.

Win10 not being activated is actually not a huge problem in most cases. It mostly limits cosmetic taskbar changes.

Still would need to mount it even if on a different device. Mounting it rw is the current issue.

Right, but it won’t mount rw, only ro. Thus only copying things off works. My script does the same in one single command. Mounts, copies, dismounts, done…

Just an update, and acknowledging an error I made.

When I earlier ran the suggested command “powercfg /hibernate off” I failed to do so under the admin powershell, so it had no effect. I was perusing the bug and repeating each step sugggested there as well as here just to make certain I had touched all the bases properly when I identified that error.
After repeating all the steps suggested under the admin powershell then testing again the drive now mounts properly. thus I have noted that the bug report was a false alarm and user error was involved.

Apparently at some point the laptop was allowed to hibernate with windows even though I have never knowingly done so. Thus the hiberfile was marked as hibernating.

Thanks for all the suggestions and assistance in identifying my error.

2 Likes

Just a comment about SD drives: You need to go through lots of hoops to actually write data to a removable device on Windows 10. If you just format your drive as a NTFS drive and write to it, it will create all the directories you specify, and all the files in them, but the actual data in each file is just a string of nulls. Not very useful, but nobody can easily steal the companies secrets with a SD card.

Oh, the “improved security” in Windows 11 will forbid booting anything but a genuine Windows OS, so you won’t be able to put Fedora on a SD and boot from it.

On the other hand, Whitewater’s Fedora that runs as a Windows executable can handle (many) native Linux programs, an automatically makes the C drive available . . .

and if you try to activate it online ? [1]

and there are windows tools to read out the licence key (on the native windows !), e.g. speccy:

[1]
I’m currently not up to date with my knowledge regarding windows (always using the free versions which run without licence key for 90 days)
But AFAIK, it’s not possible to install Windows > 8 without an licence key. it just stops the install routine.
so I guess the licence key is on the box (in BIOS, EFI ?)
and licence key and activation are two pairs of boots.
the first to be able to install. the second to to survive a time window of x days before it (without activation) stops working. (and of course to tell MS where to collect the user data from :crazy_face: )

===
there is a neat tool to pack a full blown windows (with all drivers and Apps) into an install image and with it you’re able to install a second box which is identical to the first box.

alas in german, but:

  • pack a running (!) windows box with that tool (generates a install.wim)
  • copy the windows install DVD to an USB stick (needed to be made bootable before)
  • exchange the native install.wim (under SOURCES) with above generated one
  • install windows as usual

you need to activate the second windows (online), cause - AFAIK- already the MAC-Address change triggers an un-activated windows on an VM or another box (NOT on the same box => same MAC)

@sixpack13
I don’t know what data MS uses to identify the hardware, but I know that you can completely wipe out windows, even installing a new drive, then reinstall on the same machine and MS knows the device has already been activated so it goes without a hitch and no further action is necessary.

@ptrenholme
I have no idea why you came up with something about an SD card. Nothing in this refers to an SD card except your post.

@sixpack13
You are not quite correct about needing the license key to install. I installed win10 from a usb drive ( I downloaded the install iso from MS) and it did the full install and runs without a hitch. It is only now (after about 10 days or so) telling me that it has not been activated. Probably will die after 30 or 90 days, but installation, unlike what was done with win95, win98, XP, and the like, does not require the key for install, only to activate it after installation is complete.

Q.: Was your box initial delivered with windows on it ?
Cause I’ve had Win 10 (the early ones) which definitive needed a license key to install.
Dito for an bought win 8.1.
both on an homebrewed box without windows pre-installed

I guess you fetched a win dvd which runs ~90 days.

anyway, both needed to be activated.

On modern factory machines, the key is embedded in the BIOS.

It won’t you can run Windows 10 without activating it. It just disables some cosmetic options in the taskbar.

Operating system is a thin layer of software allowing communication between apps and hardware … interoperability exists through DevOps framework marking the road to cloud ressources where Linux shines. Not free as beer but expensive, sophisticated engineering.
Microsoft moved with W10 towards high level cloud ressources with Azure, the whole thing is like a Lego that you must assemble … not easy.
Activation of Windows devices needs connection to Microsoft account, modern BIOS is stored in flash memory allowing updates.
Microsoft with W11 is cleaning up Windows NT. You must update Windows and Fedora … configuring hibernate isn’t the question. File systems are not always compatible.
Use two devices exchanging files through Chromium/Chrome/Edge extensions for OneDrive, Google Drive, … Windows and Fedora are fast moving targets, a test bed for Red Hat, in competition for enterprise level cognitive services with IBM merger.
Try to follow IBM Cloud watching Google updating services keeping an eye on MS Azure. Red Hat develops interesting alternatives to Kubernetes/Docker virtual container concept.