Loading of NTFS hard disk under Linux

Source: Internet
Author: User
Tags disk usage

Questions:
# Mount–t ntfs/dev/sdb1/mnt/
Mount:unknown filesystem type ' NTFS '
This is due to the inability to recognize NTFS-formatted partitions on CentOS release 5.5 (Final).

Workaround:
Solved by using ntfs-3g.
Open ntfs-3g Download point http://www.tuxera.com/community/ntfs-3g-download/, download the latest stable (currently the latest version is ntfs-3g-2011.1.15) to CentOS, Execute the following command to install:
1) Compile and install ntfs-3g:

# tar ZXVF ntfs-3g-2011.1.15.tgz

# CD ntfs-3g-2011.1.15

#./configure

#make

#make Install

The installation is complete!!


1. Mount Command
mount -t 文件格式 -o 选项参数 磁盘分区挂载点目录名
For example: Mount-t vfat-o iocharset=utf8,umask=000/dev/hda5/mnt/d
Again such as: Mount-t ntfs-o NLS=UTF8,UMASK=000/DEV/HDD1/MNT/SYSC
But here comes the problem, first of all my system does not recognize the file format NTFS, followed by you will ask: "How do you know that the plug-in system disk C is HDD1?" Yes, please continue ...

>>2. Determine which partition is NTFS-formatted and load the NTFS partition;
>>[[email protected] kalon]#/sbin/fdisk-l L

disk/dev/sda:120.0 GB, 120034123776 bytes
255 heads, Sectors/track, 14593 cylinders
Units = Cylinders of 16065 * 8225280 bytes
Sector size (logical/physical): bytes/512 bytes
I/O size (minimum/optimal): bytes/512 bytes
Disk identifier:0x21d3ce88

Device Boot Start End Blocks Id System
/DEV/SDA1 * 1 204800 Linux
Partition 1 does not end on cylinder boundary.
/dev/sda2 5223 14593 75272557+ f W95 Ext ' d (LBA)
/dev/sda3 4700 37544960 Linux
/DEV/SDA4 4700 5222 4194304, Linux Swap/solaris
/dev/sda5 5223 14593 75272526 7 hpfs/ntfs

Partition table entries is not in disk order

disk/dev/sdb:160.0 GB, 160041885696 bytes
255 heads, Sectors/track, 19457 cylinders
Units = Cylinders of 16065 * 8225280 bytes
Sector size (logical/physical): bytes/512 bytes
I/O size (minimum/optimal): bytes/512 bytes
Disk identifier:0xf0b1ebb0

Device Boot Start End Blocks Id System
/DEV/SDB1 * 1 2611 20972826 7 hpfs/ntfs
/DEV/SDB2 2612 19456 135307462+ f W95 Ext ' d (LBA)
/DEV/SDB5 2612 5875 26218048+ 7 hpfs/ntfs
/DEV/SDB6 5876 15539 77626048+ 7 hpfs/ntfs
/DEV/SDB7 15540 19456 31463271 7 hpfs/ntfs

..... ..... ..... ..... ..... ..... ..... ..... ..... ....... .......... ..... ..... ..... ..... ..... ..... ..... ..... ..... ...... ....... .......
Now the loading process of the partition into NTFS; With the above view, we know that/DEV/SDA5 is in NTFS format;
1] We are going to build a directory of mount points, for example, to build a  win1  directory under the/mnt/directory:  
[[email protected] kalon]# mkdir/mnt/win1 
2] Mount/dev/ sda5  to/mnt/ win1  , so that if we look at the contents of the/DEV/ SDA5 disk, it will be found in the/mnt/ win1 ;  
[[email protected] Kalon ]#  mount-t ntfs-3g-o nls=utf8,umask=000/dev/sda5/mnt/win1
Note:  -t NTFS The format of the file system is NTFS, and-O is the option, Nls=utf8, meaning native Language support (local language supported) is UTF8, which is commonly said language encoding, can also be replaced by Iocharset=utf8;fedora Core 4.0 The default language encoding is UTF8, this can be displayed in Chinese, umask=000 means that all user groups are readable writable, but because NTFS write in Linux is not secure, so can only read, not write; Is the
mounted properly? ....
2.DH-LH Disk usage command  
>>[[email protected] kalon]# df-lh

File system               capacity   used   available percent mount points
/dev/sda3              36G  4.4G    30g  13%/
tmpfs                 1012m  1.7M 1010m   1%/dev/shm
/dev/sda1              194m   24m  161m  13%/boot

/dev/sda5 72G 1.4G 71G 2%/mnt/win1
.......................... The description has been mounted well, you can cd/mnt/sysc/to see, the rest of me will not say more ......... ............
......................................................................................................................... ...................................
>> boot partition auto mount: The command should be put into the/etc/fstab
/dev/sda5/mnt/win1ntfs-3g Umask=000,iocharset=utf8 0 0
>>cp-r-F Srcdir dstdir//Copy directory file
>>RM-RF dstdir//delete directory files
>>, ...
2.umount command

If you want to uninstall a directory or drive letter that is already mounted, you can enter the following command:

[Email protected] kalon]# umount/mnt/win1

Loading of NTFS hard disk under Linux

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.