RetroPie forum home
    • Recent
    • Tags
    • Popular
    • Home
    • Docs
    • Register
    • Login
    Please do not post a support request without first reading and following the advice in https://retropie.org.uk/forum/topic/3/read-this-first

    Usb drive mounting problems

    Scheduled Pinned Locked Moved Help and Support
    usb hdd
    17 Posts 3 Posters 1.7k Views
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • Z
      zantetusken10
      last edited by

      Pi Model or other hardware: RPI400
      Power Supply used: Official 3.0A power supply
      RetroPie Version Used: 4.8
      Built From: Pre made SD Image on RetroPie website - retropie-buster-4.8-rpi4_400.img.gz)
      USB Devices connected: Seagate Expansion 4TB HDD
      Controller used: 8Bitdo N30 Pro
      Error messages received: none
      Verbose log (if relevant): none
      Guide used: (Mention if you followed a guide): none
      File: (File with issue - with FULL path): none
      Emulator: (Name of emulator - if applicable): none
      Attachment of config files: (PLEASE USE PASTEBIN.COM FOR LARGE LOGS): none
      How to replicate the problem: rebooting the RPI400

      Hello everyone,

      I'm having some issues when it comes to my usb hdd, since sometimes after a reboot it seems it mounts it correctly, but the files are empty. I suspect there is something "overwriting" the mounting process, because when it works correctly, it will show as this in the desktop:
      1.png

      but when it doesn't it shows like this:

      2.png

      I'm a complete newbie when it comes to unix and filesystems, but seeing how the usb folder changes from 0 to 1 when it's working and when it's not makes me suspect that it has to do something with the mounting. I'm using the usbromservice and that external hdd is the only usb connected (besides the internal keyboard of the RPI400).

      Is there a way to verify what's happening?

      Thanks in advance.

      1 Reply Last reply Reply Quote 0
      • Z
        zantetusken10
        last edited by

        I haven't paid much attention to it until now but now that I look the external HDD has a EFI partition. Would that mess up the usbromservice? as in it thinks the roms are in that partition instead of the other and tries to mount that?

        How would I be able to verify if this is the issue + how would I make it ignore that partition and prefer the other one?

        1 Reply Last reply Reply Quote 0
        • mituM
          mitu Global Moderator
          last edited by

          @zantetusken10 said in Usb drive mounting problems:

          I'm having some issues when it comes to my usb hdd, since sometimes after a reboot it seems it mounts it correctly, but the files are empty

          You mean the ROM folders or the ROM files ?

          I haven't paid much attention to it until now but now that I look the external HDD has a EFI partition. Would that mess up the usbromservice? as in it thinks the roms are in that partition instead of the other and tries to mount that?

          I don't think so, usbromservice will look for the folder name (retropie or retropie-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 ?

          Z 1 Reply Last reply Reply Quote 0
          • Z
            zantetusken10 @mitu
            last edited by zantetusken10

            @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 or retropie-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!

            1 Reply Last reply Reply Quote 0
            • mituM
              mitu Global Moderator
              last edited by

              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 the autostart.sh file (from which EmulationStation is started) and disable the usbromservice service.

              Z 1 Reply Last reply Reply Quote 0
              • Z
                zantetusken10 @mitu
                last edited by zantetusken10

                @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!

                mituM 1 Reply Last reply Reply Quote 0
                • mituM
                  mitu Global Moderator @zantetusken10
                  last edited by mitu

                  @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.

                  Z 1 Reply Last reply Reply Quote 0
                  • Z
                    zantetusken10 @mitu
                    last edited by

                    @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/ZS7KGErv

                    This is when it doesn't:
                    https://pastebin.com/3XvQ3skE

                    The 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.

                    1 Reply Last reply Reply Quote 0
                    • mituM
                      mitu Global Moderator
                      last edited by

                      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 a retropie-mount folder on the 1st partition also ?

                      Z 1 Reply Last reply Reply Quote 1
                      • Z
                        zantetusken10 @mitu
                        last edited by

                        @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 a retropie-mount folder on the 1st partition also ?

                        Nope, it doesn't even have a letter assigned.

                        e7246eb4-a5b6-4a3c-bafa-bf9a333ef133-image.png

                        Thats the "data" partition that has the Retropie data. The other partition is there but I cannot access to it.

                        e6ca8ca1-0fc5-42d3-964d-f264576b4f5b-image.png

                        1 Reply Last reply Reply Quote 0
                        • AshpoolA
                          Ashpool
                          last edited by Ashpool

                          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 ?

                          Z 1 Reply Last reply Reply Quote 0
                          • Z
                            zantetusken10 @Ashpool
                            last edited by

                            @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.

                            3fd61ac0-5f3e-44df-9eac-f225ff4f1557-image.png

                            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!

                            Z 1 Reply Last reply Reply Quote 0
                            • Z
                              zantetusken10 @zantetusken10
                              last edited by

                              UPDATE:

                              7d80907d-756b-447e-a1f6-38c2a6bc27de-image.png

                              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!

                              1 Reply Last reply Reply Quote 0
                              • mituM
                                mitu Global Moderator
                                last edited by

                                @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 the usbromservice will probably mount either of partitions. I'd suggest to remove the retropie-mount folder from the 1st (EFI) partition and re-test to see if the problem happens again.

                                Z 1 Reply Last reply Reply Quote 0
                                • Z
                                  zantetusken10 @mitu
                                  last edited by

                                  @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 the usbromservice will probably mount either of partitions. >I'd suggest to remove the retropie-mount folder from the 1st (EFI) partition and re-test to see if the problem happens again.

                                  My fear is this:

                                  00f6b4e8-8ba8-47cd-a744-cf2457156d57-image.png

                                  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-linux

                                  Would this tutorial be of use in this scenario?

                                  Thanks!

                                  1 Reply Last reply Reply Quote 0
                                  • mituM
                                    mitu Global Moderator
                                    last edited by

                                    Just assign a letter in Windows to the partition and erase the folder on it.

                                    Z 1 Reply Last reply Reply Quote 0
                                    • Z
                                      zantetusken10 @mitu
                                      last edited by

                                      @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:

                                      b69d38b3-7559-4999-a9cb-f8773c110bf9-image.png

                                      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:

                                      85494f32-f517-47ae-bf02-f7388969a5f6-image.png

                                      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!

                                      1 Reply Last reply Reply Quote 0
                                      • First post
                                        Last post

                                      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.