Ntfs-3g

From M1Research

(Difference between revisions)
Jump to: navigation, search
(Mounting ntfs partitions)
 
(2 intermediate revisions not shown)
Line 1: Line 1:
 +
== Mounting ntfs partitions in linux ==
 +
For mounting ntfs partitions under linux we will use ntfs-3g package, which can be downloaded for example from search page http://rpm.pbone.net/
For mounting ntfs partitions under linux we will use ntfs-3g package, which can be downloaded for example from search page http://rpm.pbone.net/
Line 5: Line 7:
'''1. Current work directory'''
'''1. Current work directory'''
-
          [root@bm rpms]# pwd
+
      [root@bm rpms]# pwd
-
          /usr/src/rpms
+
      /usr/src/rpms
'''2. Download ntfs-3g-devel-1.913-2.fc6.i386.rpm :'''
'''2. Download ntfs-3g-devel-1.913-2.fc6.i386.rpm :'''
Line 151: Line 153:
       LABEL=/var1            /var                    ext3    defaults        1 2
       LABEL=/var1            /var                    ext3    defaults        1 2
       LABEL=SWAP-hda10        swap                    swap    defaults        0 0
       LABEL=SWAP-hda10        swap                    swap    defaults        0 0
-
       /dev/hda1         /mnt/drive_c            ntfs-3g rw,uid=1000    0 0
+
       /dev/hda1       /mnt/drive_c            ntfs-3g rw,uid=1000    0 0
-
       /dev/hda5         /mnt/drive_d            ntfs-3g rw,uid=1000    0 0
+
       /dev/hda5       /mnt/drive_d            ntfs-3g rw,uid=1000    0 0
-
       /dev/hda6         /mnt/drive_e            ntfs-3g rw,uid=1000    0 0
+
       /dev/hda6       /mnt/drive_e            ntfs-3g rw,uid=1000    0 0

Latest revision as of 12:08, 23 October 2007

Mounting ntfs partitions in linux

For mounting ntfs partitions under linux we will use ntfs-3g package, which can be downloaded for example from search page http://rpm.pbone.net/

This example is for Fedora 6.

1. Current work directory

     [root@bm rpms]# pwd
     /usr/src/rpms

2. Download ntfs-3g-devel-1.913-2.fc6.i386.rpm :

     [root@bm rpms]# wget ftp://mirror.switch.ch/mirror/fedora/linux/extras/6/i386/ntfs-3g-devel-1.913-2.fc6.i386.rpm
     --11:39:08--  ftp://mirror.switch.ch/mirror/fedora/linux/extras/6/i386/ntfs-3g-devel-1.913-2.fc6.i386.rpm
     => `ntfs-3g-devel-1.913-2.fc6.i386.rpm'
     Resolving mirror.switch.ch... 130.59.10.35, 130.59.10.34, 2001:620:0:8:203:baff:fe52:38e6, ...
     Connecting to mirror.switch.ch|130.59.10.35|:21... connected.
     Logging in as anonymous ... Logged in!
     ==> SYST ... done.    ==> PWD ... done.
     ==> TYPE I ... done.  ==> CWD /mirror/fedora/linux/extras/6/i386 ... done.
     ==> SIZE ntfs-3g-devel-1.913-2.fc6.i386.rpm ... 61648
     ==> PASV ... done.    ==> RETR ntfs-3g-devel-1.913-2.fc6.i386.rpm ... done.
     Length: 61648 (60K)
     100%[===========================================>] 61,648      20.4K/s   in 3.0s   
     11:39:30 (20.4 KB/s) - `ntfs-3g-devel-1.913-2.fc6.i386.rpm' saved [61648]

3. Now we will try to install downloaded package:

     [root@bm rpms]# rpm -vhi ntfs-3g-devel-1.913-2.fc6.i386.rpm
     warning: ntfs-3g-devel-1.913-2.fc6.i386.rpm: Header V3 DSA signature: NOKEY, key ID 1ac70ce6
     error: Failed dependencies:
                  libntfs-3g.so.12 is needed by ntfs-3g-devel-1.913-2.fc6.i386
                  ntfs-3g = 2:1.913-2.fc6 is needed by ntfs-3g-devel-1.913-2.fc6.i386

but we see that some failed dependencies are present, so we will try to find them and then continue installation.

3.1 Download ntfs-3g = 2:1.913-2.fc6

     [root@bm rpms]# wget ftp://mirror.switch.ch/mirror/fedora/linux/extras/6/i386/ntfs-3g-1.913-2.fc6.i386.rpm
     --11:43:06--  ftp://mirror.switch.ch/mirror/fedora/linux/extras/6/i386/ntfs-3g-1.913-2.fc6.i386.rpm
             => `ntfs-3g-1.913-2.fc6.i386.rpm'
     Resolving mirror.switch.ch... 130.59.10.34, 130.59.10.35, 2001:620:0:8:203:baff:fe52:38e6, ...
     Connecting to mirror.switch.ch|130.59.10.34|:21... connected.
     Logging in as anonymous ... Logged in!
     ==> SYST ... done.    ==> PWD ... done.
     ==> TYPE I ... done.  ==> CWD /mirror/fedora/linux/extras/6/i386 ... done.
     ==> SIZE ntfs-3g-1.913-2.fc6.i386.rpm ... 148836
     ==> PASV ... done.    ==> RETR ntfs-3g-1.913-2.fc6.i386.rpm ... done.
     Length: 148836 (145K)
     100%[===========================================>] 148,836     33.1K/s   in 4.4s   
     11:43:13 (33.1 KB/s) - `ntfs-3g-1.913-2.fc6.i386.rpm' saved [148836]

3.2 Trying to install downloaded package:

     [root@bm rpms]# rpm -vhi ntfs-3g-1.913-2.fc6.i386.rpm
      warning: ntfs-3g-1.913-2.fc6.i386.rpm: Header V3 DSA signature: NOKEY, key ID 1ac70ce6
      error: Failed dependencies:
             fuse is needed by ntfs-3g-1.913-2.fc6.i386
             libfuse.so.2 is needed by ntfs-3g-1.913-2.fc6.i386
             libfuse.so.2(FUSE_2.2) is needed by ntfs-3g-1.913-2.fc6.i386
             libfuse.so.2(FUSE_2.5) is needed by ntfs-3g-1.913-2.fc6.i386
             libfuse.so.2(FUSE_2.6) is needed by ntfs-3g-1.913-2.fc6.i386

but failed depencies appears again. For full install of ntfs-3g package fuse and fuse libs must be previously installed.

3.2.1 Download and install fuse libs :

     [root@bm rpms]# wget ftp://mirror.switch.ch/mirror/fedora/linux/extras/6/i386/fuse-libs-2.7.0-6.fc6.i386.rpm
     --12:02:03--  ftp://mirror.switch.ch/mirror/fedora/linux/extras/6/i386/fuse-libs-2.7.0-6.fc6.i386.rpm
          => `fuse-libs-2.7.0-6.fc6.i386.rpm'
     Resolving mirror.switch.ch... 130.59.10.34, 130.59.10.35, 2001:620:0:8:203:baff:fe52:38e6, ...
     Connecting to mirror.switch.ch|130.59.10.34|:21... connected.
     Logging in as anonymous ... Logged in!
     ==> SYST ... done.    ==> PWD ... done.
     ==> TYPE I ... done.  ==> CWD /mirror/fedora/linux/extras/6/i386 ... done.
     ==> SIZE fuse-libs-2.7.0-6.fc6.i386.rpm ... 71916
     ==> PASV ... done.    ==> RETR fuse-libs-2.7.0-6.fc6.i386.rpm ... done.
     Length: 71916 (70K)
     100%[==========================================>] 71,916      80.5K/s   in 0.9s   
     12:02:22 (80.5 KB/s) - `fuse-libs-2.7.0-6.fc6.i386.rpm' saved [71916]
     [root@bm rpms]# rpm -vhi fuse-libs-2.7.0-6.fc6.i386.rpm
     warning: fuse-libs-2.7.0-6.fc6.i386.rpm: Header V3 DSA signature: NOKEY, key ID 1ac70ce6
     Preparing...                ########################################### [100%]
        1:fuse-libs              ########################################### [100%]

3.2.2 Download and install fuse :

     [root@bm rpms]# wget ftp://mirror.switch.ch/mirror/fedora/linux/extras/6/i386/fuse-2.7.0-6.fc6.i386.rpm
     --13:00:34--  ftp://mirror.switch.ch/mirror/fedora/linux/extras/6/i386/fuse-2.7.0-6.fc6.i386.rpm
                   => `fuse-2.7.0-6.fc6.i386.rpm'
     Resolving mirror.switch.ch... 130.59.10.34, 130.59.10.35, 2001:620:0:8:203:baff:fe52:38e5, ...
     Connecting to mirror.switch.ch|130.59.10.34|:21... connected.
     Logging in as anonymous ... Logged in!
     ==> SYST ... done.    ==> PWD ... done.
     ==> TYPE I ... done.  ==> CWD /mirror/fedora/linux/extras/6/i386 ... done.
     ==> SIZE fuse-2.7.0-6.fc6.i386.rpm ... 82098
     ==> PASV ... done.    ==> RETR fuse-2.7.0-6.fc6.i386.rpm ... done.
     Length: 82098 (80K)
     100%[===========================================>] 82,098      35.9K/s   in 2.2s   
     13:00:57 (35.9 KB/s) - `fuse-2.7.0-6.fc6.i386.rpm' saved [82098]
     [root@bm rpms]# rpm -vhi fuse-2.7.0-6.fc6.i386.rpm
     warning: fuse-2.7.0-6.fc6.i386.rpm: Header V3 DSA signature: NOKEY, key ID 1ac70ce6
     Preparing...                ########################################### [100%]
        1:fuse                   ########################################### [100%]

4. And finally installing ntfs-3g and ntfs-3g-devel :

     [root@bm rpms]# rpm -vhi ntfs-3g-1.913-2.fc6.i386.rpm
     warning: ntfs-3g-1.913-2.fc6.i386.rpm: Header V3 DSA signature: NOKEY, key ID 1ac70ce6
     Preparing...                ########################################### [100%]
        1:ntfs-3g                ########################################### [100%]
     [root@bm rpms]# rpm -vhi ntfs-3g-devel-1.913-2.fc6.i386.rpm
     warning: ntfs-3g-devel-1.913-2.fc6.i386.rpm: Header V3 DSA signature: NOKEY, key ID 1ac70ce6
     Preparing...                ########################################### [100%]
        1:ntfs-3g-devel          ########################################### [100%]

5. Now checking if really ntfs-3g installed in the system :

     [root@bm rpms]# rpm -qa | grep ntfs
     ntfs-3g-1.913-2.fc6
     ntfs-3g-devel-1.913-2.fc6

6. How to use ntfs-3g.

There are two ways to use ntfs-3g for mounting ntfs partitions:

6.1 In the terminal command line we can type

     [root@bm rpms]# ntfs-3g /dev/hda1 /mnt/drive_c
     or
     [root@bm rpms]# mount -t ntfs-3g /dev/hda1 /mnt/drive_c

for mounting windows system partition ( C: drive under windows ).

6.2 Also we can put some strings into /etc/fstab file, and partitions will be mounted on system startup:

     [root@bm etc]# cat fstab
     LABEL=/1                /                       ext3    defaults        1 1
     LABEL=/boot1            /boot                   ext3    defaults        1 2
     devpts                  /dev/pts                devpts  gid=5,mode=620  0 0
     tmpfs                   /dev/shm                tmpfs   defaults        0 0
     LABEL=/home1            /home                   ext3    defaults        1 2
     LABEL=/opt1             /opt                    ext3    defaults        1 2
     proc                    /proc                   proc    defaults        0 0
     sysfs                   /sys                    sysfs   defaults        0 0
     LABEL=/tmp1             /tmp                    ext3    defaults        1 2
     LABEL=/usr1             /usr                    ext3    defaults        1 2
     LABEL=/usr/local1       /usr/local              ext3    defaults        1 2
     LABEL=/var1             /var                    ext3    defaults        1 2
     LABEL=SWAP-hda10        swap                    swap    defaults        0 0
     /dev/hda1   	     /mnt/drive_c            ntfs-3g rw,uid=1000     0 0
     /dev/hda5   	     /mnt/drive_d            ntfs-3g rw,uid=1000     0 0
     /dev/hda6   	     /mnt/drive_e            ntfs-3g rw,uid=1000     0 0
Personal tools