sd卡和USB的mount方法

1、查看系统中是否有外接设备,并查看相应的设备类型

设备列表

sh-4.3# cat /proc/partitions                                                    
major minor  #blocks  name                                                      
                                                                                
  31        0       8192 mtdblock0                                              
  31        1     307200 mtdblock1                                              
  31        2       8192 mtdblock2                                              
  31        3     307200 mtdblock3                                              
  31        4      61440 mtdblock4                                              
  31        5      61440 mtdblock5                                              
  31        6     294912 mtdblock6                                              
  31        7       1024 mtdblock7                                              
  31        8       1024 mtdblock8                                              
  31        9       6144 mtdblock9                                              
 179        0   30375936 mmcblk0                                                
 179        1   30371840 mmcblk0p1                                              
   8        0    3942400 sda                                                    
   8        1    3941916 sda1           

2、mount            

sh-4.3# mount -t vfat /dev/mmcblk0p1 /tmp/config_sd/                           
                                              

3、mount结果
root@Raisecom:~# mount
ubi0:rootfs on / type ubifs (rw,relatime)
devtmpfs on /dev type devtmpfs (rw,relatime,size=958776k,nr_inodes=151903,mode=755)
proc on /proc type proc (rw,relatime)
sysfs on /sys type sysfs (rw,relatime)
debugfs on /sys/kernel/debug type debugfs (rw,relatime)
none on /tmp type tmpfs (rw,relatime)
none on /dev/pts type devpts (rw,relatime,mode=600)
ubi1_0 on /config_smca type ubifs (rw,relatime,sync)
/dev/mmcblk0p1 on /tmp/config_sd type vfat (ro,relatime,fmask=0022,dmask=0022,codepage=936,iocharset=iso8859-1,shortname=mixed,errors=remount-ro)

输出mount结果

sh-4.3# mount|grep /dev/mmcblk0|awk '{print $3}'                                   
/tmp/config_sd 

 5、umount

sh-4.3# umount -t /dev/mmcblk0p1 /mnt/config_sd                                    
6、修改mount读写权限

mount -o remount rw / 

7、查看磁盘占用

sh-4.3# df                                                                      
Filesystem     1K-blocks  Used Available Use% Mounted on                        
rootfs             70888 56596     14292  80% /                                 
ubi0:rootfs        70888 56596     14292  80% /                                 
devtmpfs          958776     4    958772   1% /dev                              
none              991948   684    991264   1% /tmp                              
ubi1_0              9792    32      9196   1% /config_smca                      
/dev/mmcblk0p1  30363648  9024  30354624   1% /tmp/config_sd                    
/dev/sda1        3934212     4   3934208   1% /mnt/usb                          
sh-4.3# df|grep /dev/sda1                                                       
/dev/sda1        3934212     4   3934208   1% /mnt/usb                          
sh-4.3# df|grep /dev/sda1|awk '{print $5}'                                      
1%                                                                              
sh-4.3# df|grep /dev/sda1|awk '{print $6}' 

8、列出所有的分区,包括没有挂上的分区和usb设备

  fdisk -l
Disk /dev/mmcblk0: 29 GiB, 31104958464 bytes, 60751872 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                               
Disklabel type: dos                                                             
Disk identifier: 0x00000000                                                     
                                                                                
Device         Boot Start       End   Blocks  Id System                         
/dev/mmcblk0p1       8192  60751871 30371840   c W95 FAT32 (LBA)                
                                                                                
                                                                                
Disk /dev/sda: 3.8 GiB, 4037017600 bytes, 7884800 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                               
Disklabel type: dos                                                             
Disk identifier: 0x6090c2e0                                                     
                                                                                
Device    Boot Start       End  Blocks  Id System                               
/dev/sda1        968   7884799 3941916   b W95 FAT32                             

  • 1
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 1
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值