How to mount ntfs external USB drive to CentOS 5,CentOS挂载移动硬盘

今天用CentOS挂载移动硬盘除了一些问题,就google了一下,这篇文章解决了我的问题。

3Q!

加粗部分为操作的command!!

This will make READONLY NTFS External USD Drive for Linux Operating System. You cannot write from Linux! 实际上可以读写的!!!

I just tried, it took me 15-30 minutes to start and setup.
Hence, this is workable solution. If you have any issues, update in comment.
I will try to help you!

First you need ntfs mount. For that you need to install two packages.

1、This gets your ntfs-3g

wget http://marush.com/wp-content/uploads/2009/03/ntfs-3g-200921-el5i686.rpm

Then run to install ntfs-3g

rpm -ihv  ntfs-3g-200921-el5i686.rpm

Second get this fuse (I do not know why. Without fuse you can not mount ntfs-3g. Please go through fuse sourceforge document.)

mount /dev/sdb1 /500gb -t ntfs-3g -r -o umask=0222

已经可以开始读文件了,但不能写!

2、wget http://superb-east.dl.sourceforge.net/sourceforge/fuse/fuse-2.6.0.tar.gz

如果下载不到可以google一下,我下载的是2.7.4版本

Then execute the following

tar xvfz fuse-2.7.4.tar
It creates a directory “fuse-2.7.4″

cd fuse-2.7.4

Execute

./configure
make
make install

3、测试

Then try

fdisk -l /dev/hda

You get

[root@prod soft]# fdisk -l /dev/hda

Disk /dev/hda: 536 MB, 536870912 bytes
32 heads, 63 sectors/track, 520 cylinders
Units = cylinders of 2016 * 512 = 1032192 bytes

Device Boot  Start  End  Blocks  Id  System
/dev/hda1  1  20  20128+  7  HPFS/NTFS
/dev/hda2  21  40  20160  4  FAT16 <32M
/dev/hda3  41  121  81648  b  W95 FAT32

Mount with following command.
Here you go!

mkdir /mnt/ntfs

mount /dev/sdb1 /500gb -t ntfs-3g -r -o umask=0222

mount -t ntfs-3g /dev/hda1 /mnt/ntfs

cd /mnt/ntfs

cp 20m.txt test.txt

cd /

umount /mnt/ntfs

mount -t ntfs-3g /dev/hda1 /mnt/ntfs

cat /mnt/ntfs/test.txt

Check your drive now

你可能感兴趣的:(linux,centos,command,Google,System,Go)