CentOS系统挂载FAT32的U盘
Linux挂载U盘步骤如下
1:将U盘插入USB接口,检查是否插好
2:用fdisk命令检查分区和USB设备信息
[root@wgods ~]# fdisk -l
Disk /dev/sda: 1000.2 GB, 1000204886016 bytes
255 heads, 63 sectors/track, 121601 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Device Boot Start End Blocks Id System
/dev/sda1 * 1 13 104391 83 Linux
/dev/sda2 14 121601 976655610 8e Linux LVM
Disk /dev/sdb: 4012 MB, 4012900352 bytes
223 heads, 55 sectors/track, 639 cylinders
Units = cylinders of 12265 * 512 = 6279680 bytes
Device Boot Start End Blocks Id System
/dev/sdb1 * 56 640 3580928 c W95 FAT32 (LBA)
Partition 1 has different physical/logical beginnings (non-Linux?):
phys=(42, 17, 40) logical=(55, 23, 1)
Partition 1 has different physical/logical endings:
phys=(487, 222, 55) logical=(639, 6, 31)
通过上面信息我们可以看出USB设备是FAT32格式的,标识为/dev/sdb1
[root@wgods ~]# fdisk -l | grep FAT32
/dev/sdb1 * 56 640 3580928 c W95 FAT32 (LBA)
3:在mnt目录下先建立一个usb的目录
[root@wgods ~]# cd /mnt/
[root@wgods mnt]# mkdir usb
4:挂载U盘
[root@wgods mnt]# mount -t vfat /dev/sdb1 /mnt/usb
挂载成功后,我们可以在/mount/usb下看到相关的内容。
5:卸载U盘
执行umount命令卸载U盘时,报如下错误“device is busy”,可以用参数l解决问题。当然你也可以用fuser命令解决问题。如下所示
[root@wgods ~]# umount /mnt/usb
umount: /mnt/usb: device is busy
umount: /mnt/usb: device is busy
[root@wgods ~]# umount -f /mnt/usb
umount2: Device or resource busy
umount: /mnt/usb: device is busy
umount2: Device or resource busy
umount: /mnt/usb: device is busy
[root@wgods ~]# umount -l /mnt/usb
问题解决
---------------------------------------------------------------------------------
[root@wgods usb]# umount /mnt/usb
umount: /mnt/usb: device is busy
umount: /mnt/usb: device is busy
[root@wgods usb]# fuser -m /mnt/usb
/mnt/usb: 21123c 21158c 21180c 21182c 21223c
[root@wgods usb]# ps -auxw | grep 21123
Warning: bad syntax, perhaps a bogus '-'? See /usr/share/doc/procps-3.2.7/FAQ
root 21123 0.0 0.0 3784 672 pts/2 T 15:10 0:00 more 12.sql
root 21346 0.0 0.0 3920 696 pts/2 S+ 15:52 0:00 grep 21123
[root@wgods usb]# fuser -kvm /mnt/usb
USER PID ACCESS COMMAND
/mnt/usb: root 21123 f.c.. more
root 21158 ..c.. man
root 21180 ..c.. sh
root 21182 ..c.. less
root 21223 ..c.. bash
[etl@wgods ~]$ umount /mnt/usb
umount: /mnt/usb is not in the fstab (and you are not root)
[etl@wgods ~]$ su - root
Password:
[root@wgods ~]# umount /mnt/usb
6: 删除usb目录
[root@wgods ~]# umount -l /mnt/usb
[root@wgods ~]# rm -rf /mnt/usb
注意:有时候挂载时,中文的文件名和目录名会出现乱码,为了避免这种情况可以指定字符集,命令如下
[root@wgods ~]# mount -t vfat -o iocharset=utf8,codepage=uft8 /dev/sdb1 /mnt/usb
[root@wgods ~]# mount -t vfat -o iocharset=cp936,codepage=936 /dev/sdb1 /mnt/usb
注意:cp936是指简体中文,cp950是指繁体中文。
CentOS系统挂载FAT32的U盘的更多相关文章
- Linux系统挂载FAT32的U盘
1:将U盘插入USB接口,检查是否插好 2:用fdisk命令检查分区和USB设备信息 [root@yhwang ~]# fdisk -l Disk /dev/sda: 1000.2 GB, 10002 ...
- Linux 系统挂载阿里云数据盘
适用系统:Linux(Redhat , CentOS,Debian,Ubuntu) * Linux的云服务器数据盘未做分区和格式化,可以根据以下步骤进行分区以及格式化操作. 下面的操作将会把数据盘划 ...
- [CentOS 7]挂载ntfs格式U盘
在我们将U盘插入装有CentOS的系统时,经常会出现如图所示的错误提示.这是因为linux系统并不能兼容NTFS的文件系统.其解决方法如下(建议先进入root模式): 1.首先下载"ntfs ...
- U盘安装CentOS无法进入Centos系统解决办法
转自:http://blog.sina.com.cn/s/blog_3feedf320101idlu.html 目前使用U盘安装系统逐渐因为它的便捷而受到人们的欢迎,但是使用U盘来安装Cent ...
- Linux 挂载和卸载U盘
一般的U盘挂载方法: mount [-fnrsvw] [-t vfstype] [-o options] device dir 参数:device表示要挂载的设备,dir表示挂载点 -t 指定设备的 ...
- CentOS系统下的数据盘挂载
此教程适用系统:Linux(CentOS,Debian,Ubuntu,Fedora) 通常新开通的Linux云服务器数据盘都未做分区和格式化.在进行数据盘挂载之前我们要先进行分区以及格式化操作.注意, ...
- 阿里云CentOS 7系统挂载SSD云盘的教程_Linux
一.查看SSD云盘 sudo fdisk -l Disk /dev/vda: 42.9 GB, 42949672960 bytes, 83886080 sectors Units = sectors ...
- Linux学习之CentOS(六)---mount挂载设备(u盘,光盘,iso等 )
对于新手学习,mount 命令,一定会有很多疑问.其实我想疑问来源更多的是对linux系统本身特殊性了解问题. linux是基于文件系统,所有的设备都会对应于:/dev/下面的设备.如: [cheng ...
- CentOS下挂载数据盘
CentOS下挂载数据盘 1.显示磁盘使用情况:#df 2.显示磁盘:#fdisk -l 3.格式化分区:#mkfs.ext4 /dev/vdb1 //注:将/dev/vdb1格式 ...
随机推荐
- 找jar包的网址
http://search.maven.org/#search%7Cga%7C1%7Cmybatis http://mvnrepository.com/
- [剑指Offer] 30.连续子数组的最大和
题目描述 HZ偶尔会拿些专业问题来忽悠那些非计算机专业的同学.今天测试组开完会后,他又发话了:在古老的一维模式识别中,常常需要计算连续子向量的最大和,当向量全为正数的时候,问题很好解决.但是,如果向量 ...
- 【bzoj2287】[POJ Challenge]消失之物 背包dp
题目描述 ftiasch 有 N 个物品, 体积分别是 W1, W2, ..., WN. 由于她的疏忽, 第 i 个物品丢失了. “要使用剩下的 N - 1 物品装满容积为 x 的背包,有几种方法呢? ...
- BZOJ4531 && BJOI2014 trace
#include<cstdio> #include<cctype> using namespace std ; struct state { int len ; int p ; ...
- 运动目标前景检测之ViBe源代码分析
一方面为了学习,一方面按照老师和项目的要求接触到了前景提取的相关知识,具体的方法有很多,帧差.背景减除(GMM.CodeBook. SOBS. SACON. VIBE. W4.多帧平均……).光流(稀 ...
- POI2007 MEG-Megalopolis [树状数组]
MEG-Megalopolis 题目描述 Byteotia has been eventually touched by globalisation, and so has Byteasar the ...
- TCP ------ TCP四次挥手(断开连接)及断开过程
1.正常情况下,调用close(),产生的其中一个效果就是发送FIN,只有双方都调用close(),才会出现正常的四次挥手. 2.如果是服务器,发起四次挥手是在关闭accept()返回的套接字,而不是 ...
- [BZOJ2453]维护队列|分块
Description 你小时候玩过弹珠吗? 小朋友A有一些弹珠,A喜欢把它们排成队列,从左到右编号为1到N.为了整个队列鲜艳美观,小朋友想知道某一段连续弹珠中,不同颜色的弹珠有多少.当然,A有时候会 ...
- viewDidLoad方法的调用顺序
https://www.evernote.com/shard/s227/sh/01307822-de66-448d-8bac-7954f01ffc64/185b44c2bf5b6e266f4bed ...
- [bzoj3238][Ahoi2013]差异——后缀自动机
Brief Description Algorithm Design 下面给出后缀自动机的一个性质: 两个子串的最长公共后缀,位于这两个串对应的状态在parent树上的lca状态上.并且最长公共后缀的 ...