Java自学者论坛

 找回密码
 立即注册

手机号码,快捷登录

恭喜Java自学者论坛(https://www.javazxz.com)已经为数万Java学习者服务超过8年了!积累会员资料超过10000G+
成为本站VIP会员,下载本站10000G+会员资源,会员资料板块,购买链接:点击进入购买VIP会员

JAVA高级面试进阶训练营视频教程

Java架构师系统进阶VIP课程

分布式高可用全栈开发微服务教程Go语言视频零基础入门到精通Java架构师3期(课件+源码)
Java开发全终端实战租房项目视频教程SpringBoot2.X入门到高级使用教程大数据培训第六期全套视频教程深度学习(CNN RNN GAN)算法原理Java亿级流量电商系统视频教程
互联网架构师视频教程年薪50万Spark2.0从入门到精通年薪50万!人工智能学习路线教程年薪50万大数据入门到精通学习路线年薪50万机器学习入门到精通教程
仿小米商城类app和小程序视频教程深度学习数据分析基础到实战最新黑马javaEE2.1就业课程从 0到JVM实战高手教程MySQL入门到精通教程
查看: 439|回复: 0

解决ntfs格式的移动硬盘mount到Linux下时变成只读文件系统的问题

[复制链接]
  • TA的每日心情
    奋斗
    昨天 13:07
  • 签到天数: 783 天

    [LV.10]以坛为家III

    2049

    主题

    2107

    帖子

    72万

    积分

    管理员

    Rank: 9Rank: 9Rank: 9

    积分
    720996
    发表于 2021-6-12 14:21:47 | 显示全部楼层 |阅读模式

    环境介绍

    主机: XP

    虚拟机:VirtualBox+Debian6

    遇到的问题

    我有一块西部数据的移动硬盘,虚拟机中有一些资料需要拷贝到移动硬盘中,然后我将移动硬盘插上后,执行如下设置,将移动硬盘分配给虚拟机:

    然后就会将我的移动硬盘自动挂载到Debian中:

     

    但是当我在/media/work下想创建一个文件夹时出现如下提示:

    mkdir: 无法创建目录"debian_source": 只读文件系统

     

    解决办法

    安装工具:

    sudo apt-get install ntfs-config

     

    对linux系统而言,USB接口的移动硬盘是当作SCSI设备对待的。插入移动硬盘之前,应先用fdisk –l 或 more /proc/partitions查看系统的硬盘和硬盘分区情况。 

    复制代码
    pengdl@debian:~$ sudo fdisk -l
    [sudo] password for pengdl: 
    

    Disk /dev/sda: 21.5 GB, 21474836480 bytes
    255 heads, 63 sectors/track, 2610 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:
    0x0002d31b

    Device Boot Start End Blocks Id System
    /dev/sda1 1 2250 18065408 83 Linux
    /dev/sda2 2250 2611 2903041 5 Extended
    /dev/sda5 2250 2611 2903040 82 Linux swap / Solaris

    Disk /dev/sdb: 21.5 GB, 21474836480 bytes
    255 heads, 63 sectors/track, 2610 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:
    0x0005af5f

    Device Boot Start End Blocks Id System
    /dev/sdb1 1 2611 20969473 5 Extended
    /dev/sdb5 1 2611 20969472 83 Linux

    Disk /dev/sdc: 107.4 GB, 107374182400 bytes
    255 heads, 63 sectors/track, 13054 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:
    0x00081b96

    Device Boot Start End Blocks Id System
    /dev/sdc1 1 13055 104855553 5 Extended
    /dev/sdc5 1 13055 104855552 83 Linux

    Disk /dev/sdd: 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:
    0x8196b6c7

    Device Boot Start End Blocks Id System
    /dev/sdd1 1 6527 52428096 83 Linux
    pengdl@debian:
    ~$

    复制代码

     

    接好移动硬盘后,再用fdisk –l 或 more /proc/partitions查看系统的硬盘和硬盘分区情况 

    复制代码
    pengdl@debian:~$ sudo fdisk -l
    [sudo] password for pengdl: 
    

    Disk /dev/sda: 21.5 GB, 21474836480 bytes
    255 heads, 63 sectors/track, 2610 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:
    0x0002d31b

    Device Boot Start End Blocks Id System
    /dev/sda1 1 2250 18065408 83 Linux
    /dev/sda2 2250 2611 2903041 5 Extended
    /dev/sda5 2250 2611 2903040 82 Linux swap / Solaris

    Disk /dev/sdb: 21.5 GB, 21474836480 bytes
    255 heads, 63 sectors/track, 2610 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:
    0x0005af5f

    Device Boot Start End Blocks Id System
    /dev/sdb1 1 2611 20969473 5 Extended
    /dev/sdb5 1 2611 20969472 83 Linux

    Disk /dev/sdc: 107.4 GB, 107374182400 bytes
    255 heads, 63 sectors/track, 13054 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:
    0x00081b96

    Device Boot Start End Blocks Id System
    /dev/sdc1 1 13055 104855553 5 Extended
    /dev/sdc5 1 13055 104855552 83 Linux

    Disk /dev/sdd: 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:
    0x8196b6c7

    Device Boot Start End Blocks Id System
    /dev/sdd1 1 6527 52428096 83 Linux

    Disk /dev/sde: 1000.2 GB, 1000170586112 bytes
    255 heads, 63 sectors/track, 121597 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:
    0x00023f15

    Device Boot Start End Blocks Id System
    /dev/sde1 1 26109 209715200 7 HPFS/NTFS
    /dev/sde2 26109 121598 767012864 f W95 Ext'd (LBA)
    /dev/sde5 26109 121598 767012832+ 7 HPFS/NTFS
    pengdl@debian:
    ~$

    复制代码

    大家应该可以发现多了一个SCSI硬盘/dev/sde和它的两个磁盘分区/dev/sde1、/dev/sde2,其中/dev/sde5是/dev/sde2分区的逻辑分区。有的系统支持自动挂载,可以通过mount命令查看自动挂载的目录:

    复制代码
    pengdl@debian:~$ mount
    /dev/sda1 on / type ext3 (rw,errors=remount-ro)
    tmpfs on /lib/init/rw type tmpfs (rw,nosuid,mode=0755)
    proc on /proc type proc (rw,noexec,nosuid,nodev)
    sysfs on /sys type sysfs (rw,noexec,nosuid,nodev)
    udev on /dev type tmpfs (rw,mode=0755)
    tmpfs on /dev/shm type tmpfs (rw,nosuid,nodev)
    devpts on /dev/pts type devpts (rw,noexec,nosuid,gid=5,mode=620)
    /dev/sdc5 on /home type ext3 (rw)
    /dev/sdb5 on /usr type ext3 (rw)
    /dev/sdd1 on /home/pengdl/ext_disk type ext3 (rw)
    rpc_pipefs on /var/lib/nfs/rpc_pipefs type rpc_pipefs (rw)
    nfsd on /proc/fs/nfsd type nfsd (rw)
    share on /media/sf_share type vboxsf (gid=1001,rw)
    /dev/sde1 on /media/entertainment type fuseblk (rw,nosuid,nodev,allow_other,blksize=4096,default_permissions)
    /dev/sde5 on /media/work type fuseblk (rw,nosuid,nodev,allow_other,blksize=4096,default_permissions)
    pengdl@debian:~$ 
    复制代码

    可以看到自动挂载到了/media/entertainment 和 /media/work下。进入/media/work下,发现已经可以执行写操作了。

    对于不支持自动挂载的,需要进行手动挂载:

     

    复制代码
    #mkdir -p /mnt/usbhd1 

    mount -t ntfs /dev/sdc1 /mnt/usbhd1

    注:对ntfs格式的磁盘分区应使用-t ntfs 参数。若汉字文件名显示为乱码或不显示,可以使用下面的命令格式。

    mount -t ntfs -o iocharset=cp936 /dev/sdc1 /mnt/usbhd1

    复制代码

     

    原文地址:https://www.cnblogs.com/pengdonglin137/p/3477869.html

     

    哎...今天够累的,签到来了1...
    回复

    使用道具 举报

    您需要登录后才可以回帖 登录 | 立即注册

    本版积分规则

    QQ|手机版|小黑屋|Java自学者论坛 ( 声明:本站文章及资料整理自互联网,用于Java自学者交流学习使用,对资料版权不负任何法律责任,若有侵权请及时联系客服屏蔽删除 )

    GMT+8, 2024-8-24 09:48 , Processed in 0.063443 second(s), 29 queries .

    Powered by Discuz! X3.4

    Copyright © 2001-2021, Tencent Cloud.

    快速回复 返回顶部 返回列表