Jump to Navigation

102 - Mount NTFS on an extarnal USB HDD

1. Check the device name and its partition.

# dmesg | tail -n 22

scsi18 : SCSI emulation for USB Mass Storage devices
usb-storage: device found at 3
usb-storage: waiting for device to settle before scanning
input: Western Digital My Book as /class/input/input21
input: USB HID v1.11 Device [Western Digital My Book] on usb-0000:00:1a.7-2
  Vendor: WD        Model: My Book           Rev: 1012
  Type:   Direct-Access                      ANSI SCSI revision: 04
SCSI device sdb: 1953513472 512-byte hdwr sectors (1000199 MB)
sdb: Write Protect is off
sdb: Mode Sense: 10 00 00 00
sdb: assuming drive cache: write through
SCSI device sdb: 1953513472 512-byte hdwr sectors (1000199 MB)
sdb: Write Protect is off
sdb: Mode Sense: 10 00 00 00
sdb: assuming drive cache: write through
 sdb: sdb1
sd 18:0:0:0: Attached scsi disk sdb
sd 18:0:0:0: Attached scsi generic sg2 type 0
  Vendor: WD        Model: My Book Device    Rev: 1012
  Type:   Enclosure                          ANSI SCSI revision: 04
scsi 18:0:0:1: Attached scsi generic sg3 type 13
usb-storage: device scan complete

# /sbin/fdisk -l

Disk /dev/sda: 1000.2 GB, 1000204886016 bytes
255 heads, 63 sectors/track, 121601 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

   Device Boot      Start         End      Blocks   Id  System
/dev/sda1   *           1          13      104391   83  Linux
/dev/sda2              14      121601   976655610   8e  Linux LVM

Disk /dev/sdb: 1000.1 GB, 1000198897664 bytes
255 heads, 63 sectors/track, 121600 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

   Device Boot      Start         End      Blocks   Id  System
/dev/sdb1               1      121600   976751968+   7  HPFS/NTFS

You can find /dev/sdb1 for the external HDD and it is NTFS.
When you try to mount it to a specific derectory, you get the follwoing error. You need to install a few packeges for mount.

# mount -f ntfs /dev/sdb1 /d02

mount: unknown filesystem type ‘ntfs’

2. Install packeges.

Get fuse, fuse-ntfs-3g, dkms, dkms-fuse from DAG Packeges.

   http://dag.wieers.com/rpm/packages/

Unless you find dkms-fuse in DAG, please try to get from :

  http://rpmfind.net/linux/RPM/dag/redhat/8.0/i386/dkms-fuse-2.7.2-1.nodist.rf.noarch.html

# rpm -ihv fuse-2.7.3-1.el5.rf.x86_64.rpm
# rpm -ihv fuse-ntfs-3g-1.913-1.el5.rf.x86_64.rpm3-1.el5.rf.i386.rpm
# rpm -ihv dkms-2.0.17.6-1.el5.rf.noarch.rpm
# rpm -ihv dkms-fuse-2.7.2-1.nodist.rf.noarch.rpm

As of CentOS 5.4 (kernel 2.6.18-164 or newer), the fuse kernel module is included in the kernel itself. Therefore, dkms and dkms-fuse
are no longer required. If you have previously installed dkms-fuse, please uninstall it by a yum remove dkms-fuse command.

3. Let kernel know fuse.

# modprobe fuse

4. Mount the device.

# mount -t ntfs-3g /dev/sdb1 /d02 -o force
# umount /d02

If you have a message "Device busy" :

# umount -l -f /d02

 



Main menu 2

Story | by Dr. Radut