Getting usb to mount at reboot

Well, I've spent a few days on this. And have used this guide and this.

But still, I cannot get USB which has my overlay to mount at rebbot.

Here's my fstab
config 'global'
option anon_swap '0'
option anon_mount '0'
option auto_swap '1'
option auto_mount '1'
option delay_root '5'
option check_fs '0'

config 'mount'
option target '/mnt/sda1'
option uuid '8f38d4c1-1d90-4040-82c3-938793abee4e'
option enabled '1'

config 'mount'
option target '/mnt/sdb1'
option uuid 'a9fbadd5-ad2a-435a-8daa-657d05836654'
option enabled '1'

Mount points on the WebUI

I have rebooted, redid the steps from the guide; no use, it still won't mount. 'Services' on the WebUI should be available when it's mounted, so discard the points in the image above.

Thanks a lot for your considered response.

Well, if you thought of helping, no need, with the original problem. I found out a rather dodgy USB stick was the problem. I changed that and with 4 reboots in a row, it's holding.

But, a 7gb USB stick, with nothing but nano installed is already filled here. If read the blue to mean space used, or am I wrong?

Though this is what is shows in the mount point window:
/dev/sda1 /overlay 6.88 GB / 7.29 GB 0.28% (20.64 MB)

The blue is Free Space, so you currently have 99% (7.8gb) free (meaning not used), as you use more the blue space will shrink.

1 Like

thanks a lot, mike. while I have your attention, please can you confirm, please, whether through a HUB it is possible to use 2 USB stick, one for overlay and the other I want to add music for minidlna. But when both are attached, I loose the 7gb which is the overlay. If it's possible, what's the procedure, please?

I'm not sure, i've never tried it and the only time i've seen it mentioned from someone else they had the same problem as you (only one drive available at a time), so it might not be possible.

A shame, really. Do you know if the same USB stick for overlay could be used to store data, would I need to create a new partition or simply a directory? Thanks lot.

I haven't tried that either, but i can't think of any reason why a separate partition wouldn't work, just make sure it's mounted properly on it's own mount point etc.

edit - now that i think about it, are your 2 drives that are connected to the hub on separate mount points?

Cannot answer because both cannot be mounted at the same time. If I reboot with both of them, the overlay, which is the small USB does not mount. But the 30gb USB mounts.
When I remove the larger USB, and reboot, the 7gb overlay is mounted, and that's on:
overlayfs:/overlay / 6.88 GB / 7.29 GB 0.28% (20.64 MB) -

Well i just saw in your original post that they are on separate mount points, so that doesn't seem to be the problem unfortunately.

Would you know where/how to find the post with the problem similar to mine? It's a simple question: can openwrt mount two USB sticks at the same time. But can't seem to find an answer. I wish the devs would see this.

Just searched around a bit and couldn't find the post i was thinking of, but ran across this post that suggests power might be the problem, probably worth looking into. And the search function is the magnifying glass in the upper right hand corner.

1 Like

thanks a lot. the great thing there is that he has a USB drive with three partitions; data, swap and overlay, which answers my earlier question. Now it's finding out how to do that, should each partition be mounted different to a different mount point, would the system do this automagically, or do I need to edit the fstab, what to put in there, etc. Oh, boy, much fun has been removed from this simple project to run minidlna.

Each partition should be on it's own mount point, if you use ext4, fat32 or exfat it should just automount, the only problems i've had with mounting have been with ntfs.

1 Like

Some progress....following the 'power' possibility, I changed the HUB and now both are on. However, the larger USB stick does not auto mount, issuing; mount /dev/sdb1
does it. I'd wish it automount for the purpose I want to use it. Can't figure this out yet. I have it in fstab, but it still does not automount.
Second thing I find interesting, the overlay drive is not there, but it does boot, without fail; so far.

whats the manufacturer and model of your router?
what build do you have loaded?
please post your fstab file (in etc/config)...
please mount all drives and copy past output from block info
also how are the drives formatted? ext4?

as mentioned the powered hub was what fixed my issues for the most part.

i must have had further problems with the overlay though because i did end up abandoning that. so now i just have the drives configured (as external storage) along with a small swap partition. when i did have the overlay working i had followed this tutorial: https://openwrt.org/docs/guide-user/additional-software/extroot_configuration
but why do you want/need the overlay to be from your drive? overlay is where apps live, not their data. you should configure minidlna to look at your external drive, not the overlay

for reference
my fstab

config 'global'
        option  anon_swap       '0'
        option  anon_mount      '1'
        option  auto_swap       '1'
        option  auto_mount      '1'
        option  delay_root      '5'
        option  check_fs        '0'


config 'mount'
        option  target  '/mnt/usb1'
        option  uuid    '05821d9b-1a09-4385-8e9d-9c43ac801832'
        option  enabled '1'

config 'mount'
        option  target  '/mnt/usb2'
        option  uuid    '29cac9fb-b793-4669-8f5c-64fafec3fced'
        option  enabled '1'

config 'swap'
        option  uuid    '72a7a7c8-9d45-458f-beb1-252c0d8e16f8'
        option  enabled '1'

my minidlna.conf

config minidlna 'config'
	option enabled '1'
	option user 'minidlna'
	option port '8200'
	option interface 'br-lan'
	option friendly_name 'Skittles DLNA'
	option inotify '1'
	option notify_interval '900'
	option serial '12345678'
	option model_number '1'
	option root_container '.'
	list media_dir '/mnt/usb1/shareroot/medialib'
	list media_dir '/mnt/usb1/shareroot/ourmedia'
	option album_art_names 'Cover.jpg/cover.jpg/AlbumArtSmall.jpg/albumartsmall.jpg/AlbumArt.jpg/albumart.jpg/Album.jpg/album.jpg/Folder.jpg/folder.jpg/Thumb.jpg/thumb.jpg'
	option uuid '322f6d02-cfa8-43dc-b4f7-92cdd1ade0e6'
	option db_dir '/mnt/usb1/minidlna/db'
	option log_dir '/mnt/usb1/minidlna/log'

FYI
if you respond that you have a linksys wrtXXXX & stock openwrt
im going to suggest you try davidc builds instead
https://dc502wrt.org/