3

I am reading about how symlinks created on linux filesystem not work well when copied to NTFS filesystem at https://ubuntuforums.org/showthread.php?t=1497914. Is it possible to copy files of any type from ext4 to ntfs filesystems and still expect the copies can work equally well as the original?

Under Ubuntu, I once copied files (directories and symlinks and hardlinks) from ext4 to a NTFS filesystem in a USB external hard drive. I don't think I had problem when using the copies of symlinks on the NTFS filesystem, when the linked files have also been copied to the NTFS filesystem and the relative paths between the symlinks and the linked files are still the same.

3

It depends on:

  • the version of ntfs-3g (2017.3.23 integrated FUSE 28 needed)
  • how you set up the NTFS and the EXT4 partitions

The ntfs-3g driver has a lot of functionality built-in that allows you to:

but all these take careful planning before use and management afterwards (so if you create a new user on the Ubuntu part, you need to create the same user on Windows, have the same passwords on both sides, ...)

So: Yes, it can handle special files like symbolic links, devices, and FIFOs, but it's a lot of work, so for professional use: read the docs, plan and deploy, but for a simple dual boot, don't bother unless you want to dig down into the bowels of NTFS...

¯\_(ツ)_/¯

  • 1
    +1 for sharing experience of possible problems and solutions :-) – sudodus Nov 22 '18 at 5:38
3
  • The file content will be the same after copying from ext4 to NTFS.

  • But the permissions and ownership are often modified.

  • If the performance depends on permissions or ownership, there might be problems after copying.

  • There may be protection against executing programs from an external drive.

  • If you try to use the file in the other operative system (Windows), you cannot expect an executable file or symbolic link to work, but data files, for example documents, pictures and video clips can be expected to work.

Edit:

I tested with executable files, the compiled program htop and the set of shellscripts mkusb.

  • Operating system: persistent live Ubuntu 18.10 created with mkusb.

  • File system: Partition number 1 with NTFS, mounted as /media/ubuntu/usbdata

Commands:

sudo add-apt-repository ppa:mkusb/unstable
sudo apt install mkusb usb-pack-efi 
sudo apt install htop
which htop
cd /media/ubuntu/usbdata
ln -s /usr/bin/htop link-to-htop-in-ntfs
./link-to-htop-in-ntfs 
ln -s /usr/bin/mkusb link-to-mkusb-in-ntfs
./link-to-mkusb-in-ntfs
which mkusb-nox
cp -p /usr/sbin/mkusb-nox copy-of-mkusb-nox-in-ntfs
./copy-of-mkusb-nox-in-ntfs 
ln -s /media/ubuntu/usbdata/copy-of-mkusb-nox-in-ntfs link-to-copy-of-mkusb-nox-in-ntfs
./link-to-copy-of-mkusb-nox-in-ntfs
cp -p /usr/bin/htop htop-copied-to-ntfs
./htop-copied-to-ntfs

These commands work (while still in the persistent live Ubuntu 18.10, which is running in an external drive). In other words, executable files and symbolic links work from an NTFS file system.

But in some installed systems, execution of programs in external drives is prohibited for security reasons. This can be changed according to the following link,

Mount NTFS partition in a USB drive with custom permissions and owner

  • @Fabby, your answer is more detailed (than mine), which indicates that you have more experience of possible problems and solutions :-) – sudodus Nov 22 '18 at 5:37
  • Now with the edit: +1 But indeed, I compiled the driver from source to have all the new functionality because, well, science, but for a simple dual boot, it's not worth it because I don't use Windows often enough... – Fabby Nov 22 '18 at 8:53

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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