9/12/2013

RHEL / CentOS Linux: Mount and Access NTFS Partition

How to enable NTFS support on CentOS Linux version 5 or 6? How do I mount ntfs partition under RHEL 5 or 6?

First, you need to install EPEL repo as described here. The following command will turn in EPEL repo on RHEL / CentOS version 6.x:

$ cd /tmp
$ wget http://download.fedoraproject.org/pub/epel/6/x86_64/epel-release-6-8.noarch.rpm

# rpm -ivh epel-release-6-5.noarch.rpm

NTFS-3G

NTFS-3G is a stable, open source, GPL licensed, POSIX, read/write NTFS driver for Linux. It provides safe handling of the Windows XP, Windows Server 2003, Windows 2000, Windows Vista, Windows Server 2008 and Windows 7 NTFS file systems.
NTFS-3G can create, remove, rename, move files, directories, hard links, and streams; it can read and write normal and transparently compressed files, including streams and sparse files; it can handle special files like symbolic links, devices, and FIFOs, ACL, extended attributes; moreover it provides full file access right and ownership support.

How Do I Install NTFS-3G?

Type the following command as root user:
# yum install ntfs-3g

Sample outputs:
yum install ntfs-3g
Loaded plugins: product-id, rhnplugin, subscription-manager
Updating Red Hat repositories.
Setting up Install Process
Resolving Dependencies
--> Running transaction check
---> Package ntfs-3g.x86_64 2:2011.4.12-3.el6 will be installed
--> Finished Dependency Resolution
Dependencies Resolved
===============================================================================
 Package         Arch           Version                     Repository    Size
===============================================================================
Installing:
 ntfs-3g         x86_64         2:2011.4.12-3.el6           epel         247 k
Transaction Summary
===============================================================================
Install       1 Package(s)
Total download size: 247 k
Installed size: 624 k
Is this ok [y/N]:

How Do I Find Out NTFS Partition Name?

Simply type the following command:
# fdisk -l /dev/sda
# fdisk -l /dev/sdb

Sample outputs:
Disk /dev/sda: 500.1 GB, 500107862016 bytes
255 heads, 63 sectors/track, 60801 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0xf0000000
   Device Boot      Start         End      Blocks   Id  System
/dev/sda1   *           1          13      102400    7  HPFS/NTFS
Partition 1 does not end on cylinder boundary.
/dev/sda2              14       60802   488281089    5  Extended
/dev/sda5              14       59767   479970304   83  Linux
/dev/sda6           59767       60802     8309760   82  Linux swap / Solaris

How Do I Mount /dev/sda1 NTFS Partition at /mnt/ntfs?

First, load the fuse driver, enter:
# modprobe fuse
Create a mount point, enter:
# mkdir /mnt/ntfs
To mount the ntfs partition, enter:
# mount -t ntfs-3g /dev/sda1 /mnt/ntfs
You can use regular Unix commands to copy or access the files:
$ df -h
$ mount
$ cd /mnt/ntfs
$ cp foo /tmp

How Do I Unmount NTFS Partition?

Type the following command:
# umount /mnt/ntfs


*source from internet

9/10/2013

一個故事

一個故事 <無名>
 
在一個小村莊中,有一個年輕人從小就生活在其中,每天看見父親辛勞的工作,每天大清早就起來出海打魚,母親就在家照顧他們衆兄弟;有時候,父親更要好幾天才回家,他時會有豐盛的收獲,時而卻只是得着魚毛幾條,他們一家的生活從沒保障的。

在那村莊有一個關於海的傳說:「只要出海找到海龍神,用至真至成的心打動祂,祂就會給那人三個願望,實現那人的夢想;但那裡的人從來沒有一個見過海龍神,更沒有人知道往那去找尋這傳說中的海龍神,一切一切也只不過是一個遠古遺下來的傳說。」

記得那天天氣晴朗,陽光普照,萬物散發著無限的生機,在海邊有一個人正推着一隻小船--準備出海,在岸上有很外人看似是來送行,但卻......;很多人看著那人而相互的竊竊私語,好像取笑他這次的出海,但奇怪的是當中又有一些人為他熱烈歡呼;不過,當然為他歡呼的人只是零星落朔,就連他的家人反應也是好壞參半;但那人卻好像沒有理會別人的眼光,一直繼續他出海的準備!
 
那人正是一直對那海龍神傳說深信不疑的年輕小伙子,今天他已長大了,他決定去尋找那傳說中的海龍神;他從沒有解釋為什麼要找尋海龍神,他也從沒有理會別人的眼光,他沒有介意別人的冷嘲熱諷,他只一心為要找得着海龍神,他深信只要得着海龍神祝福而回,那些從前嘲諷自己的人也會對他讃嘗,他深深明白人性的美善和醜惡。所以他看似對一切的批評也不在乎。

終於,那年輕小伙子要離開那小島去追尋那傳說中的祝福了;他道別家中的每一位,各人雖帶着依依不捨的心,但每一位仍祝福那小伙子,仍叮囑他萬事小心,家的門隨時為他而開的,那小伙子最後帶着一絲絲的淚水,為着他的夢想出發,為那未知的地方而航行。

小船慢慢地在衆人眼中消失了,今天的陽光雖温暖,但在小伙子家人身上卻感受不到一點的暖意,因那從心底擁上來的憂心掛念已把陽光給他們的暖意一一驅散了。在他們的心底同樣只冀盼這小伙子平安回來,他能否找着海龍神,得着祝福已是不重要了......
......待續