Usb drive mounting problems
-
@mitu said in Usb drive mounting problems:
You mean the ROM folders or the ROM files ?
The folder structure. When it works, it loads all the ROM files, when it doesn't, it doesn't have any files. Also the folders themselves are different: if you see the image above, when it doesn't work it starts with the folder arcade and have just a few, but when it does, I have the folders "amiga", "amstradcpc" etc etc (which is what I normally see if I plug the HDD on my pc for example). The partition is exfat if that matters.
I don't think so,
usbromservice
will look for the folder name (retropie
orretropie-mount
), not at a particular partition. All of them are tried, hence why you're seeing/media/usb
,/media/usb1
appearing.
Are you booting to the desktop by any chance or using the defaults (boot to console) ? How many partitions are on the disk ?Nope, booting directly to emulationstation, but I have the desktop installed as well to use eventually, plus node-red , samba and a couple other things. The RPI400 stays on 24/7.On the HDD just those two partitions, the EFI one and the main one.
Thanks!
-
My guess is that the disc is not mounted completely before EmulationStation starts, thus you see the local folders (not on the disc). You can see if this is the case by just restarting EmulationStation when you encounter the issue. In this case it may be useful to add a
mount
command in theautostart.sh
file (from which EmulationStation is started) and disable theusbromservice
service. -
@mitu mmm I'm not sure it's on emulationstation's side, since I do remember rebooting es a couple of times and nothing changed. And when this happened the only thing that "fixed" it was a reboot or a power off / power on of the RPI (after many tries, it would load the HDD correctly). Just to understand, the usbromservice is just a script that does the mounting / unmounting of the external hdd right? and that script runs when the RPI is powered on or every time emulationstation's starts?
Is there a log file or a unix cmd that I could upload here to verify what happened when the HDD didn't mount correctly?
Thanks again!
-
@zantetusken10 said in Usb drive mounting problems:
mmm I'm not sure it's on emulationstation's side, since I do remember rebooting es a couple of times and nothing changed.
Not rebooting, just restarting EmulationStation from the menu.
Is there a log file or a unix cmd that I could upload here to verify what happened when the HDD didn't mount correctly?
You can use
systemctl status usbmount@dev-sda2.service
to see what's the status of the mount job. -
@mitu said in Usb drive mounting problems:
Not rebooting, just restarting EmulationStation from the menu.
Sorry, that's what I meant, restarting / rebooting ES from the main menu (not rebooting the RPI). When the HDD doesn't mount correctly, no matter how many times I do restart ES it will always be the same When I reboot or power off / on the RPI and see that ES sticks for some time in the "arcade" part of the loading bar when starting, then I know the HDD was mounted correctly since it's reading +6000 rom files in that folder. If not mounted correctly, it will just go through all the systems in a couple of seconds and then go to that screen that "you don't have any roms etc etc". Just to be on the safe side, I just rebooted the RPI and didn't mount the HDD correctly, so I restarted ES 9 times and it was just the same thing, speeding through the loading rom process.
You can use
systemctl status usbmount@dev-sda2.service
to see what's the status of the mount job.Ok, this is the result when it mounts the HDD correctly with all the roms and stuff:
https://pastebin.com/ZS7KGErvThis is when it doesn't:
https://pastebin.com/3XvQ3skEThe only thing different that I see is that in the one when it works it says:
Aug 21 21:06:56 RPI400 systemd[1]: Starting usbmount@dev-sda2.service...
instead of:
Aug 22 11:48:25 RPI400 usbmount[448]: loaded usbmount configurations
Besides the usb0 / usb1 mentioned on the posts above.
-
Hm, the logs are almost identical, there's no error reported, the difference is the initial mountpoint (
/dev/usb1
,/dev/usb0
). You don't have aretropie-mount
folder on the 1st partition also ? -
@mitu said in Usb drive mounting problems:
Hm, the logs are almost identical, there's no error reported, the difference is the initial mountpoint (
/dev/usb1
,/dev/usb0
). You don't have aretropie-mount
folder on the 1st partition also ?Nope, it doesn't even have a letter assigned.
Thats the "data" partition that has the Retropie data. The other partition is there but I cannot access to it.
-
Just some thoughts/questions:
the 1st pictures are made from what boot situation/desktop?Whats about the situation whence booting into a clean retropie-image (as mentioned in "Build from"), was/is that any different?
Are there any fstab-mounts involved? Because it looks like the partition is somehow mounted twice, or whats the mount "Extension" above the usb0/usb1 one? IMHO/to me it looks like there is something next to the usb-rom service involved in creating some mess with the mounting.P.S.: besides the problem, out of personel interest: any reason for a efi-system partition on an external storage device without a system to boot into ?
-
@Ashpool said in Usb drive mounting problems:
Just some thoughts/questions:
the 1st pictures are made from what boot situation/desktop?Whats about the situation whence booting into a clean retropie-image (as mentioned in "Build from"), was/is that any different?
Are there any fstab-mounts involved? Because it looks like the partition is somehow mounted twice, or whats the mount "Extension" above the usb0/usb1 one? IMHO/to me it looks like there is something next to the usb-rom service involved in creating some mess with the mounting.P.S.: besides the problem, out of personel interest: any reason for a efi-system partition on an external storage device without a system to boot into ?
Hello.
It's the same. I noticed this started to happen once I heavily loaded the roms into the HDD. For example when I had just a couple of psx games (that wasn't more than a day or two honestly , so it might be coincidence) I didn't have this problem. Once I loaded the Arcade library, SNES, Megadrive, etc etc the problems began.
I didn't mess with fstab so it is "as-is". I guess one option would be to add an entry here and disable usbromservice? but I would do that as a last resort since it's quite probable that I end up messing it up . I suspect is a mounting issue as well, but so far the logs from usbromservice doesn't show anything strange except what I mentioned above. Would there be any other cmd or log file that I could check to verify what's going on?
I got the HDD just a couple of weeks ago and honestly it didn't bother me. I might even make a recovery disk out of it. Now, would it be possible that retropie somehow added a "retropie-mount" folder on that partition on it's own? Cause since it doesn't even have a letter assigned, I can be 100% sure that I didn't do anything to it on windows side.
Thanks!
-
UPDATE:
Navigating around the HDD drive in Unix I tried media/usb0 and media/usb1 and that's the result. I'm no expert in Unix but I'm guessing those are the two partitions? Does that even look ok? Because on one of them I see the exact same thing that I see on Windows on drive "F:" , but on the other one (that I cannot see through Windows) seems to also have a retropie-mount folder? Then again, it seems to have the same parameters (date, size, time) than the retropie-mount folder on the correct partition.
Does this give you any insight on what's going on?
Thanks!
-
@zantetusken10 said in Usb drive mounting problems:
Nope, it doesn't even have a letter assigned.
That's not relevant under Linux, partition letters are a DOS/Windows thing.
...
Does that even look ok? Because on one of them I see the exact same thing that I see on Windows on drive "F:" , but on the other one (that I cannot see through Windows) seems to also have a retropie-mount folder?It looks like you do have a similar
retropie-mount
folder on both partitions and theusbromservice
will probably mount either of partitions. I'd suggest to remove theretropie-mount
folder from the 1st (EFI) partition and re-test to see if the problem happens again. -
@mitu said in Usb drive mounting problems:
That's not relevant under Linux, partition letters are a DOS/Windows thing.
I meant it as since I couldn't access it through Windows, I couldn't had copied the retropie-mount folder to that partition, and if a folder was copied to that partition it happened on it's own (or without me willingly doing it)
It looks like you do have a similar
retropie-mount
folder on both partitions and theusbromservice
will probably mount either of partitions. >I'd suggest to remove theretropie-mount
folder from the 1st (EFI) partition and re-test to see if the problem happens again.My fear is this:
If I'm reading this correctly, df shows that media/usb1 is the "correct" partition, mainly cause of the size reported, so usb0 must be those 200mb of the EFI partition, but if I go to that folder you can see that it has the roms, do doing a rmdir or something on usb0 I guess it's going to actually delete all the roms and files from the HDD instead that copy from the EFI partition.
At this point I'm guessing the clean thing to do would be remove that EFI partition (I have another HDD if I need to do a recovery partition anyways) and leave those 200mb unallocated.
https://phoenixnap.com/kb/delete-partition-linuxWould this tutorial be of use in this scenario?
Thanks!
-
Just assign a letter in Windows to the partition and erase the folder on it.
-
@mitu said in Usb drive mounting problems:
Just assign a letter in Windows to the partition and erase the folder on it.
So yeah, apparently that was the issue, that somehow a retropie-mount folder was also in the EFI partition:
Assigning letter H: to the EFI partition and checking through admin in powershell I can see that there is a folder structure and it looks the same as what I see on the desktop on the RPI400 when it fails to load the HDD. I just removed everything from H:
So let's see how it behaves from now on. If I don't come back to this thread asume that it was solved.
Thank you very much both of you for your help!
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.