AnsweredAssumed Answered

how to mount a usb stick?

Question asked by Damien Huang on Feb 24, 2016
Latest reply on Feb 25, 2016 by Damien Huang

Hi

I am using the imx6q-sabrelite board with Lollipop 5.0, I set up the device tree for OTG support. when I insert a usb memory stick into the OTG port, I can see the below message being output on the console.

 

usb 1-1: new high-speed USB device number 6 using ci_hdrc

usb-storage 1-1:1.0: USB Mass Storage device detected

scsi7 : usb-storage 1-1:1.0

init_gpio_data:-2

init_gpio_data:-2

imx-sgtl5000 sound.25: ASoC: CODEC (null) not registered

imx-sgtl5000 sound.25: snd_soc_register_card failed (-517)

platform sound.25: Driver imx-sgtl5000 requests probe deferral

init_gpio_data:-2

init_gpio_data:-2

imx-sgtl5000 sound.25: ASoC: CODEC (null) not registered

imx-sgtl5000 sound.25: snd_soc_register_card failed (-517)

platform sound.25: Driver imx-sgtl5000 requests probe deferral

scsi 7:0:0:0: Direct-Access     Imation  ImationFlashDriv PMAP PQ: 0 ANSI: 4

init_gpio_data:-2

init_gpio_data:-2

imx-sgtl5000 sound.25: ASoC: CODEC (null) not registered

imx-sgtl5000 sound.25: snd_soc_register_card failed (-517)

platform sound.25: Driver imx-sgtl5000 requests probe deferral

sd 7:0:0:0: [sdb] 7577600 512-byte logical blocks: (3.87 GB/3.61 GiB)

sd 7:0:0:0: [sdb] Write Protect is off

sd 7:0:0:0: [sdb] No Caching mode page found

sd 7:0:0:0: [sdb] Assuming drive cache: write through

sd 7:0:0:0: [sdb] No Caching mode page found

sd 7:0:0:0: [sdb] Assuming drive cache: write through

sdb: sdb1

sd 7:0:0:0: [sdb] No Caching mode page found

sd 7:0:0:0: [sdb] Assuming drive cache: write through

sd 7:0:0:0: [sdb] Attached SCSI removable disk

 

 

But I could not find where the sdb1 was mounted, the 'mount' command indicated to me it was not mounted, so I tried to mount it manually by doing the below:

 

root@nitrogen6x:/data/media # mkdir usb

root@nitrogen6x:/data/media # mount -t vfat /dev/block/sdb1 ./usb

 

And the machine response with:

 

type=1400 audit(8699.720:12): avc: denied { read } for pid=1962 comm="mount" name="sdb1" dev="tmpfs" ino=9655 scontext=u:r:init_shell:s0 tcontext=u:object_r:block_device:s0 tclass=blk_file permissive=0

FAT-fs (sdb1): Volume was not properly unmounted. Some data may be corrupt. Please run fsck.

type=1400 audit(8699.730:13): avc: denied { mount } for pid=1962 comm="mount" name="/" dev="sdb1" ino=1 scontext=u:r:init_shell:s0 tcontext=u:object_r:vfat:s0 tclass=filesystem permissive=0

mount: Permission denied

type=1400 audit(8699.750:14): avc: denied { mount } for pid=1962 comm="mount" name="/" dev="sdb1" ino=1 scontext=u:r:init_shell:s0 tcontext=u:object_r:vfat:s0 tclass=filesystem permissive=0

255|root@nitrogen6x:/data/media #

 

Could someone tell me why and how to mount the usb disk?

 

Thanks a lot.

 

Cheers,

Damien

Outcomes