3

I'm looking for equivalent of -errors={continue|remount-ro|panic} option which is available for i.a. mount.nfs4 but not for the mount.ntfs.

I need it to mount Windows 10 partition (via /etc/fstab) which sometimes is available with read-write permissions and sometimes is limited to read-only (depending whether Windows was hibernated or fully shut down).

You can find more details about this problem in mount.ntfs manpage:

Windows hibernation and fast restarting

On computers which can be dual-booted into Windows or Linux, Windows has to be fully shut down before booting into Linux, otherwise the NTFS file systems on internal disks may be left in an inconsistent state and changes made by Linux may be ignored by Windows.

So, Windows may not be left in hibernation when starting Linux, in order to avoid inconsistencies. Moreover, the fast restart feature available on recent Windows systems has to be disabled. This can be achieved by issuing as an Administrator the Windows command which disables both hibernation and fast restarting :

    powercfg /h off
  • 2
    I'm not sure exactly what this question is asking. Are you trying to mount a locked (Hibernated) Windows partition from a Linux OS? Are you trying to mount an unlocked (Full shutdown) Windows partition? I'm not sure, but I'm fairly certain that the most recent versions of Ubuntu automatically mount NTFS partitions with R-W access (When windows is fully shutdown). – Ulincsys Oct 9 '15 at 4:03
  • There are many credible sources that say that a Windows partition should only be mounted as read-only, or you risk losing your Windows installation. You don't need us to find this - a simple google query is enough. Please explain what you really want. – harrymc Oct 12 '15 at 18:04
  • I want to mount Windows 10 partition in read-write mode if possible with fallback to read-only mount. Note that there are two primary NTFS drivers for Linux - NTFS-3g and kernel implementation. I guess that you refer to kernel's NTFS implementation that supports limited write operation. – patryk.beza Dec 29 '15 at 15:55
3
+25

You could use 2 lines in your fstab:

1) with the options: norecover,nobootwait

2) with the options: ro,norecover,nobootwait

If windows was shut down properly, the first will succeed, you get a rw mount, and the second line will fail, but your system should continue to boot.

If windows was hibernated, the first one fails, and falls through to the second, and you get a ro mount.

You may need to take additional steps to ensure continued system booting if one fstab line fails. Systemd users might need to add "nofail" to the options.

Haven't tested this exact scenario, but something like this should work for you or may inspire somebody else to a better answer.

Your Answer

By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

Not the answer you're looking for? Browse other questions tagged or ask your own question.