ntfs-3g installation guide - centos 8

Installing the build dependencies:

To be able to compile and install ntfs-3g, we need to install some dependencies in our system. All we need is usually included in the Development Tools package group. For those of you who are not familiar with the package group concept, you can think of a package grous as a "meta-package", which allows us to install many related packages using just one command. To install the "Development Tools" package group we can run:

$ sudo dnf groupinstall "Development Tools"

In case we installed a minimal version of Rhel8, to be able to unpack the ntfs-3g source tarball we will also need to install tar which is (surprisingly) not included by default in the set of packages of this type of installation:

$ sudo dnf install tar

Downloading and compiling the source code:

Now that we have installed all the needed dependencies, we can proceed further and download the ntfs-3g source code. The source tarball is available at this address. We can combine the curl and tar commands to download and extract it in just one step:

$ curl https://tuxera.com/opensource/ntfs-3g_ntfsprogs-2017.3.23.tgz | tar -xvpz

After we run this command we should find that ntfs-3g_ntfsprogs-2017.3.23 folder was created:

$ ls ntfs-3g_ntfsprogs-2017.3.23

The next step is to enter this directory and run the configure script, which will prepare the source code for the actual compilation:

$ cd ntfs-3g_ntfsprogs-2017.3.23 && ./configure --prefix=/usr/local --disable-static

Launch the command above, and wait until it finishes. The next step is to actually compile the source code running:

$ make

The compilation will begin and a lot of messages will be displayed on the screen. Once the task is complete, we can proceed and install the the compiled files. Since the destination specified with --prefix, we need root privileges to perform the action:

$ sudo make install

The command will copy the compiled files in their destination directories. Binaries and system-binaries (binaries that need super user privileges to run correctly), for example, will be placed respectively under /usr/local/bin and /usr/local/sbin:

$ ls /usr/local/bin

ntfs-3g.probe  ntfscat  ntfscluster  ntfscmp  ntfsfix  ntfsinfo  ntfsls

$ ls /usr/local/sbin

mkntfs  ntfsclone  ntfscp  ntfslabel  ntfsresize  ntfsundelete

Mount a block device formatted with the ntfs filesystem:

Suppose we have the /dev/sdb1 device formatted with the ntfs filesystem, and we want to mount it to /mnt/data. Here is the command that we should run:

$ sudo mount /dev/sdb1 -t ntfs-3g /mnt/dat

  • 0 کاربر این را مفید یافتند
آیا این پاسخ به شما کمک کرد؟