0

I am running retro pie On a Raspberry Pi 2 and I am new to the Linux, So please somebody tell me what I am doing wrong here

  1. I have a file, gba_Bios.bin on a flash drive on /usb/

  2. I do cp media/usb0/gba_bios.bin/opt/retropie/emulators/gpsp/raspberrypi

  3. I get a response telling me that access is denied

  4. Or I do it a bit different way and I mess up the dir and it says no such directory.

2

sudo. you forgot sudo. Root permission is required if you're going to write into the /opt directory.

sudo cp /media/usb0/gba_bios.bin /opt/retropie/emulators/gpsp/raspberrypi

Make sure the file actually exists. As in /media/usb0 is actually the correct folder where gba_bios.bin is. Flash drives are sometimes not mounted automatically on plugin.

  • sudo is not necessarily the problem here. There could be a couple issues, the most obvious is that he's using cp incorrectly. Another issue may be that the permissions of the hosted file or destination directory are incorrectly set for this command. sudo is a valid way to deal with such an issue, but you should explain what it's doing, and how to check such things. At the very least, explain your correction to his cp command, please. – Jacobm001 Feb 6 '16 at 2:20
  • @Jacobm001 I was still editing my answer and accidentally hit post. Also, I'm pretty sure you need sudo to write to /opt. – Gene Dela Rosa Feb 6 '16 at 2:22
  • @Jacobm001 Also, he used cp correctly. Probably bad formatting and incorrect copy-pasting led to it lacking a space and a / at the beginning. Second point is, as I have already mentioned, sudo is required to write into /opt. – Gene Dela Rosa Feb 6 '16 at 2:27
  • @Jacobm001 Third point is, cp will show cannot stat first before permission denied. So his question implies that the file does exist, and writing is the issue. I'm not quite sure if you're aware of that. Anyways, added explanation :) – Gene Dela Rosa Feb 6 '16 at 2:33
  • btw I got all of these commands from another post here on stack- and he told me to do that so me being ignorant to Linux I just typed it in – TylerTotally Feb 6 '16 at 2:33

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.