Rom transfer
-
So I have a largish selection of roms I'm trying to add to my retropie. I don't have a usb stick available for such a task and the samba method seems to time out after a while as the roms start erroring during the transfer.
My thought was this.....run a live linux os, so it can see the ext4 file system on the sd card and simply drag and drop the files from my Windows hard drive strait to the proper folders. However this does not seem to be working either and I keep getting a permission denied error whenever I try to add files to the sd card from the hdd. What is causing this? I've almost got this figured out but I'm apparently missing something obvious here.
If needed I will post the error read out once I'm back at my computer to try it again as this may help reach a resolution a lot faster.
Thanks in advance for reading.
-
@korn16ftl3 said in Rom transfer:
What is causing this
Well, it's a permission issue obviously, most likely the partition got auto-mounted and either your linux user doesn't have enough rights to write to the card or the partition got mounted read-only.
Try to mount the SD card partition manually from the live OS. Become
root
on the live OS and then execute from a terminal (command line)sudo mkdir -p /mnt/retropie sudo mount /dev/mmcblk0p2 /mnt/retropie
Then browse the
/mnt/retropie
folder (asroot
) and copy your ROM to the corresponding folder under the/mnt/retropie/home/pi/RetroPie/roms
directory.NOTE After you copy the ROMs and insert the card back in the Raspberry PI, use the RetroPie setup script to reset your ROMs folder permissions - https://retropie.org.uk/docs/FAQ/#reset-ownershippermissions-of-homepiretropie-roms
-
I'll give that a shot and post back results when I get home. Hopefully it all dosent have to be cmd line, I don't hate cmd line these directories I just kinda buried lol. I also read something about trying sudo -I as well. I thought in a live cd you were already root, he'll if I know lol.
I even tried the drag and drop for vmware and that wouldn't set up properly probably because of something else dumb I didn't look too far into that problem just booted the os live instead.
-
@korn16ftl3 said in Rom transfer:
Hopefully it all dosent have to be cmd line, I don't hate cmd line these directories I just kinda buried lol.
The command line (aka shell) isn't higher magic. It has the advantage that helpers can give you commands that you just have to copy into the shell, instead of instructions like "click there, then there, then you should see this, scroll down, then click that button". It's also practical that you can just copy any messages or errors that come up and post them here.
I also read something about trying sudo -I as well. I thought in a live cd you were already root, he'll if I know lol.
That depends of the Linux variant. Some have active root accounts, some use sudo to let a normal user get root rights just for the task at hand. Both approaches have their pros and cons.
-
so here was what i did to solve the issue and change the permissions it shows everyone can read/write when i check with right click ----> properties -----> permissions tab
sudo -i
chmod -R o+rw /media/lubuntu/retropieAFTERTHOUGHT/HINDSIGHT:
soooo....i just realized that i probably should have done the following:
chmod -R o+rw /media/lubuntu/retropie/home/pi/RetroPie/roms
rather than changing the whole retropie folder permissions......oops....im going to assume this is going to cause a problem...how do i set the entire retropie folder permissions back to the pi now?
-
@korn16ftl3 I just told you in my post above to use the RetroPie setup script to reset the ROM folder permissions after you transfer and pointed to the procedure in the docs.
You just changed the permissions on the entire Linux partition (/
), which might have bad side-effects. -
@korn16ftl3 said in Rom transfer:
how do i set the entire retropie folder permissions back to the pi now?
You could try to clone the permissions of a fresh installed Retropie on another medium:
Copy permissions to identical tree on linux / unix
Disclaimer: That's just an usefully looking find of a quick web search for "linux clone permissions". I didn't test it in any way. It's only meant as a nudge in the right direction. O:)
Backup your data before doing any more potentially dangerous problem solving.
-
@clyde said in Rom transfer:
@korn16ftl3 said in Rom transfer:
how do i set the entire retropie folder permissions back to the pi now?
You could try to clone the permissions of a fresh installed Retropie on another medium:
Copy permissions to identical tree on linux / unix
Disclaimer: That's just an usefully looking find of a quick web search for "linux clone permissions". I didn't test it in any way. It's only meant as a nudge in the right direction. O:)
Backup your data before doing any more potentially dangerous problem solving.
Ya the data backup was already a plan but I only have about 2 hrs into setup the rest of the time was in errors in my rom transfers and other crap like this. After this my next task is the nespi case and how to set it up to behave how I would like.
Already dumped the whole roms folder, so now I can just drop and over write 1 folder any ways as well as pit the Japanese roms in subdirectories, and English patch the translations.
Another question, I didn't touch the BOOT partition so maybe this thing will boot into cmd still and I can just reassign permission with the chmod command
EDIT:
after a Google about file permissions I found something interesting here:
https://www.reddit.com/r/RetroPie/comments/3b8xod/new_to_retropie_permissions_denied/"chown - Allows you to change the group or owner of a certain file or directory. To set the owner you can use chown UserName filename.ext. To set the group you can use chown :groupname filename.ext. To set the owner and the group at the same time, you can use chown username:groupname filename.ext. You can set the permissions on a direectory and any subsequent files/directories with the -R argument. For example: chown -R UserName:GroupName /etc/emulationstation/."
So based on that description I can fix this by this cmd:
chown -R UserName:GroupName /etc/retropie
?? Only thing I'm not sure of is what is the group name and user name by default?
EDIT 2:
Another Google result on the retropie github:https://github.com/RetroPie/RetroPie-Setup/wiki/SSH
"Change owner of folder and all files in folder to Pi:
sudo chown -R pi:pi /folder/to/be/changed"
The above looks to be more so my answer. Anyone disagree?
-
@korn16ftl3 said in Rom transfer:
The above looks to be more so my answer. Anyone disagree?
Disagree with what ? Do you actually have an error message that you received when booting the system ?
-
@mitu haven't gotten as far as trying to boot anything as of yet but ud imagine I'd have to set the permissions back to the way they were
-
@korn16ftl3 Just try and boot first.
-
@mitu ok will do and if there are issues I suppose I found the answer lol
-
Well I'm going to chown that folder again I guess I got some errors when I tried shutting down retropie.
-
@korn16ftl3 Please post the output of the command, run on Retropie on the screen you posted:
ls -l /usr/lib/sudo/sudoers.so
On my Retropie, the output is
-rw-r--r-- 1 root root 308944 Dec 9 18:57 /usr/lib/sudo/sudoers.so
The first three-digit set
rw-
says that the owner has read/write permissions (rw), but no (-) execution permissions. The second setr--
says that the owning group can read (r), but not write or execute (--). The third set says the same for others (i.e. non-owners). The owner is root and the owning group is also root (output:root root
).Normally, you could set the right permissions by these commands in Retropie:
sudo chown root:root /usr/lib/sudo/sudoers.so sudo chmod 644 /usr/lib/sudo/sudoers.so
The
644
is the octal equivalent ofrw-r--r--
, each number representing one three-digit set (see Octal modes). BUT with your messed-up permissions, it may be thatsudo
won't be working in your Retropie system. Then, you'd have to do it on Lubuntu:sudo chown 0:0 /media/lubuntu/retropie/usr/lib/sudo/sudoers.so sudo chmod 644 /media/lubuntu/retropie/usr/lib/sudo/sudoers.so
Here, I'm using Retropie's root user id
0
in case that your Lubuntu has a different user id for root (which shouldn't be the case). -
I just wiped the whole sd card again sudo was refusing to work.....lesson learned I suppose glad I didn't have anything more than rom transfers on the card. It's ok I decided I wanted to take the time to pull the Japanese roms and put them in their own folder anyways
I was able to get rid of 2 of the 3 errors by crating a user on my lubuntu live usb called pi however I couldn't get the sudo set back to 0 and from some googling it was better to perform a fresh install after the error I was getting that broke sudo
-
@korn16ftl3 Although I usually prefer fixing a problem to a complete wipe + reinstallation (infamous as "the Windows way" among many Linux users), in your case it may've been the best choice, as a messed-up root tree
/
probably would've been prone to more errors.Just another crumb of Linux knowledge: Linux differentiates users not by their names but by their user id (uid). The
-n
option ofls
shows the uids and group ids (gids) instead of names:ls -l -n /path # shorter: ls -ln /path
You can show a user's uid and gid by using the
id
command:id # uid + gid of current user id pi id root
-
@clyde thanks for sharing that, normally when it comes to linux I also prefer fixing the problem at hand as it forces me to go further in depth with the OS and learn more about it or at least how to resolve problems and what I did, in this case....I already figured out my screw up before even realizing what I did after I did it so that on its own (and because this is my first build for this kind of thing) was worth the loss of maybe a couple hours of work that can easily be made up
-
Well I guess I got this figured out and on the way learned WHAT NOT TO DO lol.
Now to figure out this mausberry bit so I can get the switches to behave how I would like.....
Power = Power on and proper shutdown when powered on
Reset = when in emulation reset back to retropie gui/main screen, when at retropie main screen and reset is hit a proper reset is performed
Keep your eyes peeled for another noon post, because I've read a lot about these mausberry switches and am quite lost how to get the performance I would like.
I will make another thread for that tho as its completely off topic for this one.
Contributions to the project are always appreciated, so if you would like to support us with a donation you can do so here.
Hosting provided by Mythic-Beasts. See the Hosting Information page for more information.