linux系统挂载U盘报错 Invalid argument

之前移植LVGL,挂载U盘时会有报错

~ # mount /dev/sda /mnt/udisk/
mount: mounting /dev/sda on /mnt/udisk/ failed: Invalid argument

重新插拔U盘

~ # 
[  231.468732] usb 1-3.1: USB disconnect, device number 6
[  236.025337] usb 1-3.1: new high speed USB device number 7 using s5p-ehci
[  236.139977] usb 1-3.1: New USB device found, idVendor=05e3, idProduct=0751, bcdDevice=1402
[  236.147002] usb 1-3.1: New USB device strings: Mfr=3, Product=4, SerialNumber=0
[  236.154230] usb 1-3.1: New USB device Class: Class=0, SubClass=0, Protocol=0
[  236.161214] usb 1-3.1: Product: USB Storage
[  236.165373] usb 1-3.1: Manufacturer: USB Storage
[  236.192079] scsi3 : usb-storage 1-3.1:1.0
[  237.216512] scsi 3:0:0:0: Direct-Access     Generic  STORAGE DEVICE   1402 PQ: 0 ANSI: 6
[  237.236588] sd 3:0:0:0: Attached scsi generic sg0 type 0
[  237.325231] sd 3:0:0:0: [sda] 30318592 512-byte logical blocks: (15.5 GB/14.4 GiB)
[  237.333092] sd 3:0:0:0: [sda] Write Protect is off
[  237.337717] sd 3:0:0:0: [sda] Write cache: disabled, read cache: enabled, doesn't support DPO or FUA
[  237.352243]  sda: sda1 sda2 sda3 sda4
[  237.373352] sd 3:0:0:0: [sda] Attached SCSI removable disk

输入fdisk -l命令查看:

~ # fdisk -l

Disk /dev/mmcblk0: 7818 MB, 7818182656 bytes
253 heads, 59 sectors/track, 1022 cylinders
Units = cylinders of 14927 * 512 = 7642624 bytes

        Device Boot      Start         End      Blocks  Id System
/dev/mmcblk0p1             328        1020     5172205+  c Win95 FAT32 (LBA)
/dev/mmcblk0p2               4         144     1052353+ 83 Linux
/dev/mmcblk0p3             145         285     1052353+ 83 Linux
/dev/mmcblk0p4             286         327      313467  83 Linux

Partition table entries are not in disk order

Disk /dev/sda: 15.5 GB, 15523119104 bytes
255 heads, 63 sectors/track, 1887 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

   Device Boot      Start         End      Blocks  Id System
/dev/sda1             123        1880    14106624   c Win95 FAT32 (LBA)
/dev/sda2               9          47      307200  83 Linux
/dev/sda3              47          85      307200  83 Linux
/dev/sda4              85         123      307200  83 Linux

Partition table entries are not in disk order

直接挂载/dev/sda1

~ # mount /dev/sda1 /mnt/udisk/
mount: mounting /dev/sda1 on /mnt/udisk/ failed: No such file or directory

查看/dev

~ # ls /dev/sd
sda     sdcard

/dev中没有sda1这个设备节点

上网查了很多方法,最后找到的解决方法如下:

手动创建sda1设备节点:

~ # mknod /dev/sda1 b 8 1

重新挂载U盘

~ # mount /dev/sda1 /mnt/udisk/
~ # ls /mnt/udisk/
player

挂载成功

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

Top0_0lll

你的鼓励将是我创作的最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

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

余额充值