Help!! Accidentally dragged a random directory into another and now its all broken
-
This is the stuff nightmares are made of...
So I was on my Retropie in filezilla to try and check out a config file. I accidentally went to double click a directory and instead the mouse moved and it dragged the folder into a random directory and I didnt see where it went of what folder it was. Now emulation station is broken and says
"We can't find any systems!
Check that your paths are correct in the system configuration file, and your game directory has at least one game with the correct extension."The problem is, I dont understand enough about a retropie directory structure to understand what it should look like. I don't even know what directory was moved. I remember the two dir tree's I had open were
/opt/retropie/configs
/home/pi ... roms directoryExcept that I can't seem to see the roms directory in there any more, and I'm pretty sure thats where they are kept...
So maybe something in that home/pi directory was moved? All i see in that /home/pi dir is '.config' and '.emulationstation'.
I'm not sure how to check what version of retropie I have etc (got it as a package), but its a raspberry pi 3... bought in the last few months from here
https://droidbox.co.uk/droix-retro-gaming-system-s-line-raspberry-pi-retropie-entertainment-console.htmlIs there any way someone could dump the directory structure of their raspberry pi 3 with retropie to a text file, so I can do the same and compare them so I have a point of truth?
... Ok so I think I have found the roms in
/opt/pi/Retropie/
which contains dirs:
[AMRomslists]
[BIOS]
[ESGameslists]
[extras+]
[retropiemenu]
[roms]
[splashscreens].... is this directory supposed to be here? Is this the one that could have moved from /home/pi ?
-
Ok, I took a punt and moved
/opt/pi/RetroPie to /home/pi/RetroPie
... Big mistake!! Now it doesnt' even boot up so I can't SSH back in to move the directory back. I have tried plugged it into a micro SD reader and sticking it into my macbook but I can only see a 'boot' drive connected that is only 43mb
/ FAT32.Any ideas how to read this SD card?
-
it looks like you've dragged
/home/pi
into/opt
. just drag that/opt/pi
directory back to/home
however note that you're using a pre-built RetroPie system, and a third party image, neither of which we support, as per https://retropie.org.uk/forum/topic/3/read-this-first, so please do not post any more support questions until you are using our install. my advice above may not be correct as we have no idea how your image is set up, so i would take this opportunity to start again from the official image :)
-
Thanks! Just as soon as I work out to undo what mount this SD card (installing some homebrew package now...) I'll move it back and hopefully that will work.
Does this mean there should be no /opt/pi/ directory at all ?
-
@cyanxx said in Help!! Accidentally dragged a random directory into another and now its all broken:
Does this mean there should be no /opt/pi/ directory at all ?
not on official RetroPie, certainly.
-
@dankcushions Great, good to know.
(Sorry btw, had no idea third-party images for Retropie were even a thing)
-
@dankcushions I know this is not a retropie question... but I have mounted the SD card on my mac and can view it at last. But I cannot access the contents of the /home/pi/ directory as its protected. Do you know if there is a way I can login somehow or am I screwed? No worries if you dont know, just thought I'd ask.
-
Ok, managed to access the pi directory via another raspberry pi.... copied it all back into the right places. Still a kernel panic though and it wont boot
Guess it could be starting from scratch after all... :( -
My sympathies and good luck with that. And don't forget to ⚠️backup⚠️ your system after you've set up everything, and in regular intervals after that.
-
@Clyde appreciated. Managed to connect the SD card to another raspberry pi so copying all the roms and configs over to a portable HD now. Then going to reflash it with base retropie and re set it all up again 🤞
Is there a recommended way to back up? Can't think how to do it without just dragging a bunch of stuff over SFTP (what screwed me in the first place)
-
@cyanxx https://retropie.org.uk/docs/Updating-RetroPie/#making-a-backup. And don't use the
root
account for transferring ROMs. -
@mitu said in Help!! Accidentally dragged a random directory into another and now its all broken:
https://retropie.org.uk/docs/Updating-RetroPie/#making-a-backup
Thanks. So connect via SFTP using the
pi
account yes? What is the pitfall in usingroot
incidentally? -
@cyanxx said in Help!! Accidentally dragged a random directory into another and now its all broken:
What is the pitfall in using root incidentally?
Well, for starters you wouldn't have been able to copy your
/home/pi
to/opt
, since the permissions on/opt
would have prevented it.
As a rule, you don't use an administrative account for day to day operations of your system. You don't need it and you can accidentally break your system by removing important files or changing permissions on system files.Use
root
only when are explicitly doing system configuration or update and, even then, prefer thesudo
command instead of logging in directly asroot
. -
@mitu I was actually logged in as
pi
via Filezilla when it happened (dont haveroot
). Thats all the company I bought it off provided, but it worked everywhere so I didn't chase it further. Good advice though, I understand the merits.So if I want to update config files in
/opt/retropie/configs/
(that path from memory sorry) I was just copying them off via SFTP - updating on my mac and then copying back. Is that how you would do it? -
@cyanxx You don't need SFTP for that, you can access the RetroPie file shares (ROM folders/configs) from your macOS system - see https://retropie.org.uk/docs/Transferring-Roms/#samba-shares. That should be the preferred method.
-
@mitu ah sweet. Perfect. I did try that before but couldn't get it to work. Hopefully now I'm on the official image it'll work properly. Thanks!
-
@mitu @dankcushions I'm saving the contents of
/home/pi/retropie/roms/
/opt/retropie/configs/
Can you think of any other directories I should save before I wipe the SD?
-
The
BIOS
folder might be useful. -
@cyanxx
My sd card
for retropie is asking for a password. Help -
@montelcow Please open a separate topic instead of barging in on existing ones. Provide the information requested in https://retropie.org.uk/forum/topic/3/read-this-first.
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.