FC6中挂载NTFS分区的问题
安装ntfs-3g
yum install ntfs-3g
执行完如上的命令后,以root身份新建文件/sbin/mount.ntfs
并在mount.ntfs文件里如下代码:
#!/bin/sh
export LANG=en_US.UTF-8
exec /sbin/mount.ntfs-3g "$@"
然后执行如下的命令:
[root@localhost ~]# #chmod a+x /sbin/mount.ntfs
最后就是编辑/etc/fstab文件,我的fstab如下:
LABEL=/ / ext3 defaults 1 1
LABEL=/boot /boot ext3 defaults 1 2
devpts /dev/pts devpts gid=5,mode=620 0 0
tmpfs /dev/shm tmpfs defaults 0 0
proc /proc proc defaults 0 0
sysfs /sys sysfs defaults 0 0
LABEL=SWAP-hda13 swap swap defaults 0 0
/dev/hda1 /mnt/c ntfs-3g defaults 0 0
/dev/hda5 /mnt/d vfat defaults 0 0
/dev/hda6 /mnt/e vfat defaults 0 0
/dev/hda7 /mnt/f vfat defaults 0 0
/dev/hda8 /mnt/g ntfs-3g umask=000,nls=utf8
/dev/hda9 /mnt/h vfat defaults 0 0
/dev/hda10 /mnt/i vfat defaults 0 0
/dev/hda11 /mnt/j vfat defaults 0 0
现在的问题是无法自动加载ntfs格式的分区,但是可以手动加载,并且有完全的权限。
手动加载为
mount -t ntfs-3g -o nls=utf8,umask=000 /dev/hda1 /mnt/c
我的分区情况如下
[root@localhost ~]# fdisk -l
Disk /dev/hda: 160.0 GB, 160041885696 bytes
255 heads, 63 sectors/track, 19457 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Device Boot Start End Blocks Id System
/dev/hda1 * 1 1274 10233373+ 7 HPFS/NTFS
/dev/hda2 1275 19456 146046915 f W95 Ext'd (LBA)
/dev/hda5 1275 1911 5116671 b W95 FAT32
/dev/hda6 1912 4461 20482843+ b W95 FAT32
/dev/hda7 4462 7011 20482843+ b W95 FAT32
/dev/hda8 7012 9561 20482843+ 7 HPFS/NTFS
/dev/hda9 12112 14661 20482843+ b W95 FAT32
/dev/hda10 14662 17211 20482843+ b W95 FAT32
/dev/hda11 17212 19456 18032931 b W95 FAT32
/dev/hda12 9562 9599 305203+ 83 Linux
/dev/hda13 9600 9664 522081 82 Linux swap / Solaris
/dev/hda14 9665 12111 19655496 83 Linux
Partition table entries are not in disk order
mount 命令执行如下
[root@localhost ~]# mount
/dev/hda14 on / type ext3 (rw)
proc on /proc type proc (rw)
sysfs on /sys type sysfs (rw)
devpts on /dev/pts type devpts (rw,gid=5,mode=620)
/dev/hda12 on /boot type ext3 (rw)
tmpfs on /dev/shm type tmpfs (rw)
/dev/hda5 on /mnt/d type vfat (rw)
/dev/hda6 on /mnt/e type vfat (rw)
/dev/hda7 on /mnt/f type vfat (rw)
/dev/hda9 on /mnt/h type vfat (rw)
/dev/hda10 on /mnt/i type vfat (rw)
/dev/hda11 on /mnt/j type vfat (rw)
none on /proc/sys/fs/binfmt_misc type binfmt_misc (rw)
sunrpc on /var/lib/nfs/rpc_pipefs type rpc_pipefs (rw)
为了加载ntfs 分区,在编辑fstab文件时我试过好几种方式,上面的hda1 和hda8 的不同就是我试不同组合的结果
在每次启动的时候会有提示说加载hda1 和hda8 失败,说是文件已经存在 没有权限的问题,我 不知道应该怎么解决