Usb media does not detect on start up

Im using a rpi 0 w for osmc and everytime on bootup i have to unplug and replug my usb storage (flash drive and ext hdd both on a powered hub). After i do that it works fine untill the next time i power it off and on again. Im not sure if its possible or not, but i would like for it to be detected when i power on. Any help is appreciated and i will be happy to provide any additional info needed.


To get a better understanding of the problem you are experiencing we need more information from you. The best way to get this information is for you to upload logs that demonstrate your problem. You can learn more about how to submit a useful support request here.

Depending on the used skin you have to set the settings-level to standard or higher, in summary:

  • enable debug logging at settings->system->logging

  • reboot the OSMC device twice(!)

  • reproduce the issue

  • upload the log set (all configs and logs!) either using the Log Uploader method within the My OSMC menu in the GUI or the ssh method invoking command grab-logs -A

  • publish the provided URL from the log set upload, here

Thanks for your understanding. We hope that we can help you get up and running again shortly.

OSMC skin screenshot:

Thanks Tom.
Im using the estuary skin

If you remove the external HDD, is the flash drive reliably detected on boot? If so - this could indicate a power issue.

No even if its just the flash drive nothing is detected. Only after unpluging and repluging usb after it is fully booted will it detect any external media.

Did you remove the external HDD to conduct this test?


1 Like

Yes i did i have also tried it without using the powered hub and end up with the same result.

The log shows that the partition isn’t being identified:

Dec 27 19:03:14 osmc udisks-glue[193]: Device /dev/sda1 did not match any rules.

What’s the output from running blkid /dev/sda1 ideally without the HDD attached.

Sorry for the late responce i just got home from work a few minutes ago but heres what it says.

/dev/sda1: LABEL=“256GB” UUID=“F61F-84C1” TYPE=“exfat” PARTUUID=“e6682959-01”

It seems that exFAT isn’t catered for in the udisks-glue rules.

Are you sure you need exFAT? If the drive is to stay on Linux, ext2 or ext4 would probably be better.

If you must stay with exFAT, you’ll probably need to use fstab or autofs.

I use my drives with windows and android so im limited to exfat and ntfs. Ill give fstab and autofs a shot but im not familiar with how they work. New to linux ive messed arround with it but nothing seroius.

Run this command: sudo mkdir /mnt/256GB
then add this line to /etc/fstab (using sudo):

UUID=F61F-84C1 /mnt/256GB exfat noauto,x-systemd.automount,gid=1000,uid=1000,fmask=0111,dmask=0000 0 0

Reboot and see if you can list files on the device.

Ok so i did that and it sorta works i dont have to unplug and replug for it to show up but i do have to open the mnt directory for it to update on osmc.

It’s configured to mount on demand.

Awesome its alot better than having to unplug an replug. To do the samething with the hdd i just need to change the uuid and the mnt directory in the code i used for the flash drive right or is it diffrent. Its formated ntfs not sure if that makes a diffrence.

udisks-glue is configured for NTFS, so you have the choice of adding a line to /etc/fstab or letting udisks-glue automount it to /media.

If you choose to use /etc/fstab, change the UUID and the file system type to ntfs-3g.

1 Like

Sounds good thanks for your help.

1 Like

This is probably a long standing bug in udisks / kernel - the kernel sends a udev event to say a new device has been attached but doesn’t fill in the properties like the file system type until much later. So udisks reads the properties for the drive and finds an unknown filesystem.

In short it is a race condition in the kernel where it says a new drive is ready but it doesn’t provide the metadata for the drive for udisks to work with in time.

exFat is definitely supported but via a wrapper script. See below:

You’re right. udisks-glue is configured for exFAT – and works every time for me.

So far, I’ve not been able to reproduce the problem on a SanDisk Ultra 32GB thumbdrive formatted as exFAT. The damn thing automounts every single time at system start. I’ve rebooted well over 10 times and haven’t encountered the race condition you describe. This is odd, since it appears to occur consistently for @Adason, but it might simply be down to different hardware: I’m using a Pi 3B for testing while OP is using a Pi Zero W; and, of course, the USB drives are very different. Alternatively, there might be something subtly different with the way the drive has been partitioned and/or formatted.

Anyway, thanks for the feedback. It looks like this problem requires a specific set of circumstances – which I’ve been unable to reproduce.