Mounting an NTFS drive and files which windows has accessed

I built a dual SSD PC with Win 10 and Leap each on one SSD. I’ve gotten the dual boot largely ironed out. However, in migrating from Mac, I put all my files on an NTFS formatted hard drive, and put it in the new PC. At some point, I unthinkingly let Windows look at that drive.
-I’ve read on this forum that “every time you save a Linux file to a Windows partition, you lose the LInux permissions.”
-Is there a way to unmount the whole drive from Windows, and/or remove the Windows changes to that drive and files?
-Is there a way to mount the drive in Leap and read the files regardless of the windows junk?
-Can I do so in YAST more easily?
-I’m worried windows has really messed up this transfer drive.

Thank you.

NTFS should mount no problem but the permissions are synthetic and not persistent

But transfer can be done and permissions changed as needed.

Some idea of type of files would help. personal data or system files??

I don’t see Windows having any negative effects since NTFS is Windows FS but then with Windows it is always a guess

Note that you need to turn off fast boot in Windows to assure proper shut down of the file system so it can be mounted in other OS

Probably not the whole truth (see a few lines further down in this post).

I don’t use MS Windows, so i can’t help you with that. Sorry !

Yes. All you need is ntfs-3g which might be installed on your system already. If not, you will find a version of ntfs-3g in this http://download.opensuse.org/distribution/leap/42.1/repo/oss/ repository.
Using ntfs-3g you can mount your drive manually (as “root” in a console) or at system start up by adding an entry for the drive in the file “/etc/fstab”. For more information on the command syntax type

> man ntfs-3g

or look here http://www.tuxera.com/community/open-source-ntfs-3g/#tab-1414502373-2-22

With ntfs-3g there even seems to be a way to use a NTFS-drive and sharing the permissions with MS Windows (see here http://www.tuxera.com/community/ntfs-3g-advanced/ownership-and-permissions/ for more information). But - as i said already - i dont use MS Windows so i cant tell whether that works or not.

And as already stated by gogalthorp : The NTFS- drive must be left behind “clean” by MS Windows otherwise ntfs-3g might encounter problems using it.

Regards

susejunky

I apologize for being a noob, but in Yast > Software Management > search for ntfs I get three different packages:
-libntfs-3g84
-ntfs-3g
-ntfsprogs

The menu actually says they’re ‘Installed (Available).’ So wait, does this mean I don’t need to install them, or I do?

Normally they are installed and you don’t need to concern yourself

Your problem is probably fast boot on Windows. It does not shut the file system down cleanly and other OS may not access the partition and defaults to being on. Disable it in Windows with the partition in question attached and then do a full shut down so it is cleanly shut down.

Thank you, I’ve done that, but Windows still seems to have polluted all four drives in this build, including the Leap SSD. None of this makes any sense to me, including how to actually use ntfs-3g.

Disk /dev/sda: 477 GiB, 512110190592 bytes, 1000215216 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disklabel type: gpt
Disk identifier: AB6F2783-A2B0-4DB3-8910-8DBFC0B50447

Device Start End Sectors Size Type
/dev/sda1 2048 321535 319488 156M EFI System
/dev/sda2 321536 4530175 4208640 2G Microsoft basic data
/dev/sda3 4530176 88422399 83892224 40G Microsoft basic data
/dev/sda4 88422400 1000214527 911792128 434.8G Microsoft basic data

Disk /dev/sdb: 698.7 GiB, 750156374016 bytes, 1465149168 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disklabel type: dos
Disk identifier: 0xb275bdcd

Device Boot Start End Sectors Size Id Type
/dev/sdb1 * 2 1465149167 1465149166 698.7G 7 HPFS/NTFS/exFAT

Disk /dev/sdc: 477 GiB, 512110190592 bytes, 1000215216 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disklabel type: gpt
Disk identifier: 8868F9C4-D7A6-4364-AF0E-0ACB37EE80A3

Device Start End Sectors Size Type
/dev/sdc1 2048 923647 921600 450M Windows recovery environment
/dev/sdc2 923648 1128447 204800 100M EFI System
/dev/sdc3 1128448 1161215 32768 16M Microsoft reserved
/dev/sdc4 1161216 1000214527 999053312 476.4G Microsoft basic data

Disk /dev/sdd: 465.8 GiB, 500107862016 bytes, 976773168 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disklabel type: gpt
Disk identifier: 26E02776-EC54-4957-B80C-321F185B9050

Device Start End Sectors Size Type
/dev/sdd1 2048 923647 921600 450M Windows recovery environment
/dev/sdd2 923648 1128447 204800 100M EFI System
/dev/sdd3 1128448 1161215 32768 16M Microsoft reserved
/dev/sdd4 1161216 976773119 975611904 465.2G Microsoft basic data

There are two 512GB SSD’s, one with Leap installed, one with Windows 10.
There’s one 500GB conventional drive with my mac files on it (including a bunch of music).
And there’s an empty 700GB conventional drive.

I can’t tell which is which, and all seem polluted by windows ****. The grub2 boot menu, for example, gives options to boot Windows on devices c and d (if I remember right).

I’m baffled and still have no idea how to actually use ntfs-3g or turn it on.

fdisk does not see the GPT partitions codes correctly use gdisk

You have to point gdisk to each drive ie gdisk /dev/sda etc

You don’t turn it on. read man mount

afaik all drivers needed for ntfs partitions should be installed no need for searching in yast, I don’t have gpt disks I still use mbr but that shouldn’t matter to the Linux kernel
I think your issue is that ntfs partitions need root privileges to mount that’s a security feature if you want to disable it, trt this polkit setting
create the file /etc/polkit-1/rules.d/10-udisks2.rules

kdesu kate /etc/polkit-1/rules.d/10-udisks2.rules

and paste this text block in it

// See the polkit(8) man page for more information
// about configuring polkit.

// Allow udisks2 to mount devices without authentication
// for users in the "users" group.
polkit.addRule(function(action, subject) {
    if ((action.id == "org.freedesktop.udisks2.filesystem-mount-system" ||
         action.id == "org.freedesktop.udisks2.filesystem-mount") &&
    subject.isInGroup("users")) {
        return polkit.Result.YES;
    }
});

the above is not ideal as it will give all users write access to ntfs partitions, you might want to create a different group and add yourself to it, I use a group called storage

su -
groupadd storage
useradd -G storage your_user_name

in that case use the bellow text block, where only members of the storage group will be able to mount ntfs partitions and read/write data to it

// See the polkit(8) man page for more information
// about configuring polkit.

// Allow udisks2 to mount devices without authentication
// for users in the "storage" group.
polkit.addRule(function(action, subject) {
    if ((action.id == "org.freedesktop.udisks2.filesystem-mount-system" ||
         action.id == "org.freedesktop.udisks2.filesystem-mount") &&
    subject.isInGroup("storage")) {
        return polkit.Result.YES;
    }
});

Did you read

>man ntfs-3g

or http://www.tuxera.com/community/open-source-ntfs-3g/#tab-1414502373-2-22 ?

What command did you use to produce the results (fdisk, gdisk, …) shown in your post?

There are three (!) EFI system partitions and none (!) of the partitions seems to be a Linux partition.

Could you please post the output of

# lsblk -a -f

and the results of

# gdisk -l /dev/sda
# gdisk -l /dev/sdb
# gdisk -l /dev/sdc
# gdisk -l /dev/sdd

All commands must be issued as root-user!

Regards

susejunky

Here a wild guess on “which disk may contain what” derived from the disk information you provided so far:

/dev/sda = openSUSE
/dev/sda1 = EFI system partition
/dev/sda2 = SWAP
/dev/sda3 = /
/dev/sda4 = /home

/dev/sdb = your empty 700GB conventional drive
/dev/sdb1 = NTFS partition spanning the whole drive

/dev/sdc = MS Windows
/dev/sdc1 = MS Windows recovery partition
/dev/sdc2 = (second) EFI system partition
/dev/sdc3 = MS reserved partition
/dev/sdc4 = MS Windows

/dev/sdd = Same setup as /dev/sdc !!! Considering the fact that /dev/sdc is only 465.8GB (versus /dev/sdc with 477GB) this might be your 500GB conventional drive with your mac files on it.

From the information you provided it is not absolutely sure either that all partitions contain a valid filesystem. Assuming /dev/sdd4 has a valid NTFS filesystem and contains your mac data, you could mount the disk with openSUSE as follows:

  • Start openSUSE
  • login as “normal” user
  • open a console
  • become “root” by typing “su” and providing your root password
  • mount /dev/sdd4 to /mnt like this
ntfs-3g -o ro /dev/sdd4 /mnt

/mnt should now show the contents of /dev/sdd4 as READONLY (!) so that no harm can be done.

BUT REMEMBER : The NTFS filesystem must have been left behind clean by MS Windows!

If there are any errors please post them here.

Regards

susejunky

Thank you all for the help, but can someone delete this thread?

It’s too hard to fight the windows pollution. I’m going to pull the drives, put them back in the mac (pro), try loading and using http://www.tuxera.com/products/tuxera-ntfs-for-mac/ to re-format and reload them with all my files, and then put them back in the PC and try getting Leap to see them WITHOUT booting Windows at all. I never thought it would be this hard. Thank you again, I’m sure I’ll be back with a new topic on this.

No, we don’t do that here. It might be of value to others who come searching at a later date.

I never quite understood what your issue was
openSUSE supports ntfs out of the box, under plasma or lxqt when you try to mount an ntfs partition the file manager (dolphin or pcmanfm-qt) asks for root password this is a security feature, if your ntfs file system is damaged or improperly unmounted by windows (ie you are using hibernation or fast-boot which I avoid as I damaged a file system when dual booting a long time ago) Linux might not see the ntfs partition (hasn’t happened to me).
so if you are using windows do not use hibernation or fast-boot (which is hibernation renamed) but a full shut down/boot, if you don’t want to type the root password every time you mount a file system use the trick I mentioned above, if you think the file system is damaged then try fdisk or reformat the partition, I have no idea how osx came in this conversation?