Bug 404980

Summary: Access windows drives under linux (with solution ready)
Product: [Frameworks and Libraries] frameworks-kio Reporter: Unknown <null>
Component: PlacesAssignee: David Faure <faure>
Status: RESOLVED NOT A BUG    
Severity: normal CC: kde, kdelibs-bugs-null, nate
Priority: NOR    
Version First Reported In: unspecified   
Target Milestone: ---   
Platform: Other   
OS: Linux   
Latest Commit: Version Fixed/Implemented In:
Sentry Crash Report:

Description Unknown 2019-03-02 07:50:33 UTC
SUMMARY
Since windows10 hibernation is the default shutdown option and because of that windows partitions are made read-only.

STEPS TO REPRODUCE
1. Be windows user (or have dual-boot)
2. Come to linux (or just boot it)
3. Try to access windows partition from linux

OBSERVED RESULT
Partition is read-only and user cannot do anything about it other than to check the internet for dozen of not working solutions.

EXPECTED RESULT
Just be able to use windows partition to e.g. launch some windows software through wine or remove some files that windows is unable to, or place some scripts you made under linux and want to test under windows or ...
SOFTWARE/OS VERSIONS
Windows: 10
Linux/KDE Plasma: 4.18/5.15.1
KDE Frameworks Version: 5.55
Qt Version: 5.12

SOLUTION
mount -t ntfs-3g -o remove_hiberfile /dev/sdxy /mnt/ddddddd
or something similar.
Comment 1 Nate Graham 2019-03-02 13:07:35 UTC
Maybe we can show a nice error message or something, but surely the partition is made read-only for a reason, right? If we mess with it and make it writable, doesn't this risk destroying the Windows partition?

It seems like by far the better solution is to shut down your Windows installation rather than hibernate it if you have a dual-boot setup.
Comment 2 Unknown 2019-03-02 16:07:03 UTC
No Windows expert, but one would expect that it only removes the file that windows has dumped RAM into; and results in plain boot-up instead of 'fast-startup'.
"It seems like by far the better solution is to shut down your Windows installation rather than hibernate"
Windows hibernates when you use shutdown, there is no shutdown in windows anymore, at least not by default (so it affects 99.999% of users). Which is awesome, I hope distro's would do that as well, astounding feature!
But imagine you are recommending Linux to your friend and this person has already gigabytes of software installed on their windows partition and wanted to try out Valve's proton - this person will revert back and never look back hitting this issue, as happened to my friend.
Comment 3 Nate Graham 2019-03-05 15:19:26 UTC
It's a good point.

However I want to make sure that we don't accidentally destroy the windows partition if we mess with it while hibernated. I don't have any Windows or Windows partitions, so I can't easily test this configuration. Since you seem to, can you find out:
1. What exact file (or files) needs to be removed to make the hibernated Windows partition read-write
2. whether this is safe; make sure it doesn't destroy the ability to boot into Windows

Thanks!
Comment 4 Unknown 2019-03-05 21:54:27 UTC
OK. For me it is all safe, but there could be a dialog like this
"
Please note, this means that the saved Windows session will be completely lost. Use this option under your own responsibility.
"
as this removes "C:\\hiberfil.sys" which is the size of installed RAM. The file will reappear the next shutdown (unless there is an update or something important, then I think, it does not hibernate)
The downsides are that your next windows boot will take 2 minutes instead of 20 seconds and that if you saved opened programs, they won't reopen.

More official information could be found in ntfs-3g manpage -
"remove_hiberfile
    Unlike in case of read-only mount, the read-write mount is denied if the NTFS volume is hibernated. One needs either to resume Windows and shutdown it properly, or use this option which will remove the Windows hibernation file. Please note, this means that the saved Windows session will be completely lost. Use this option under your own responsibility. "

There are lots of tutorials for windows users to delete this file manually, mainly for XP, as the file is quite large and used to occupy large portion of available space back then.
Comment 5 Nate Graham 2019-03-05 23:09:21 UTC
Yikes, that sounds pretty invasive. If the only way to get the partition mounted read-write it to delete the hibernation file and destroy the saved session data, I don't think that's something we can do in Dolphin--even if we added a warning dialog.

What I think would make more sense is for the software that's using ntfs-3g to mount the partition to offer this feature itself, where the warning would be logically connected in the user's mind to the process of attempting to mount the partition.
Comment 6 Kai Uwe Broulik 2019-03-06 08:59:36 UTC
From what I can tell remove_hiberfile option isn't supported anymore.

My suggestion is to improve the error message (if we can do that, I think it just comes from ntfs-3g and/or udisks verbatim) to tell the user to disable fast startup on the Windows installation.
Comment 7 Unknown 2019-03-16 10:35:53 UTC
"From what I can tell remove_hiberfile option isn't supported anymore."
How do you know? 

Coming back to this issue, it is bad idea to tell people to mess with windows settings to disable 'fast startup' when all remove_hiberfile does is exactly that JUST it is one-time and not permanent so you suffer from slower boot-time only one time after accessing windows partition from linux and not every time, as it is with this option disabled.

I might have exaggerated the boot-time last time - it becomes on-pair with Neon, whereas with hiberfile it is way faster than Neon.