2

When I use the desktop mode of Raspbian, I can find the connected USB device on my Pi in this path:

/media/pi/'My Usb Disk'

But when I use chromium web kiosk mode and lxsession I cannot find the connected USB device in the /media/pi path. How can get the path of USB device in Raspbian OS in all situation?

3

Follow the instructions:

1. Figure out what is the name of USB drive on /dev:

ls -l /dev/disk/by-uuid/  

It should be like sda1, sdb2, etc. Plug and unplug to making sure about that.

2. Create a mount point whichever you prefer:

sudo mkdir /home/pi/drive  

3. Give the permission for the mount point:

sudo chown -R pi:pi /home/pi/drive  

Note that if you have logged in by root user, step 3 is ineffective.

4. Mount the USB drive:

sudo mount /dev/sda1 /home/pi/drive -o uid=pi,gid=pi  

Bear it in mind that if you have logged in by root user, remove -o uid=pi,gid=pi of step 4. instead of sda1, put the name of step 1. Source.

  • Thank you, dear Mohammad. my problem solved. :) – Parsa Karami Dec 31 '19 at 13:44
  • @ParsaKarami Well, My pleasure. By this answer? – M. Rostami Dec 31 '19 at 16:15
  • 1
    yeah, thanks, I want to read file from a USB device and cannot do that before the mount operation. – Parsa Karami Jan 1 '20 at 5:45

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.