在 CentOS 5.2 上挂载 NTFS 文件系统

发布于 2024-07-07 09:06:58 字数 1581 浏览 7 评论 0原文

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(6

在你怀里撒娇 2024-07-14 09:06:58

首先获取

fdisk -l

硬盘分区,即 /dev/sda2

,然后

mount /dev/sda2 /mnt/windows

如果失败,请尝试

yum install ntfs-3g

* 只是注意到默认情况下不包含此分区,因此您可以查看 NTFS-3g 此处,找到适合您系统的软件包。

要自动挂载,请在 /etc/fstab 中添加一行,说明

/dev/sda2      /mnt/temp     ntfs    defaults 0 0

这应该在重新启动时自动挂载

first do a

fdisk -l

get the harddrive partition, ie /dev/sda2

then

mount /dev/sda2 /mnt/windows

if this fails, try a

yum install ntfs-3g

* Just noted this is not included by default, so you can check out NTFS-3g here, and find a suitable package for your system.

to auto mount this, add a line to /etc/fstab saying

/dev/sda2      /mnt/temp     ntfs    defaults 0 0

and this should auto mount on a reboot

我不咬妳我踢妳 2024-07-14 09:06:58

回答我自己的问题:PostMan 和 mgb 引导我走上了正确的道路,但他们的答案并未包含完整的解决方案。

注意:关于这个问题的简短手册/wiki在这里:http://wiki.centos.org/TipsAndTricks/ NTFSPartitions

因此,我使用全新、裸机安装的 CentOS 5.2 和最新更新。 首先,我运行 su 命令以避免任何权限问题。

我为几个外部 NTFS 驱动器创建了挂载点:

mkdir /mnt/iomega80
mkdir /mnt/iogear250

我必须使用 fdisk 命令,但它不在我的系统中。 这是安装它的内容:

yum install util-linux

然后我运行 /sbin/fdisk -l 并找到设备名称:

Disk /dev/sdc: 250.0 GB, 250059350016 bytes
255 heads, 63 sectors/track, 30401 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

   Device Boot      Start         End      Blocks   Id  System
**/dev/sdc1**   *           1       30401   244196001    7  HPFS/NTFS

Disk /dev/sdd: 82.3 GB, 82348278272 bytes
255 heads, 63 sectors/track, 10011 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

   Device Boot      Start         End      Blocks   Id  System
**/dev/sdd1**   *           1       10011    80413326    7  HPFS/NTFS

对我来说,它们是 /dev/sdc1/dev/ sdd1

我必须安装 NTFS-3G,这是一个在 CentOS 上启用 NTFS 支持的软件包。 要安装 NTFS-3G,我首先必须将 RPMFORGE 包含在 YUM 存储库列表中。

为了将 RPMFORGE 包含在 YUM 存储库列表中,我使用了以下说明: http://rpmrepo.org/RPMforge/Using。 对于我的系统,我必须运行的两个命令是:

wget http://packages.sw.be/rpmforge-release/rpmforge-release-0.3.6-1.el5.rf.i386.rpm
rpm -Uhv rpmforge-release-0.3.6-1.el5.rf.i386.rpm 

最后,我使用此 YUM 命令安装了 NTFS-3G:

yum install fuse fuse-ntfs-3g dkms dkms-fuse

最后,我可以使用 mount 命令挂载文件系统:

mount -t ntfs-3g /dev/sdc1 /mnt/iogear250
mount -t ntfs-3g /dev/sdd1 /mnt/iomega80

通过将这两行添加到 /etc /fstab,就像之前建议的答案一样,我在启动时安装了驱动器:

/dev/sdc1               /mnt/iogear250          ntfs-3g rw,umask=0000,defaults 0 0
/dev/sdd1               /mnt/iomega80           ntfs-3g rw,umask=0000,defaults 0 0

To answer my own question: PostMan and mgb led me to the right path, but their answers did not contain complete solution.

Note: A short manual/wiki on this question is here: http://wiki.centos.org/TipsAndTricks/NTFSPartitions

So, I am using a fresh, bare install of CentOS 5.2 with latest updates. First of all, I ran the su command to avoid any permission issues.

I created mount points for a couple of external NTFS drives:

mkdir /mnt/iomega80
mkdir /mnt/iogear250

I had to use the fdisk command, but it wasn't in my system. Here's what installs it:

yum install util-linux

Then I ran /sbin/fdisk -l and found the device names:

Disk /dev/sdc: 250.0 GB, 250059350016 bytes
255 heads, 63 sectors/track, 30401 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

   Device Boot      Start         End      Blocks   Id  System
**/dev/sdc1**   *           1       30401   244196001    7  HPFS/NTFS

Disk /dev/sdd: 82.3 GB, 82348278272 bytes
255 heads, 63 sectors/track, 10011 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

   Device Boot      Start         End      Blocks   Id  System
**/dev/sdd1**   *           1       10011    80413326    7  HPFS/NTFS

For me, they are /dev/sdc1 and /dev/sdd1.

I had to install NTFS-3G, a package that enables NTFS support on CentOS. To install NTFS-3G, I first had to include RPMFORGE in YUM repository list.

To include RPMFORGE in YUM repository list, I used these instructions: http://rpmrepo.org/RPMforge/Using. For my system, the two commands I had to run were:

wget http://packages.sw.be/rpmforge-release/rpmforge-release-0.3.6-1.el5.rf.i386.rpm
rpm -Uhv rpmforge-release-0.3.6-1.el5.rf.i386.rpm 

Finally, I installed NTFS-3G using this YUM command:

yum install fuse fuse-ntfs-3g dkms dkms-fuse

At last, I could use the mount command to mount the filesystems:

mount -t ntfs-3g /dev/sdc1 /mnt/iogear250
mount -t ntfs-3g /dev/sdd1 /mnt/iomega80

By adding these two lines to /etc/fstab, like previous answers suggested, I got the drives to mount upon boot-up:

/dev/sdc1               /mnt/iogear250          ntfs-3g rw,umask=0000,defaults 0 0
/dev/sdd1               /mnt/iomega80           ntfs-3g rw,umask=0000,defaults 0 0
长不大的小祸害 2024-07-14 09:06:58

您应该已经有了可用的 ntfs,读写支持现在非常可靠。
您可以使用“mount -t ntfs /dev/sdX1 /mnt/tmp”对其进行测试,您需要知道外部磁盘被识别为哪个驱动器(检查 dmesg)并且需要创建一个挂载点。

要在每次在 /etc/fstab 中添加一行时自动挂载,请使用现有行之一作为示例 - 您必须是 root 才能执行此操作。

You should already have ntfs available, read-write support is now pretty reliable.
You can test it with "mount -t ntfs /dev/sdX1 /mnt/tmp" you need to know what drive the external disk is identified as (check dmesg) and you need to make a mount point.

To mount automatically everytime put a line in /etc/fstab, use one of the existing lines as an example - you will have to be root to do this.

第几種人 2024-07-14 09:06:58

您忘记提及安装保险丝等后需要重新启动。

You forgot to mention that you need to do a reboot after installing fuse, etc.

只有一腔孤勇 2024-07-14 09:06:58

首先启用存储库 Epel

yum install epel-release

然后安装 ntfs

yum install ntfs-3g

First enable the repository Epel

yum install epel-release

Then install ntfs

yum install ntfs-3g
野鹿林 2024-07-14 09:06:58
  • 启用 EPEL 存储库

yum -y install epel-release

  • 安装 ntfs-3g

yum -y install ntfs-3g

  • 更新 Grub

grub2-mkconfig -o /boot/grub2/grub.cfg

  • Enable the EPEL repository

yum -y install epel-release

  • Install ntfs-3g

yum -y install ntfs-3g

  • Update Grub

grub2-mkconfig -o /boot/grub2/grub.cfg

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文