搜讯网站建设,南阳建设重要区域中心城市网站,手机网站个人中心源码,龙岗区windows U盘不能识别 1、问题描述2、问题分析解决3、把U盘插到windows电脑上试试能不能识别 1、问题描述
windwos u盘不能识别 u盘被拿到mac电脑上做了启动盘之后#xff0c;就不能被windows识别了。题主很奇怪里面被mac电脑的同学放了什么#xff0c;因此想到把优盘挂载到L… windows U盘不能识别 1、问题描述2、问题分析解决3、把U盘插到windows电脑上试试能不能识别 1、问题描述
windwos u盘不能识别 u盘被拿到mac电脑上做了启动盘之后就不能被windows识别了。题主很奇怪里面被mac电脑的同学放了什么因此想到把优盘挂载到Linux上一探究竟。
2、问题分析解决
题主使用的linux系统是centos 7.6。 把优盘插接入到lnux系统上如图 使用 fdisk -l 命令查看优盘设备 是/dev/sdb
fdisk -l 挂载优盘
建立挂载点
mkdir /ugreen挂载优盘
mount /dev/sdb /ugreen提示 mount: /dev/sdb is write-protected, mounting read-only 就是说这个优盘是只读的 不能写入
使用mount命令的 remount选项 再次挂载优盘 挂载选项指定为可读可写
mount -o remount,rw /dev/sdb /ugreen这个命令查看mount的man手册即可得到
man mountremount 报错 mount: cannot remount /dev/sdb read-write, is write-protected
至此联想到之前刚挂载好优盘后 使用df -lTh 命令查看过 优盘的文件系统类型 显示为lSO9660 这是光盘文件系统 而lSO9660这个光盘文件系统 设计上本来就是不能被二次写入的 参考链接: https://superuser.com/questions/1235833/how-to-make-a-usb-stick-with-iso9660-filesystem-writeable-again 至此想要以读写方式挂载优盘并复制其中的数据变得不可能了。为了能在windows系统上识别到这个优盘可以在Linux上把这个优盘格式化成NTFS格式。
下面进行格式化这个优盘 格式化成ntfs需要使用mkfs.ntfs 这个命令题主使用的是centos 7.6没有这个命令。
通过一下命令安装mkfs.ntfs 这个命令. 安装ntfsprogs 和 ntfs-3g
yum install ntfsprogs
yum install ntfs-3g如果提示找不到ntfsprogs和ntfs-3g安装包则执行下面命令后再继续安装上面两个包。
yum -y install epel-release再次安装ntfsprogs 和 ntfs-3g
yum install ntfsprogs
yum install ntfs-3g然后就有mkfs.ntfs 这个命令了 执行格式化命令 格式化之前 请确认 U盘没有挂载到系统上
mkfs.ntfs /dev/sdb报错 /dev/sdb is entire device, not just one partition. Refusing to make a filesystem here!
由于这块优盘没有分区因此不能格式化。需要先使用fdisk命令在优盘上创建分区 再格式化这个分区即可。 参考链接: https://unix.stackexchange.com/questions/476597/cant-format-usb-storage-at-dev-sdb 接下来先试用fdisk命令在优盘上创建分区
[rootlocalhost /]# fdisk /dev/sdb
Welcome to fdisk (util-linux 2.23.2).Changes will remain in memory only, until you decide to write them.
Be careful before using the write command.Device does not contain a recognized partition table
Building a new DOS disklabel with disk identifier 0xf7cbdf46.Command (m for help): n
Partition type:p primary (0 primary, 0 extended, 4 free)e extended
Select (default p): p
Partition number (1-4, default 1): 1
First sector (2048-1953525167, default 2048):
Using default value 2048
Last sector, sectors or size{K,M,G} (2048-1953525167, default 1953525167):
Using default value 1953525167
Partition 1 of type Linux and of size 931.5 GiB is setCommand (m for help): w
The partition table has been altered!Calling ioctl() to re-read partition table.
Syncing disks.
[rootlocalhost /]#
[rootlocalhost /]# fdisk -lDisk /dev/sda: 107.4 GB, 107374182400 bytes, 209715200 sectors
Units sectors of 1 * 512 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk label type: dos
Disk identifier: 0x000a17f6Device Boot Start End Blocks Id System
/dev/sda1 * 2048 616447 307200 83 Linux
/dev/sda2 616448 4812799 2098176 82 Linux swap / Solaris
/dev/sda3 4812800 209715199 102451200 83 LinuxDisk /dev/sdb: 1000.2 GB, 1000204886016 bytes, 1953525168 sectors
Units sectors of 1 * 512 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk label type: dos
Disk identifier: 0xf7cbdf46Device Boot Start End Blocks Id System
/dev/sdb1 2048 1953525167 976761560 83 Linux因为整个优盘/dev/sdb 上只有/dev/sdb1 这1个分区执行格式化命令 格式化/dev/sdb1 即可。格式化/dev/sdb1 就是/dev/sdb。
执行格式化命令
mkfs.ntfs -f /dev/sdb1至此格式化优盘成功可以插到windwos电脑上试试能不能识别了。
注意mkfs.ntfs -f /dev/sdb1 需要加上 -f 参数 不加 -f 的话 格式化会很慢很慢… -f 是快速格式化的意思 格式化后挂载优盘查看文件系统
mount /dev/sdb1 /ugreen然后 卸载掉 U盘
umount /dev/sdb13、把U盘插到windows电脑上试试能不能识别
把优盘插入windows笔记本 右下角托盘能识别到优盘了 但是文件管理器不显示优盘 至此windows已经可以是被优盘了 只是因为某种原因导致不能在文件管理器显示优盘。 win x 打开磁盘管理器 可以看到优盘 右键优盘 点击 删除卷 点 是 然后优盘 显示未分配 然后 右键优盘 新建简单卷 然后格式化后 显示状态良好主分区 然后就可以在windows 文件管理器中看到这个优盘了 至此通过linux处理后成功在windows下识别到了这个被险些玩坏的优盘。