ARM开发板挂载 U盘 和 SD 卡

63 篇文章 1 订阅

开发板挂载U盘


1. 使用读卡器,插入SD卡后,将读卡器插入开发板


2. 查看U盘信息


# fdisk -l


显示内容
Disk /dev/sda: 16.0 GB, 16009658368 bytes
255 heads, 63 sectors/track, 1946 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes


   Device Boot      Start         End      Blocks  Id System
/dev/sda1               1        1946    15631213+  c Win95 FAT32 (LBA)



3. 挂载U盘


mount命令格式:mount [-参数] [设备名称] [挂载点] [其他参数]
                            mount -t vfat /dev/sdb1/ /mnt/usb -o iocharset=gb2312
          -t   指定设备的文件系统类型,在此,使用 -t vfat 是由于所使用U盘的文件


                系统类型是 fat32,如果是ntfs 则使用-t ntfs等等,大家可根据自己的


                文件系统类型灵活修改。


          -o  指定挂载文件系统时的选项,在此, -o iocharset=gb2312 设定中文字符集。


                假设你的locale是zh_CN.UTF-8,相应命令应为 -o iocharset=utf8。


# mount -t vfat /dev/sda1 /mnt/mmc_sd/


4. 卸载U盘(要先进入非 /mnt/mmc_sd 的目录下)


# umount /mnt/mmc_sd


如果无法卸载,提示如下
umount: cannot umount /mnt/mmc_sd: Device or resource busy


则运行
# fuser /mnt/mmc_sd
查看占用U盘的进行
提示如下
786


执行
# kill 786
然后再执行 卸载操作




挂载 SD 卡


1. 
插入 SD 时,系统打印如下信息


s3c2440-sdi s3c2440-sdi: running at 0kHz (requested: 0kHz).
s3c2440-sdi s3c2440-sdi: running at 196kHz (requested: 195kHz).
s3c2440-sdi s3c2440-sdi: running at 196kHz (requested: 195kHz).
s3c2440-sdi s3c2440-sdi: running at 196kHz (requested: 195kHz).
s3c2440-sdi s3c2440-sdi: running at 196kHz (requested: 195kHz).
s3c2440-sdi s3c2440-sdi: running at 196kHz (requested: 195kHz).
s3c2440-sdi s3c2440-sdi: running at 196kHz (requested: 195kHz).
s3c2440-sdi s3c2440-sdi: running at 196kHz (requested: 195kHz).
s3c2440-sdi s3c2440-sdi: running at 25000kHz (requested: 25000kHz).
s3c2440-sdi s3c2440-sdi: running at 25000kHz (requested: 25000kHz).
mmcblk0: mmc0:0007 SD16G 15634432KiB 
 mmcblk0:<7>mmc0: starting CMD18 arg 00000000 flags 00000035
 p1



mmcblk0代表第一个SD卡设备,mmcblk0p1代表第一个SD卡设备的第一个分区,mmcblkp2代表第二个分区,真正挂载到系统中的是mmcblk0p1和mmcblk0p2而不是mmcblk0


#mount -t vfat /dev/mmcblk0p1 /mnt/mmc_sd/



2. 卸载 SD 卡(要先进入非 /mnt/mmc_sd 的目录下)


#umount /mnt/mmc_sd





卸载NFS,结果出现无法卸载的情况

[root@localhost /]# umount /mnt/

umount: /mnt: device is busy

umount: /mnt: device is busy

使用umount -f,问题依旧

[root@localhost /]# umount -f /mnt/

umount2: Device or resource busy

umount: /mnt: device is busy

umount2: Device or resource busy

umount: /mnt: device is busy

使用fuser命令,先确认有那些进程需要杀掉

[root@localhost /]# fuser -cu /mnt

/mnt:                15060c(root)

其次向进程发出SIGKILL信号

[root@localhost /]# fuser -ck /mnt

/mnt:                15060c

确认

[root@localhost /]# fuser -c /mnt

[1]+  Killed                  dd if=1g of=/dev/null bs=1M  (wd: /mnt)

(wd now: /)

































  • 1
    点赞
  • 11
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值