之前移植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
挂载成功