1

I have a dual boot machine (Windows 10 and Arch Linux), with an NTFS partition that is only used by the Arch.

Unfortunately, after shutting Windows 10 down normally, Arch won't mount that partition because of the hybrid shutdown thing. Is there any way to prevent this partition from getting messed by windows?

I don't want to disable hybrid shutdown, since that makes switching OS's fast. I also don't want to change the filesystem of that partition.

1
  • Does the partition have a drive letter in W10? If so, try removing it.
    – AFH
    Commented Sep 19, 2016 at 22:39

2 Answers 2

0

You can solve this in two ways. The problem boils down to windows keeping the partition marked as active and in use even after shutdown. To resolve this:

Option 1. Force mount the partition using this command sudo mount -t ntfs-3g -o remove_hiberfile /dev/sda2 /media/mountdrvlive This will allow you to mount partition even when its hibernated.

Option 2. Disable mounting the drive in windows.

Open Disk Management from settings or by pressing Win + X key. Now right click on the drive partition and disable mounting by removing the mount point.

You can disable mounting of any internal drive by diskpart SAN POLICY=OfflineInternal

1
  • Thanks. Option 1 isn't an option for me. I can risk the partition getting damaged. Option 2 didn't work.
    – amfcosta
    Commented Sep 28, 2016 at 20:59
0

You can hide your NTFS by changing the corresponding partition type to 0x83 (if MBR) or 0x8300 (if GPT). It will trick Windows it's a Linux partition. Use fdisk or gdisk on Linux to do so.

It works because Windows looks at the partition type and finds it important, Linux doesn't. In Linux you can specify the filesystem explicitly (like with mount -t or in /etc/fstab) and if there's any automagic, it recognizes the filesystem by its header or so (similarly Linux doesn't care about file extensions and recognizes files by their content).

I confirmed my solution (both cases: MBR and GPT) with Windows 7 and Kubuntu 16.04.2 LTS. At the moment I don't have access to Windows 10, hopefully it behaves the same way. Conclusions:

  • Windows doesn't mount a partition with Linux partition type, even if there's NTFS inside. You cannot assign a drive letter at all. Such partition seems to behave as if it was pure Linux partition. I expect Windows won't mess with it.
  • Linux can mount NTFS regardless of corresponding partition type.

Trivia: In Linux you can have any filesystem inside a regular file and mount it. In this case there's no partition table holding the partition type. This clearly shows that Linux just doesn't care about the partition type when mounting.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .