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 randomly not showing up until reboot

    Scheduled Pinned Locked Moved Help and Support
    usb romsusb issuestroubleshooting
    27 Posts 3 Posters 2.8k 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.
    • ZioDarkmageZ
      ZioDarkmage
      last edited by

      @Efriim
      So turning off the wait for network on boot decreased my boot time to around 18 seconds, adding the echo "noop" > /sys/block/sda/queue/scheduler bumped it up to 41 seconds.
      I went ahead and disabled this.

      I have another Samsung of the same size arriving in the mail tomorrow, to see if maybe the ones I have on hand may just be damaged. (Doubtful but I am grasping at straws honestly.) I am also looking at a San Disk if this doesn't work.

      I notice that this issue seems to occur very randomly and that the time that it appears to happen the most is when I sync my Bluetooth ps4 controller to the pi when the splashscreen comes up initially. Looking over the dmesg I do see that the Samsung drive is showing up.

      I will try using the smaller block size to see what that does. I also have different size drives that I will be trying.

      I have one other question, while I know the fsck set to 2 is for partition checking to help prevent fragmentation, could the fsck check actually be causing issue or is the primary issue too many processes occurring during boot such as the fstab mount and the Bluetooth sync?

      EfriimE HalvhjearneH 2 Replies Last reply Reply Quote 0
      • EfriimE
        Efriim @ZioDarkmage
        last edited by Efriim

        @ZioDarkmage
        I think that the filesystem check happens when there is an unclean shutdown. Either way it should not effect the usability of the the drive.

        I really think the allocation unit block size could be the problem, and using the default value should work, I believe when you use the format dialog in windows that what it displays will tell you what it is currently set to.

        My 8gb drives all use 4096bytes,

        1 Reply Last reply Reply Quote 0
        • HalvhjearneH
          Halvhjearne @ZioDarkmage
          last edited by

          @ZioDarkmage said in USB drive randomly not showing up until reboot:

          I have one other question, while I know the fsck set to 2 is for partition checking to help prevent fragmentation, could the fsck check actually be causing issue or is the primary issue too many processes occurring during boot such as the fstab mount and the Bluetooth sync?

          i doubt thats a problem, but you could try and set it to 0 and it will not be checked at all.
          i suggested a few things in the last post, but it sounds like either an error on the usb stick or maybe it just dosnt play nice with the pi ... or maybe the pi itself has some error?
          tbh the most ideal (and fastet) is to just get a larger sdcard.

          1 Reply Last reply Reply Quote 0
          • EfriimE
            Efriim
            last edited by

            I ran into a problem with changing the scheduler using rc.local, I don't know why but it interrupted the safeshutdown script from being run. I instead changed the cmdline.txt elevator=deadline to elevator=noop.

            Boot time can vary by 2 or 5 seconds, I'll either get 16, 18 and sometimes 21. Sometimes It takes an extra interval when loading the ports directory, which has symlinks to my usb, and I haven't yet rounded that out. But I think the scheduler resolves this.

            1 Reply Last reply Reply Quote 0
            • ZioDarkmageZ
              ZioDarkmage
              last edited by

              @Efriim
              Sorry about the late reply, I was testing these over several days with various manufactured usb drives.

              USB 3.1 drives tested:
              Samsung Fit : Still acts up no matter what, no matter the size. Block size, format type, all seem to act up with this drive. Is there a file database I should add this to as not to use with the Pi?
              PNY : Elevator change worked on it. Without the elevator change it acts up on occasion but not as much and that may have been my error.
              SanDisk Fit : Works with or without changes, just seems to work period.
              MicroCenter Drive : Works with elevator change on one drive works without it on another, not sure on this one.

              USB 2.0 drives seem to work no matter what I do, but with this build I was trying to make sure to stick to USB 3.0+ for faster change out of files when plugging directly to my pc.

              EfriimE 2 Replies Last reply Reply Quote 0
              • EfriimE
                Efriim @ZioDarkmage
                last edited by

                @ZioDarkmage
                There is a USB host database in linux, I don't know if it has any configuration ability, but you might be able to spoof your drive to a more compatible alternative.
                /var/lib/usbutils/usb.ids
                I don't remember where you would apply that, it has been a long time, you will have to google it.

                since you have a fstab, but this will disable usbmount on other drives(I think) you could try disabling it anyway.
                /etc/usbmount/usbmount.conf

                Again I don't know if this even applies
                /etc/usb_modeswitch.conf

                Some drives, I don't have the name for it, are built on a pcb with a controller, while some have the controller built inside like an sdcard.

                I didn't expect the scheduler to effect it all too much if at all. There should be a way to set the usb3.0 enhancements. You'll probably want to look at the raspberry pi forums for that, as this is probably a thing.

                USB hard drive

                This! https://www.domoticz.com/wiki/Assign_fixed_device_name_to_USB_port

                1 Reply Last reply Reply Quote 0
                • EfriimE
                  Efriim @ZioDarkmage
                  last edited by Efriim

                  @ZioDarkmage
                  sudo fsck.fat /dev/sda1
                  I always have this where it says it was not properly umounted. I'm looking into it.
                  Oh well, It is probably nothing.

                  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.