[To] http://www.linuxidc.com/Linux/2012-09/70787.htm
[After self-repair]
1. Install gcc
Yum install gcc
2. Install ntfs-3g
/Home # Go To The/home directory and download the software to this directory.
Wget http://tuxera.com/opensource/ntfs-3g_ntfsprogs-2011.4.12.tgz # download
Tar zxvf ntfs-3g_ntfsprogs-2011.4.12.tgz # Extract
CD ntfs-3g_ntfsprogs-2011.4.12 # Go To The Directory
./Configure # compile
Make # Installation
Make install # Install
CD .. # Return to the upper-level directory
Rm-r-F ntfs-3g_ntfsprogs * # Delete installation package
3. View and use
Fdisk-L # display widows NTFS hard disk partition information
######################################## #############################
Disk/dev/SDA: 320.1 GB, 320072933376 bytes
255 heads, 63 sectors/track, 38913 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: 0x8e0eee9e
Device boot start end blocks ID system
/Dev/sda1*1 64 512000 83 Linux
Partition 1 does not end on cylinder boundary.
/Dev/sda2 64 38914 312057856 8e Linux LVM
Disk/dev/mapper/VolGroup-lv_root: 53.7 GB, 53687091200 bytes
255 heads, 63 sectors/track, 6527 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: 0x00000000
Disk/dev/mapper/VolGroup-lv_swap: 4261 MB, 4261412864 bytes
255 heads, 63 sectors/track, 518 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: 0x00000000
Disk/dev/SDB: 16.0 GB, 16047407104 bytes
255 heads, 63 sectors/track, 1950 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: 0x3e6c66bb
Device boot start end blocks ID system
/Dev/sdb1*1 1950 15663343 + C w95 FAT32 (LBA)
Disk/dev/mapper/VolGroup-lv_home: 261.6 GB, 261594546176 bytes
255 heads, 63 sectors/track, 31803 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: 0x00000000
Disk/dev/SDC: 1000.2 GB, 1000204886016 bytes
255 heads, 63 sectors/track, 121601 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: 0x12181f69
Device boot start end blocks ID system
/Dev/sdc1*1 121602 976759808 7 HPFs/NTFS
Disk/dev/SDD: 16.0 GB, 16047407104 bytes
94 heads, 30 sectors/track, 11114 Cylinders
Units = cylinders of 2820*512 = 1443840 bytes
Sector size (logical/physical): 512 bytes/512 bytes
I/O size (minimum/optimal): 512 bytes/512 bytes
Disk identifier: 0xc3072e18
Device boot start end blocks ID system
/Dev/sdd1*3 11115 15667264 C w95 FAT32 (LBA)
[Root @ localhost media] # fdisl-l
Bash: fdisl: Command not found
[Root @ localhost media] # fdisk-l
Disk/dev/SDA: 320.1 GB, 320072933376 bytes
255 heads, 63 sectors/track, 38913 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: 0x8e0eee9e
Device boot start end blocks ID system
/Dev/sda1*1 64 512000 83 Linux
Partition 1 does not end on cylinder boundary.
/Dev/sda2 64 38914 312057856 8e Linux LVM
Disk/dev/mapper/VolGroup-lv_root: 53.7 GB, 53687091200 bytes
255 heads, 63 sectors/track, 6527 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: 0x00000000
Disk/dev/mapper/VolGroup-lv_swap: 4261 MB, 4261412864 bytes
255 heads, 63 sectors/track, 518 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: 0x00000000
Disk/dev/SDB: 16.0 GB, 16047407104 bytes
255 heads, 63 sectors/track, 1950 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: 0x3e6c66bb
Device boot start end blocks ID system
/Dev/sdb1*1 1950 15663343 + C w95 FAT32 (LBA)
Disk/dev/mapper/VolGroup-lv_home: 261.6 GB, 261594546176 bytes
255 heads, 63 sectors/track, 31803 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: 0x00000000
Disk/dev/SDC: 1000.2 GB, 1000204886016 bytes
255 heads, 63 sectors/track, 121601 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: 0x12181f69
Device boot start end blocks ID system
/Dev/sdc1*1 121602 976759808 7 HPFs/NTFS
Disk/dev/SDD: 16.0 GB, 16047407104 bytes
94 heads, 30 sectors/track, 11114 Cylinders
Units = cylinders of 2820*512 = 1443840 bytes
Sector size (logical/physical): 512 bytes/512 bytes
I/O size (minimum/optimal): 512 bytes/512 bytes
Disk identifier: 0xc3072e18
Device boot start end blocks ID system
/Dev/sdd1*3 11115 15667264 C w95 FAT32 (LBA)
######################################## ###########################
The 1 TB mobile hard drive is in NTFS format.
4. Mount the partition.
Set
Mount/dev/sdc1 to/Media/Windows/C
Go to the/mediat directory and create/Windows/C
CD/Media
Mkdir/Windows/C
Mount-T ntfs-3g/dev/sdc1/Windows/C
After the partition is mounted, you can view the corresponding folder under the/Media Directory, that is, the partition of your mobile hard disk.
To uninstall the SDK, run the following command:
Umount/dev/sdc1 # uninstall
5. Edit the/etc/fstab file if you want to enable the system to automatically mount the mobile hard disk.
CP/etc/fstab/etc/fstabbak # back up before changing
VI/etc/fstab # Edit
Use the INSERT command to add the following information at the end to mount the disk in read/write mode.
/Dev/sdc1/Windows/C ntfs-3g default 0
Run the ESC command to exit.
: WQ! Save and exit
Now, you only need to restart the machine and the mobile hard disk will be automatically mounted.
Unmount:
The following prompt appears when umount:
# Umount/dev/sda1
Umount:/mnt/upan: device is busy.
(In some cases useful info about processes that use
The device is found by lsof (8) or Fuser (1 ))
Solution:
Root@rekfan.com/] # lsof-W/mnt/upan
Command PID user FD type device size/off node name
Bash 31761 root CWD dir 8192 2316326 120526/mnt/upan/rekfan.com _
Root@rekfan.com/] #
Using lsof-W/mnt/upan, we can see that there is a command window in the/mnt/upan/rekfan.com _ 120526 directory, close this window, or exit this mount directory, you can use umount to safely exit the mounted device!